An AI-based application that could play modified version of tic-tac-toe which will be played in a form of a n x n board, n > 4. Winning condition is defined when there are 4 symbols (x/o) in a one straight line, whether it's horizontal, vertical, or even diagonal.
The purpose of this application is to be a micro learning sample in creating an agent that could do a general game playing by using logic programming paradigm. The agent created is expected could play the game optimally so the output generated from the play only win or draw, which are the nature of the game rules.
A | B | C | D | E | |
---|---|---|---|---|---|
1 | A1 | B1 | C1 | D1 | E1 |
2 | A2 | B2 | C2 | D2 | E2 |
3 | A3 | B3 | C3 | D3 | E3 |
4 | A4 | B4 | C4 | D4 | E4 |
5 | A5 | B5 | C5 | D5 | E5 |
The application is limited to the least possibility of the game by limiting the board size exactly to 5 x 5. During the first development cycle, the interaction will be made as simple as it could be but still give the user a user-friendly interface by using command line interface
- SWI-Prolog
To use this program, execute swipl inside the directory where the code is. Compile the main program by run [main].
command. The program will prompt iteratively user to take turn by telling the program which cell to put the symbol. If there's a winner (player or AI), the program will tell who's winning and the program will be aborted.
- Avicenna Wisesa
- Rafiano R. Rubiantoro
- Wisnu Teguh Wicansono