Open the board →

Play chess online  ›  How the engine is tested

How the chess engine is built and verified

Chess has an objective test for move-generation correctness. This page shows the numbers play-chess.io produced against it, and names what is still untested.

The move generator is checked with perft

Perft is the standard correctness test in computer chess: it walks every legal sequence of moves from a given position to a fixed depth and counts the positions reached. Reference counts for well-known test positions are published, so a single error anywhere in move generation shows up immediately as a wrong total. The engine behind play-chess.io matches the reference on all five positions below.

Perft results for the play-chess.io move generator, against the standard computer-chess test set.
Test positionDepthPositions countedWhat it catches
Starting position4197,281 Basic legality, pins, checks
Kiwipete397,862 Castling rights, discovered checks
Endgame position 3443,238 En passant while in check
Position 439,467 Promotion, including under-promotion
Position 5362,379 Mixed castling and promotion edge cases

Across the five positions the check covers 410,227 legal move sequences. Kiwipete and positions 3 to 5 exist precisely because they break naive engines: they are dense with the cases — castling through an attacked square, en passant that would expose a king, promotion under check — that a simplified implementation gets wrong.

Forty complete games as a second check

Perft proves the moves are legal; it does not prove a full game finishes cleanly. So the engine was set to play itself to the finish forty times, with mixed search depths and randomised move choice to spread the games across different structures. All forty ended in a result, with no illegal move, no crash and no position the engine failed to score.

Those games exercised 27 castlings, 9 promotions and 3 en passant captures — the three rules most often broken in casual implementations, each hit repeatedly under real game conditions rather than in an isolated test.

Two places play-chess.io departs from the FIDE Laws

Articles 9.2 and 9.3 of the FIDE Laws make threefold repetition and the fifty-move rule claims: a player has to ask for the draw, and a game may legally continue past either point if nobody does. play-chess.io detects both and ends the game automatically instead of waiting to be asked.

Repetition is matched on the full position — pieces, side to move, castling rights and en passant square — so a position that looks identical but carries different castling rights is correctly counted as a different one. Both departures push a casual game toward finishing rather than toward a rules argument, which suits a board with no arbiter and no clock; a rated game would need the claim mechanism instead.

These two gaps are the reason this page exists in the form it does. Any chess site can claim its rules are correct. Stating precisely where an implementation diverges from the governing document, with the article number, is the part a reader can actually check.

How the computer opponent's strength is measured

The three levels differ in search depth: Easy looks two half-moves ahead, Medium four, Hard six. Easy additionally picks at random among moves close to its best, which is what makes it drop material rather than merely play weakly. Each level searches by iterative deepening and stops at a time budget, so a tangled position costs no more waiting than a simple one.

Measured across six fresh positions with an empty cache, a reply takes about 0.2 seconds at Easy, 0.35 at Medium and 0.9 at Hard. The evaluation counts material in centipawns — a pawn at 100, a knight 320, a bishop 330, a rook 500, a queen 900 — with a positional bonus that shifts as pieces come off: the king is rewarded for hiding in the opening and for walking to the centre once the board empties.

What is not tested

The engine has never been given a formal Elo rating, because that requires a long match against rated opposition and none has been run. Statements about its strength on the main page are therefore descriptive rather than numerical: it punishes hanging pieces and finds short forced mates, and it loses the thread in slow closed positions where planning matters more than calculation.

There is no automated cross-browser test suite. Keyboard and screen-reader coverage of the board is incomplete, and the specific gaps are listed on the accessibility page rather than left to be discovered. Anything that looks wrong in a real game is worth reporting through the contact page, ideally with the move list.

Last reviewed 2026-07-23. Changes to this page are listed by date at the bottom of about play-chess.io.