Pierre KasparianAI & Data freelancer
← Back to work
Algorithm playing chess

2023

Algorithm playing chess

Collaborative development of a Python script that plays chess.

PythonMinimaxIA

This algorithm, called minimax, analyzes all the best possible moves and ranks them with a score. A checkmate is assigned the highest possible score. At the same time, it evaluates the opponent's future best possible moves and subtracts the score based on the opponent's potential gains. The algorithm then selects the move that results in the highest score after considering both players' best options, looking ahead three moves in advance.