Skynet

Posted on 09/02/2013 by fifer253
Modified on: 13/09/2018
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.

UPDATED 2/28/13 Before you read this, please read the post on my other Tic Tac Toe playing robot: The Ttp Project at: https://www.robotshop.com/letsmakerobots/node/36073 Skynet was built out of the ashes of The TTP Project, also for the purpose of competing in Oddbot's Naughts and Crosses challenge. I learned sevral lessons from the development of TTP: make the turret secure, make the board unajustable, focus the laser properly, make the laser hit the middle of the baloon, not the middle ...


Skynet

UPDATED 2/28/13 Before you read this, please read the post on my other Tic Tac Toe playing robot: The Ttp Project at: https://www.robotshop.com/letsmakerobots/node/36073

Skynet was built out of the ashes of The TTP Project, also for the purpose of competing in Oddbot's Naughts and Crosses challenge. I learned sevral lessons from the development of TTP: make the turret secure, make the board unajustable, focus the laser properly, make the laser hit the middle of the baloon, not the middle of the board, and do not use the camera tripod (a real pain to try to film and play at the same time.) All of these things were corrected in this version of the bot, I used sturdy 2" PVC pipe, and bolted it down, I glued the board down, did some experiments poping baloons with various focuses untill I got the best results, and made the laser hit square in the middle of the baloon. Skynet was also made sleeker.

I made the laser turret mount beefer, with two screws on the mounting tabs, and some zip ties and hot glue for good measure.

I took the circut board off of Bonnie, mounted it at the base of the support post, and added a tie LED

 

 I also rewrote the code to make it better, it now wins 7 out of the 8 possible games, and when the game is over, either points to the squares that made it win, or lights the tie LED for 2 seconds.

Skynet uses the same system for playing as TTP did, when you want to play, you press the power button on the TV remote

Skynet will then go, and just like TTP, always chooses the top left corner. It then waits until you enter what you want to play, pops your baloon, and based on what you pop, pops it's own. This process repeats until either it wins or ties the game. In the video you will notice that the laser stays on for a long time, when mostly the baloons pop immedeatly after it is turned on. I programed this in, because sometimes the baloon will not pop right away, but with a bit of time it will heat up enough to pop. The video shows the Skynet running it's calibration subrutine, and then it playing me in 3 wins and a tie. If you do not move in the centre square right away, it will always win, and even if you do move, you must be careful to not to move in any corner squares afterwards, or it will win again. One of the wins is me purposefully not making an obvious blocking move, to demonstrate that it will win if you fail to block it.

At the time of posting, Skynet is the biggest Tic Tac Toe playing robot entered in Oddbot's contest, and I think I came up with a fairly unique way of coming at the challenge, in closing: Tic Tac Toe is fun right? Popping baloons is fun right? Flipping thru the channels is fun right? building robots is fun right? Now, put those four things together, and it ought to be four times as fun, right? That in a nutshell is Skynet.

As for the name, the laser is kinda up in the sky, and Skynet cannot be beaten in Tic Tac Toe. Maybe it is not such a good idea to have an atonomus robot turret with a high powered laser sitting in my room.......

UPDATE 2/14/13

After a suggestion from my sister, I wraped pink flagging tape around the squares, to make it look more like a grid, and a little easier to follow:

UPDATE 2/19/13==================================================================================

Oddbot has some doubts that my robot is atonomus, so I will try to dispell them in this posting. First, a little background, I have not been programing very long, so when I took on this challenge I decided the best way to program the bot with my limited knowledge would be to start with graph paper, and play out every game possible if the robot started first, and always chose the top left corner. I wrote out 8 starting games all with the X in the top left corner, and then an O in every other possible place, since there are 9 squares in tic tac toe, and my robot already used one of them. In all but one case, the game is straightforward, where once the robot moves, the human MUST put an O in between two Xs. The only game where programing the bot was a bit tricky is where the robot has moved in the top left corner, and the human moves in the centre spot. In this case, the bot will (I think, I am going on memory here, I do not have all my game sheets in front of me.) go in the top right space, this will force the human to move in the top centre space, and then the robot will move in the bottom centre space. There are now 4 unocupied spaces, and it is the human's turn. This required me to do exactly the same thing as with the starting game, namely play out the game from all the possible moves, and program my robot to react to the 4 possible games from there. With my limited knowledge of programing, I took the sheets I had written, and basicly coded a reaction based logic code for the bot. I hope this makes it clear that my bot is indeed autnomous, but if you still have doubts, I can post more detailed pictures of Tic tac toe sheets I wrote (there is one pic on TTP's post), or go thru the code, and play out the games just as I did. the numbers are just starting at one in the top left corner, and going down to either 9 or 18 depending on weather it is the TV remote, or the bot's 18 boxes.

Oddbot, I think if you really look at my code, you will see the robot making it's choices based on inputs, especially if you keep in mind that all the servo coordinates in the pllay subrutine are all for the X boxes and the PF subrutine is all just O boxes. Please have a more detailed look, and read my explinations in the code. I simply chose to use the brute force method of coding it, take EVERY possible game, input it into the chip and have it respond to the playout of the games.

I will now copy and paste my code into the window, and attempt to explain a bit better what is happining in each chunck

UPDATE 2/28/13==============================================================================

HE PLACED!! Skynet now has accomplished both of his goals, playing tic tac toe, and competeing in the challenge. He came in third out of 8, not so bad, and so I will be marking him as complete, and possibly dissasembling in the near future. I also took that rather long code explination/posting out of the way, and put it in an attachment so the post does not look so messy. Skynet was the first robot I have  entered in a challenge, and now I am hooked. expect to see another robot that looks a rather lot like Skynet, but is more just a overly complicated tic tac toe board for two people using a nunchuck.

Plays Tic Tac Toe, Participates in Oddbot's Naughts and Crosses challenge

  • Actuators / output devices: 2 Hitec servos, 200mw red laser
  • Control method: Infared
  • CPU: Picaxe 20X2 master, Picaxe 08M IR slave
  • Power source: Bench power supply
  • Programming language: Picaxe basic
  • Sensors / input devices: panasonic PNA4602M, TV remote
  • Target environment: Indoors sitting on the floor
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