Spike Prime - Tic Tac Toe - Teacher Resources

From RoboWiki
Jump to: navigation, search

The complexity of the task: Heavy, because to solve the task you need to understand how to work with matrices, that is, a list in a list.

Lesson Plan

1. Prepare

  • Read through the student material.

2. Engage (10 Min.)

  • Use the ideas in the Ignite a Discussion section below to engage your students in a discussion related to this lesson.
  • Use the video to explain the lesson.

3. Explore (30 Min.)

  • Have your students work in pairs to build the build the tic tac toe robot.
  • Ask them to run the program to see how the robot works..

4. Explain (10 Min.)

  • Organize a discussion about what things the robot does not control and use this to defeat the robot.

5. Elaborate (30 Min.)

  • Have your students program the robot to remove some of the vulnerabilities.
  • Don't forget to leave time for cleaning

6. Evaluate

  • Give feedback on each student's performance.

Ignite a Discussion

Start a discussion with a game of tic-tac-toe:

  • Does anyone know a non-losing strategy for the game.
  • What moves are more profitable.
  • Watch the video and discuss how the robot works.
  • How many different combinations of moves can there be, after that you can tell in simple terms about the operation of the minimax algorithm that is used here. That the robot first calculates the move for itself and then for the player, while considering that the opponent will always make the best move, thus, having calculated all the moves, he finds the best one for himself.

Have your students watch this video to see what they're about to do.

Examples of what the robot does not control

  • The robot does not count the number of perfect moves, so you can immediately bet a winning combination.
  • The robot does not check if the move it asked for was set correctly
  • The robot does not check if you have changed any chips during the game

Coding Tips

  • The place where we recommend programming the symbol like this:
    ####################
    # Recommended place to write code
    ####################

But your students can program in other parts of the code as well. The main thing is to be careful not to create bugs.

Materials for students