A robot to play tic-tac-toe

This robot is playing alone with a man in the classic (3 x 3) tic-tac-toe.

The game is simple, like myself, the robot built out of LEGO-NXT. «Self» means that the robot can determine what kind of made people take a decision and make a retaliatory move. This person does not have a direct impact on the robot, ie no clicks, for example, the control buttons.

Game board is made up of a further detail of the same designer of LEGO, as a «dagger» and «noughts» using appropriate size pieces of two colors (for a white person necessarily, for better recognition of the robot).

The design involved all 3 engine, part of the set. Two of them – to move the carriage over the playing field, and the third – a mechanism for managing emissions checkers using traction cable. On the carriage is an active light sensor for determining the presence of the white pieces in the box game, and store at 5 checkers that «charged» before the game. Moreover, the limit switch, a mechanism to bring in original condition and the sound sensor to feed the robot voice commands like «let’s go, plastic block!».

When you start the program, the robot leads servomotor to its original state, resets the counters, the situation and invites the person to make his move. A man puts a bomb in one of the cells and provides a sound command the robot. Using rooted in memory, information about the location of cells playing field, the robot positions the carriage with a light sensor on each of the cells identified in the memory as free at the moment, in search of the white pieces, had not yet determined what kind of people did. Then, the robot decides on its response, taking advantage of a winning strategy, and introducing some variety into the game with the help of random number generator. Now the robot is to place the carriage on the selected unit, reset it to bomb and leave in the original position to open the playing field for the next turn right.

The game explains its actions the robot synthetic voice. Sound files were created on a PC via text-to-speech, sound editor further processed and converted into a format rso, compatible with the NXT.

Progress of the game is displayed on the graphical display of NXT. Program a robot – the player is written using C + + compiler for the NXT – «Robot C». Also, a separate program for calibration when using the buttons NXT, you can manually position the carriage over a particular unit, record the coordinates, followed by recording them in a file. This file reads the main program, with its load. Of course, you can set the playing field on WEB-camera, and instruct your PC functions determine progress and guidance for the progress of the robot carriage. But I aim to use only the elements of NXT-designer with a minimum of additional components. Additionally, the robot used only to cable and return gum, which, as they say, is in every house. Apart from the playing field, which can be made of almost anything. The main difficulty was with the magazine, which should emit strongly in one draft, and while moving and not be too cumbersome.

In conclusion, let me slightly pokritikovat engineers LEGO, created, in general, excellent, Roboow constructor NXT. Powerful servomotor with integrated motion sensor gear and provisions, of course a good thing. But they are too big and heavy to accommodate, for example, a manipulator. It would be one of them was a small and lightweight. Moreover, in the constructor shesterenok enough. We want to look into the eyes of whoever decided to use such a set of oak, stiff cables, even black, so even with a special connector manufacturing. But the details could be poraznoobraznee.