About SwapChess

A small chess variant, free to play, with no accounts and no sign-up.

What this is

SwapChess is a chess variant built around one added rule. On your turn you may sacrifice one of your own pawns and teleport any other one of your pieces onto that pawn's square. Everything else is standard chess.

The rule came out of a simple observation: in chess, a badly-placed piece often stays badly placed for the whole game, and there is nothing you can do about it. A bishop on the wrong colour complex, a knight stranded on the rim, a rook that never finds an open file. The SwapMove gives you a way out, but charges you a pawn for it — and because pawns are finite and never come back, the decision is a real one every time.

It turns out to change the game more than expected. Closed positions stop being closed, because swaps ignore blockers entirely. King safety has to be re-learned, because any enemy pawn near your king is a landing pad for any enemy piece. Pawn structure becomes a network of destinations rather than just a wall. Most of that is written up on the strategy page.

How to play

You can play against a bot at three difficulty levels, or against another person by sharing a six-character room code. There is nothing to install, no account to create, and nothing to pay. The full rules are on the how to play page.

Start a game →

How it is built

SwapChess is a small open project. The server is Python, using FastAPI, with WebSockets carrying the live game state between players. Move legality, check detection and the draw rules are handled by the python-chess library, so the underlying chess rules are the standard ones rather than a home-grown approximation. The SwapMove is layered on top: it is validated by simulating the resulting position and rejecting anything that leaves your own king in check.

Where Stockfish is available on the server, the bot uses it for its normal moves with search depth scaled to the difficulty setting. Its swap decisions are separate and deliberately unpolished — the engine does not understand the variant, so swaps are chosen heuristically. That is an honest limitation rather than a design choice, and it is the main thing that would improve with more work.

The front end is plain HTML, CSS and JavaScript with no framework. Piece graphics are SVGs rendered server-side. The site is installable as a progressive web app and keeps a cached shell so the interface still loads without a connection, though live games obviously need one.

Data and privacy

There are no user accounts and no database. Games live in the server's memory while they are being played and disappear when they end. Your display name is stored in your own browser so you do not have to retype it, and it is sent to the server only for the duration of a game. The privacy policy sets out exactly what is stored, what third parties are involved, and what advertising cookies are used.

Advertising

This site is free and is supported by advertising through Google AdSense. Ads appear only on the written pages — this one, the rules and the strategy article. There are deliberately no ads on the game screen itself: an ad next to a chessboard is an ad that gets clicked by accident, which is bad for you and against Google's rules. Ads are clearly labelled where they appear.

Contact

Bug reports, rule arguments, and suggestions are all welcome. The bot's swap logic in particular could be much better, and if you have a position where the rules produced something surprising, that is worth hearing about.

Email: haydenwarfield19@gmail.com

SwapChess is operated by Hayden Warfield. Enquiries about the site, its content, its privacy practices or its advertising can all go to the address above.