Date: | 2005 |
Desc: | Advanced Tic Tac Toe support huge board, unusual board shapes, multiple players, and play against computers |
Skill: | PHP, JavaScript, algorithm & data structure |
Role: | Analyst, web developer |
URL: | DEMO http://elfan.net/tictac |
Status: | Online demo is available on the link above |
Note: | This was made for a coursework on advanced algorithm in my university (Master degree). It was made and tested in IE browser only (IE was still the most popular browser back then). |
Objectives:
- create a computer program that can play tic-tac-toe using Artifical Intelligence
- the board size is adjustable from small size to virtually unlimited size
- the winning line length (how many acquired cells which form a straight line to win) is adjustable
- the algorithm should be very efficient that it can run fast regardless of board size and winning line length
- support small board (classic 3x3 cells) up to huge board (9999x9999 cells). The limit is just for practical purpose. The AI algorithm itself basically can support virtually unlimited size board.
- the board is available in different shapes/patterns (diamond, ring, grid, chess) to add obstruction to particular cells. This can make an interesting game play, e.g. you can only win using diagonal line in a chess board.
- support multiple players (up to 9) mixed of any combinations of humans or computers, turn based (using one same browser)
- have an option to display heat map which is colored cells based on weight. This is to see how the algorithm computation is done for deciding the best step.
- can set the gameplay for computer players to manual mode (wait for button click each step), auto (do each step automatically), bulk (do several steps automatically, in case there are more than one computer players)