every piece has a secret
Quick rule: before move 1, choose an enemy spy. Later, reveal it to flip it to your side.
AI uses Lozza for every difficulty. No online engine is used.
Standard Chess
Traitor's Chess follows all standard chess rules. Movement, captures, castling, en passant, and promotion all work normally. If you know how to play chess, you already know the basics.
Choosing Your Spy
Before the game begins, each player secretly picks one of their opponent's eligible pieces as their spy. Kings are always blocked; other piece types depend on Settings. Each player picks one spy or two spies, depending on Settings.
When playing against the AI, you pick your spy before the game starts. The AI picks its own spy silently. When playing two players on the same device, White picks first, then the device is handed to Black to pick theirs. Neither player ever sees the other's choice. When playing against a friend over Wi-Fi, both players pick simultaneously on their own devices.
A gold badge marks your spy on your screen. In 2-spy mode, the badges are labeled S1 and S2. It follows the piece as it moves and cannot be toggled off.
Revealing Your Spy
Once enough moves have been played (configurable in Settings), the Reveal Spy button appears on your turn. You can reveal at any point after that, or not at all. In 1-spy mode, you get one reveal. In 2-spy mode, Spy 1 and Spy 2 reveal separately and each reveal costs a turn.
When you reveal, you do not move at all that turn. The spy switches to your side instantly, right where it stands, and your opponent's turn begins. If revealing ends the game, the match ends immediately. There is no confirmation and no undo, so tap deliberately.
After the reveal: The piece immediately follows your rules. It keeps a spy hat after reveal so both players can always see which piece turned traitor. The piece color shows its current board allegiance, and the hat color shows the true spy allegiance. A revealed pawn moves in your direction and promotes when it reaches your back rank on a future move, not instantly on reveal. Any pending en passant opportunity is cancelled at the moment of reveal.
When reveal is blocked: The button is grayed out if you are in check (you must escape first) or if the reveal would put your own king in check. Both cases are blocked automatically. If your spy is captured before you reveal, it is gone for good.
Reading the Board
The last move is highlighted in yellow-green on the board. Revealed traitor pieces keep their spy-hat visual for the rest of the game. The move history panel to the right of the board shows all moves in standard chess notation. Spy reveals appear in red. The advantage panel to the left shows material balance and spy status for both sides.
Strategy
Timing the reveal is everything. Reveal too early and your opponent adjusts around the new threat. The best reveals win material immediately by placing a newly switched piece where it threatens something your opponent cannot defend. Consider using Settings to prevent either player from revealing too early in the opening. Both players can reveal on consecutive turns with no issue.
Playing Against the AI
Tap Against AI and choose a difficulty. You are randomly assigned White or Black. The AI takes the other color and has its own spy. It follows the same rules as you and will reveal when it calculates a strong enough tactical advantage, not at random.
AI uses Lozza for every difficulty. It runs from a local external asset named lozza.js, so AI play does not depend on an online engine.
🕵️ Informant Very Easy. Offline: nearly instant.
🔫 Operative Easy. Offline: under a second.
🎯 Agent Medium (~1000–1200 Chess.com). Offline: 1–3 seconds.
👁 Spymaster Hard. Offline: 1–4 seconds.
🧠 Director Expert. Highest Lozza search depth.
⏱ Thinking indicator: A spinning circle appears on the board while the AI is calculating. This is normal it means the engine is working.
Two Players, One Device
Tap Two Players, One Device from the main menu. White picks their spy first, then a screen prompts you to hand the device to Black. Black picks their spy, then the device is passed back to White to start. After every turn, a handoff screen appears so the next player can take over without seeing the other's spy. The spy hat only shows for whoever is currently holding the device.
Playing Against a Friend
Both devices must be on the same Wi-Fi network. You and your friend exchange two short codes to connect. One person hosts, the other joins.
1. One device taps Host. A code appears. Send it to your friend.
2. The other device taps Join, pastes that code, and taps Connect. A second code appears. Send that back.
3. The host pastes the second code and taps Connect. Done.
Host and joiner are randomly assigned White/Black when the connection starts. Each player sees only their own spy hat. The host's settings apply to the game.
⏱ Connection time varies. On a fast connection it can be instant. On mobile or a slower network it can take up to two minutes. This is normal. If it has not connected after five minutes, cancel and try again.
⚠️ Do not close your laptop lid, lock your screen, or let your device sleep during a game. This drops the connection immediately and cannot be recovered.
Offline Mode
The game detects your connection each time you return to the menu. Without internet, two things change.
All AI levels use Lozza. If lozza.js is missing, the AI shows an engine-broken warning instead of inventing a fake move.
Play Against a Friend is disabled. Connecting two devices requires a network. Two Players, One Device works fine offline and is the recommended option without Wi-Fi.
Credits / Licenses
Chess piece graphics are based on the Cburnett chess set by Colin M.L. Burnett, licensed under CC BY-SA 3.0. One chess piece graphic has been modified; all other piece graphics remain unchanged. The modified piece graphic is also provided under CC BY-SA 3.0.
AI engine: Lozza by Colin Jenkins, used under the MIT License.
Engine file: lozza.js
Completed games are saved on this device. Open one to watch it back.
Reveal Timing
Earliest turn a spy can reveal. Use 0 for no minimum.
Spy Count
One spy, or two separate spies with separate reveals.
Spy Display
I’ll Remember hides all spy hats/markers, so no one can glance at your board and know your spy. Show on Board displays your spy hat when it is safe for you to see it.
Spy Pieces
Pick eligible piece types. King is always off. At least two types must stay on.
Base: pawns, knights, bishops, and rooks.
Both devices must be on the same Wi-Fi
Cloud relay URL:
Share this code with your friend
Paste their response here:
Paste the host's code below
Copy this response and send it to the host:
Click one eligible enemy piece. It acts normally until reveal; revealing flips it to your side and costs your turn.
Advantage
Moves
Save this replay to local storage?
Are you sure you want to resign? This counts as a loss.
Are you sure you want to offer a draw?
Your opponent is offering a draw.
Choose a piece to promote to: