Game rules and Instructions Rules
The board will start with 2 black discs and 2 white discs at the centre of the board.
They are arranged with black forming a North-East to South-West direction.
White is forming a North-West to South-East direction.
Each player gets 32 discs and black always starts the game.
Then the game alternates between white and black until:
one player can not make a valid move to outflank the opponent.
both players have no valid moves.
When a player has no valid moves, he pass his turn and the opponent continues.
A player can not voluntarily forfeit his turn.
When both players can not make a valid move the gane ends.
This program is an implementation of OTHELLO game with python (Pygame) .
It can be played in Both single-player and Multiplayer mode.
The heart of the AI is an alpha-beta algorithm. you can change Depth in the main function.
Additionally, the Min-Max algorithm is implemented and can be used instead of alpha-beta.
At first, it's needed to install pygame library and MachineGunk-nyqg.ttf font as prerequisites. Then, run main.py and enjoy the game.
The value of a node was approximated by our linear value function based on board features:
- Corner Disks: number of pieces Which have corner point.
- Mobility: number of available moves.
- Piece Difference: proportion of the pieces on the board that are yours.
- Value Matrix: score based on relative value of positions taken.
Genetic Algorithm and machine learning was used to make Heuristic parameters better. In the begining