---------------------------------
| # |___| # |___| # |___| # |___|
---------------------------------
|___| # |___| # |___| # |___| # |
---------------------------------
| # |___| # |___| # |___| # |___|
---------------------------------
|___| # |___| # |___| # |___| # |
---------------------------------
| # |___| # |___| # |___| # |___|
---------------------------------
|___| # |___| # |___| # |___| # |
---------------------------------
| # |___| # |___| # |___| # |___|
---------------------------------
|___| # |___| # |___| # |___| # |
---------------------------------
Game Start - Player Move!
The AI is based on the mini-max algorithm. The AI calculates a score based on peice position, and complies a list of all possible moves into a tree with a depth of two moves, then picks it's move based on the score.
Optimization of the algorithim with alpha-beta pruning was done to ensure the highest runtime possible.
This project was originally written in python - I've quickly converted it to JS for a simple text-based demo that you can try!
You start off as the white peices, at the bottom of the board. In order to move, you need to pick a piece (position), and where you want to move it to (move).
The board positions are as follows:
|00|01|02|03|04|05|06|07|
-------------------------
|08|09|10|11|12|13|14|15|
-------------------------
|16|17|18|19|20|21|22|23|
-------------------------
|24|25|26|27|28|29|30|31|
-------------------------
|32|33|34|35|36|37|38|39|
-------------------------
|40|41|42|43|44|45|46|47|
-------------------------
|48|49|50|51|52|53|54|55|
-------------------------
|56|57|58|59|60|61|62|63|
This game follows the rules of simple chess: no empassant, and pawns may only move one space at all times.
Have fun!