# cmd_chess **Repository Path**: angeal/cmd_chess ## Basic Information - **Project Name**: cmd_chess - **Description**: A python program to play chess against an AI in the terminal. - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-28 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README command-line-chess ================== A python program to play chess against an AI in the terminal. ## Installation Requires Python 3, run the following to install : pip3 install cl-chess ## Usage Run the following command after installation chess Type '?' to get help at any time during the game. You'll be asked to choose between playing as white or black, and what depth you want the AI to search : ![Initial](http://i.imgur.com/PSS7csc.png) You can then make any (legal) move : ![First move](http://i.imgur.com/AsXhhvC.png) ## Options Instead of a move, you can input : * `l` to see every legal move * `r` to make a random move * `u` to undo your last move ## Technical stuff The AI is a simple brute-force AI with no pruning. It evaluates a given position by counting the value of the pieces for each side (pawn -> 1, knight/bishop -> 3, rook -> 5, queen -> 9). It will evaluate the tree of moves, and take the path that results in the greatest gain. To learn more, check out [my post on how it works] (http://blog.mbuffett.com/creating-a-basic-chess-ai-using-python/).