Doc, Tic-Tac-Toe robot

Posted on 23/02/2013 by sebathorus
Modified on: 13/09/2018
Project
Press to mark as completed
Introduction
This is an automatic import from our previous community platform. Some things can look imperfect.

If you are the original author, please access your User Control Panel and update it.

      Hello folks  Here is my entry to OddBot's contest, "Naughts and crosses".  His name is Doc, not stunningly original, I must admit, but... here it is.  The ideea behind it's design was to make a board like game of Tic-Tac-Toe which use a reusable table and pieces instead of drawn shapes. For this, I needed a robot capable to scan the game board in order to determine where the game pieces are placed and put it's own pieces on the board.  The main parts are as ...


Doc, Tic-Tac-Toe robot

      Hello folks

 Here is my entry to OddBot's contest, "Naughts and crosses".

 His name is Doc, not stunningly original, I must admit, but... here it is.

 The ideea behind it's design was to make a board like game of Tic-Tac-Toe which use a reusable table and pieces instead of drawn shapes. For this, I needed a robot capable to scan the game board in order to determine where the game pieces are placed and put it's own pieces on the board.

 The main parts are as follows:

  - In place of his brain, is an Arduino Uno plus an homemade shield for connection with sensors and servos.

  - Right arm have 3 LDR sensors used for detecting the placement of pieces on the game board.

  - Left arm have an gripper used for picking up the balls used for play.

  - Movement along the board is provided by an continuos rotation servo and a pair of car chassis wich run on hobby train tracks.

  - On the front of robot is a ultrasonic sensor used to detect when player makes a move.

  - On top of it's head are a green and red LEDs used to indicate when the robot is busy (red LED) or when the player can make his move.

  - Power is provided by a 2 cells LiPo pack put inside plus a 2A UBEC. I had the ideea to supply the power through tracks, but I decided this will be a future upgrade.

Theory of operation is as follows:

 - After power up, the top green light is turned on and Doc wait for it's ultrasonic sensor to pick a player movement on the board.

If a movement is sensed, red light is turned on and scaning of the game board begins. For rows detection I used white markers placed between the tracks read by two sensors placed on each side of the body. Those markers are also used by the placing routine.

After the scan is complete, agorithm decides if the player have a winning combination of pieces. If not, a "O" ball is picked and is put on a free place on the table. If player wins, Doc raise it's right arm and flashes the red light.

I did not want to make the playing algorithm too smart (yet) because my 5 y.o. daughter wants to play with the robot and she got frustrated if she lose every time :)

After the "O" ball is placed, board is evaluated again to see if Doc has a winning combination. If not, it turn on the green light and the cycle continues. If Doc wins, it flashes the green light and rise it's left arm.

After the player or robot wins, the green and red lights flash alternatively for 20 seconds, in this time board can be manually cleared and a new game can be started.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LikedLike this to see more

Spread the word

Flag this post

Thanks for helping to keep our community civil!


Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post