Tic-Tac-Toe Robot

I programmed a commercially available 6 DoF arm to play tic-tac-toe.

I bought a Lynxmotion AL5D robotic arm and thought it would be fun to program it to play tic-tac-toe. All the code is written in Matlab. A webcam above the board reads the positions of the pieces using the green squares as reference points. This information then feeds into a function I wrote containing game logic that dictates the robot's move. This move in turn feeds into an inverse kinematics function to determine joint angle trajectories. An Arduino serves as the motor controller for all of the motors in the robot, so I used a Matlab-to-Arduino package to transmit motor commands.

Not only does the robot play the game, but it will also reset the board afterward by placing all the player's pieces in a pile and the robot's pieces in known locations along the side of the board.