A personal C++ chess engine project growing from basic engine foundations toward a classical understanding of chess.
PHILOCHESS was born from a technical curiosity about how a chess engine generates moves, but also from a personal desire to express a chess philosophy through code. The project is being built step by step, from board representation and move generation toward an engine guided by a classical understanding of chess.
I am not a professional programmer. I am a chemical engineer, a chess coach, and a chess analyst, as well as a lifelong student of this beautiful art of the sixty-four squares. For that reason, PHILOCHESS is also a learning journey: an attempt to translate chess logic, training ideas, and strategic concepts into a working engine. Its long-term ambition is to evaluate chess through factors such as development, mobility, activity, coordination, structure, material, king safety, and initiative.
PHILOCHESS starts as a simple engine, but it is intended to grow into a tool that reflects a human way of understanding chess and, eventually, may become useful for students, trainers, and chess lovers.
This public repository documents the evolution of PHILOCHESS through complete development logs, structured test inventories, validation games and analyses, and selected code samples.
The engine’s full source code is maintained in a private repository. The samples published here are adapted specifically for educational and documentation purposes.
development-logs/— Versioned project logs and documentationgames/— External tests, validation tournaments, and game analysestest-inventories/— Structured test inventories for implemented engine featurescode-samples/— Selected educational code samples from completed project phasesassets/— PHILOCHESS visual resources
The published C++ samples are self-contained and can be compiled independently with a C++17-compatible compiler.
The latest version, PHILOCHESS 0.2-alpha-013, completes the integration of draw rules and the final validation of the PHILOCHESS 0.2 development cycle. The engine now unifies the handling of stalemate, dead positions, threefold and fivefold repetition, and the fifty- and seventy-five-move rules under a common search framework, preserving the distinction between claimable and automatic draws, the correct precedence of terminal positions, and the coexistence of independent draw causes. All supported draw conditions return a score of zero at the root, in alpha-beta search, and in quiescence search, while legal moves remain available whenever the position is not checkmate or stalemate. Alpha-013 also introduces root-only UCI draw diagnostics and preserves state isolation across search branches and successive position commands. With this version, PHILOCHESS 0.2 is considered complete and closed. Development will continue with PHILOCHESS 0.3-alpha-001: Zobrist Hashing and Transposition Table.
| Version | Milestone |
|---|---|
| 0.1-alpha-001–002 | Minimal UCI interface and first provisional bestmove |
| 0.1-alpha-003–005 | Board representation, square conversion and simple move application |
| 0.1-alpha-006–007 | Basic pawn and knight move generation, internal move representation and UCI parsing |
| 0.1-alpha-008–011 | Bishop, rook, queen and king move generation |
| 0.1-alpha-012 | Pseudo-legal move generation complete |
| 0.1-alpha-013–021 | Legal move validation, game status, FEN loading, special moves, perft and divide |
| 0.1-alpha-022–024 | Extended perft validation suite and material evaluation |
| 0.1-alpha-025–028 | Search preparation, basic negamax, expanded UCI integration and basic alpha-beta pruning |
| 0.1-alpha-029 | GUI compatibility and validation in the first GUI game |
| 0.1-alpha-030 | Tactical regression test derived from the first GUI game |
| 0.1-alpha-031 | Basic move ordering for alpha-beta search |
| 0.1-alpha-032 | Final 0.1 validation and closure |
| Version | Milestone |
|---|---|
| 0.2-alpha-001 | Basic quiescence search and refined MVV-LVA capture ordering |
| 0.2-alpha-002 | Tactical regression testing and quiescence validation following the first tournament |
| 0.2-alpha-003 | Iterative deepening with preservation of the last completed iteration |
| 0.2-alpha-004 | Principal variation tracking and iterative UCI reporting |
| 0.2-alpha-005 | Improved move ordering with PV-move priority and MVV-LVA |
| 0.2-alpha-006 | Time-controlled iterative deepening with soft and hard time limits |
| 0.2-alpha-007 | Piece-square tables with phase-dependent king evaluation |
| 0.2-alpha-008 | Basic knight, bishop, rook and queen mobility evaluation |
| 0.2-alpha-009 | Stalemate recognition throughout the search |
| 0.2-alpha-010 | Conservative dead-position recognition throughout the search |
| 0.2-alpha-011 | Fifty-move rule recognition throughout the search |
| 0.2-alpha-012 | Threefold-repetition detection throughout the search |
| 0.2-alpha-013 | Unified draw-rule integration, cross-rule regression, and final 0.2 validation and closure |
My sincere gratitude goes to the developers of chess engines, graphical interfaces, and other tools for computer-chess research, as well as to those who test chess engines, produce and maintain rating lists, write technical documentation, and preserve, organize, and make valuable resources and historical versions available to the community. Much of this work is carried out quietly and receives far less recognition than it deserves. Their contributions have made it possible to test PHILOCHESS against other engines, measure its progress, identify and correct its weaknesses, and guide its continued development through the accumulated knowledge and experience of the computer-chess community.
I am equally grateful to my students and their families. Their trust, commitment, and expectations continually inspire me to grow as a chess coach, refine my methods, prepare better lessons, and find clearer and more effective ways to share chess knowledge. What I have learned through this shared journey has shaped the care, rigor, and educational perspective with which PHILOCHESS is conceived and developed.
Different parts of this repository are distributed under different terms.
See LICENSE.md for the complete licensing structure.
Robert M. Cuadros
