A microscopic chess engine that barely knows what it's doing.
Rockfish is a deliberately tiny and obscure chess engine written in Python. It uses a simple minimax search, material counting, and a tiny amount of center-control evaluation. No opening book, no transposition tables, no alpha-beta pruning, and absolutely no grandmaster aspirations.
- Legal chess move generation
- Material-based evaluation
- Center control evaluation
- Minimax search
- Tiny codebase
- Alpha-beta pruning
- Transposition tables
- Piece-square tables
- Quiescence search
- Opening books
- Endgame tablebases
Install Python 3 and the required dependency:
pip install chessClone the repository:
git clone https://github.com/username/Rockfish.git
cd Rockfishpython Rockfish.pyThe engine will play moves automatically until the game ends.
Rockfish evaluates positions using:
| Piece | Value |
|---|---|
| Pawn | 100 |
| Knight | 320 |
| Bishop | 330 |
| Rook | 500 |
| Queen | 900 |
| King | 0 |
Additional points are awarded for attacking:
- d4
- e4
- d5
- e5
Estimated playing strength:
- Approximately 300–700 Elo
- Strong enough to play legal chess
Most engines attempt to find the best move.
Rockfish attempts to find a move.
r n b q k b n r
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
P P P P P P P P
R N B Q K B N R
Engine: e2e4
Possible future improvements:
- Alpha-beta pruning
- Better evaluation
- Move ordering
- Opening knowledge
- Basic tactical awareness
Do whatever you want with it. But do inform me of what you plan on doing please.
If Rockfish accidentally defeats Stockfish, please open an issue immediately please.