Tic-Tac-Toe Robot With 08M

Rick100

Senior Member
I built a robot that plays a perfect game of tic-tac-toe or naughts and crosses . Here is a link to the video .
http://youtu.be/s0jUcuq0dXA

It uses an algorithm from an article in the 1971 issue of Radio Electronics by Don Lancaster called Tic-Tac-Tronix . The catch is the computer always goes first and plays the same corner square . Here is a link to the Tic-Tac-Tronix article in PDF form on Don Lancasters website . It's about halfway down the page .
http://www.tinaja.com/glair01.asp

Movement is done using 3 servos . The computer play pieces are plastic beads . Input of the human player is through 9 switches , made from brass sheet , closed by a conductive play piece (fishing sinker) . The switches are read by placing a high on one side with a 4017 decade counter and reading the pin3 input . Diodes keep the high and low outputs of the 4017 from shorting . Pin3 has a 10k pulldown resistor .
It uses 253 of the 256 available bytes . The flow chart in the Tic-Tac-Tronix article is implemented using lookup tables . I have included a serial version of the program that can be run in the simulator . It's what I used to debug the play code before I started adding the robot hardware . I have included the schematics and code .

Here's a link to the robot on letsmakerobots.com
http://letsmakerobots.com/node/27720
 

Attachments

erco

Senior Member
THAT is one great project that is very clever and really fills up the memory. Well done, both this and also your Towers of Hanoi bot. I've been using BS2s forever, but I'm just starting with the PicAxe. I want to get into the multitasking aspect.

Keep up the good work!

erco
 

Rick100

Senior Member
Thanks for the nice words . This is my favorite project so far . I just wanted to see if I could do it with an 08m . I will probably continue the project with a 20X2 for more I/O and program space . That would do away with the 4017 and allow either player to go first . I also want to rebuild the structure with some better wood , so I have a nice little box for my desk . Like a music box that plays tic-tac-toe .

erco : I have some experience with the BS1 and BS2 but I like the picaxes because of the 8 pin parts and price . Good luck .
 
Last edited:

erco

Senior Member
Agreed, a $4-5 Picaxe is a real value, with more features. As I said, I'm interested in the multitasking aspect for mobile robot navigation. Specifically, assigning encoder monitoring to one task, position updating to another, and leave the main program to worry about getting from A to B. I have a BS2-based robot that did quite well at retracing a learned path. Video at http://www.youtube.com/watch?v=PX0IhUqnwrk That was work with the single-thread Stamp. I have high hopes that a PicAxe 20M2 will be an improvement.
 
Top