Welcome! 😁
This is a AI TeeKo player Samaritan applying minimax algorithm.
TeeKo is a game between two players on a 5*5 board. Each player has four markers denoting as r for red and b for black.
Begining with black, two players take turns to placing markers (the "drop phase") until all markers are on the board. If after the drop phase, neither player has won, they continue move one marker at a time to an adjacent spot only (including left, right, up, down and diagonals one spot) until one player wins.
The final goal is to get four markers with the same color in a row horizontally, vertically, and diagonally.
Download the game.py file and run it in a IDE or python3 game.py in your terminal.
As you can see from the picture above, a position is composed of a vertical and horizontal character. For instance, B4, C1 are all valid positions.
There are two cases to start the game.
One Case is when AI Samaritan start first. You will see Samaritan already made a move if AI start first as the picture below shows.
Another Case is when you as a user start first. You will see no one make a move if you chose to start first as the picture below shows.
Our Samaritan is smart. Don't look down at her.