What happens when you pit two different programming logics against each other in an environment of strict rules? To answer this, I developed a Python project that functions as an execution environment (Engine) where different AI scripts can compete.
In this post, I’ll explain how I designed the board, the rules, and the experiment of facing white.py against black.py .
1. The Referee: A Pure Rules Engine
Unlike other projects, here the "engine" is not the player. Its sole mission is to be the board's operating system. It is programmed to:
Validate Legal Moves: Ensuring no AI attempts to bypass the rules.
Manage State: Controlling castling, en passant captures, and promotions.
Detect Game End: Applying rules for insufficient material, threefold repetition, and the 50-move rule.
2. The Experiment: white.py vs. black.py
The real magic happens in external files.…