European Union Education and Awareness for Intelligent Systems Tic-Tac-Toe

Tic-Tac-Toe

This exercise introduces an algorithm to play Tic-Tac-Toe1 as an example for how an algorithm can look like and how it can be used.

Create student pairs

Start by grouping all students into pairs. While it is also possible to create groups of three or four people, smaller groups are recommended.

Provide the algorithm

Hand out one Tic-Tac-Toe algorithm sheet to each group.

Play against the algorithm

One student of each group acts as an AI and plays by strictly following the rules on the Tic-Tac-Toe sheet. The student playing as an AI always has to go first!

Switch the sheet around

After a few games let the groups switch the Tic-Tac-Toe sheet around until everyone had the opportunity to play as an AI.

Discuss what was experienced

Finally it is recommended to talk about what the algorithm did, how well it worked and what its drawbacks are (always going first).

Improve the algorithm

As an optional last step, create groups of up to 4 people and let the students improve the algorithm so it can also be used when going second.

Material

References

  1. https://en.wikipedia.org/wiki/Tic-tac-toe
  2. https://classic.csunplugged.org/activities/community-activities/artificial-intelligence/