This thesis aims to program the NAO robot so that it will be able to play the game of tic-tac-toe, where two players alternately mark empty fields on a game board with three columns and three rows. The goal is to place three crosses or circles in a row before the opponent does so. If there are no more empty fields and no one succeded in doing so, the game ends in a draw. When teaching the robot, this problem can be split into three sub-problems.
Firstly, the robot must be aware of the position of its arm in space, so that it is able to reach his goal on the gaming surface. This problem is solved by calculating inverse kinematics using a regression neural network. The second problem is recognizing the current situation, which includes locating the gaming surface and recognizing the state of the game. The program for vision recognition implements basic principles of robot vision. Lastly, the robot plays the game using such a strategy for choosing its next move, that it is most likely to get him victory or to prevent its oponent from doing so. The algorithm used for choosing the optimal move to win the game is based on alpha-beta search trees. In this thesis we succesfully solved all three problems and implemented a system, that is unbeatable at Tic-Tac-Toe.
|