Platform: Series 60 (Symbian)
Tested on: Nokia 3650
Should also work on: Nokia 7650, Nokia 3660, Nokia 6600, Nokia N-Gage, Sendo X, Siemens SX1, Samsung SGH-D700
(If you run this game on one of these phones please send me an email so I can mark this phone as supported.)
Where to buy?
This game is a freeware. So you can download it here and there is no need for paying.
It is a clone of classical "noughts and crosses" also known as “Tic-Tac-Toe” game. The game is played on board of 8x8 squares. The players take turns to place an X or an O in an empty space on the board. The winner is the first to make a line of 5 of their pieces horizontally, vertically or diagonally. If no space left on the board then the game is drawn.
There are 3 difficulty levels. There is not so big difference between them. If you know how recursive minimax algorithm works then:
- level 1: evaluate board and choose 5 best options, then go to 2 steps deep
- level 2: evaluate board and choose 10 best options, then go to 3 steps deep
- level 3:
- for 5 moves do: evaluate board and choose 5 best options, then go to 3 steps deep
- for 45 moves do: evaluate board and choose 10 best options, then go to 4 steps deep
- then: evaluate board and go to 5 steps deep
I decided to write an engine based on recursive minimax algorithm. The idea was to make it really simple to program. I also wanted make some long-running task for which cannot be used Active Objects. I simply wanted to try use Threads under Symbian OS.
So now it is clear that the engine runs in different thread from GUI. The application is responsive and you can cancel the game any time.
Minimax with Alpha-Beta pruning is a simple but pretty effective algorithm where is not necessary to search whole tree of possibilities but when you realize that some branch cannot have better results then that you've already found, simply cut it away and don't search in it. Still this approach is heavily dependent on the evaluation method which selects where it should look first...
I don't have a very good evaluation method. Or to be more accurate, it is not good if you don't go through whole tree, but just to some depth. But who cares! It was not my objective to write the best noughts and crosses engine in the world.
Another known issue
I was wondering how will behave screen drawing using standard methods (I don't use Direct Screen Access). Every time the cursor moves the whole screen is redrawn. When there is more objects and you move quickly the screen beautifully flickers...:-)) It can be easily avoided, but remember I use these small applications to learn Symbian programming and not to do great, robust and flawless software...:-)