Chess variants for Picochess?

297 views
Skip to first unread message

DJ Dekker

unread,
Dec 26, 2024, 8:28:09 AM12/26/24
to PicoChess
Hi all,

Picochess has supported regular and Fisher random chess ("Chess960") for a long time. I think it would be fun if we could play some chess variants as well, like Giveaway, Racing Kings, Three-check and Atomic. You can play these variants at Lichess.

In the python-chess package, which is under the hood of Picochess, support for these variants is already built in:
Standard
Suicide
Giveaway
Antichess
Atomic
King of the Hill
Racing Kings
Horde (requires 36 White pawns 🥴)
Three-check
Crazyhouse

Any ideas whether this could be a useful development of Picochess?

Greetings,
DJ

Amp

unread,
Dec 26, 2024, 9:28:13 AM12/26/24
to PicoChess

It depends on the person. For me it would be more useful, for example, if you could enter the movements using the keyboard, for example E2E4...

Kirit Gordhandas

unread,
Dec 26, 2024, 4:25:49 PM12/26/24
to PicoChess
Yes I agree, movements on keyboard would be useful. Especially when using Raspberry pi 400 or 500.

Kirit

DJ Dekker

unread,
Feb 15, 2026, 7:21:56 AMFeb 15
to PicoChess
Hello PicoChess users,

I have implemented four chess variants for PicoChess. Code is in the threecheck branch of my PicoChess fork on GitHub.
  • Three-Check: in addition to the normal rules of chess, you win the game immediately when you check your opponent for the third time in the game (not necessarily consecutive checks).
  • King of the Hill: in addition to the normal rules of chess, the player who reaches d4, d5, e4 or e5 in a legal way with his king, wins the game immediately.
  • Atomic Chess: captures trigger an explosion that destroys the capturing piece, the victim, and all surrounding non-pawn pieces within a one-square radius.
  • Racing Kings: the player whose King reaches the 8th rank first, wins. No checks allowed!
The rules of these (and other) chess variants are explained on Lichess. You can play each variant at four Elo strength levels: 1000, 1500, 2000 or 2850.

Here is a video of a 'Racing Kings' game with PicoChess: https://youtu.be/_fa52et9-FE

To play these variants you need to checkout the code mentioned above, plus three more things:

1. the Fairy-Stockfish 14 engine
The source is available here: https://github.com/fairy-stockfish/Fairy-Stockfish/releases/tag/fairy_sf_14. After building the engine, please rename it to fairy (not stockfish) and place it into the correct /opt/picochess/engines folder depending on your system architecture.

2. an updated engines.ini
I have inserted these lines in engines.ini:
[fairy]
name = Fairy-Stockfish 14
web = Fairy-Stockfish 14
small = Fairy
medium = Fairy
large = Fairy
elo = 2900
ccrl = 2900
levels = 20
cores = 1
ponder/brain = y
fischer chess960 support = y
comments: For chess variants like 3chess


3. the level file for the engine
My fairy.uci looks like this:
# Fairy-Stockfish configuration for PicoChess
# Copy this file to fairy.uci and adjust as needed
#
# This file configures Fairy-Stockfish 14 to play chess variants.
# Each section defines a "level" that appears in the PicoChess level menu.
#
# Required options per variant:
#   Variant = <variant>       - PicoChess internal variant name
#   UCI_Variant = <variant>   - UCI option sent to Fairy-Stockfish
#
# Supported variants:
#   3check        - First to give 3 checks wins
#   kingofthehill - First to get king to d4/d5/e4/e5 wins
#   atomic        - First to get opponent's king to explode wins
#   racingkings   - First to get king to the 8th rank wins

[DEFAULT]
Threads = 1
 
# =============================================================================
# 3CHECK VARIANT - First player to give 3 checks wins
# =============================================================================
 
[3check@1000]
Variant = 3check
UCI_Variant = 3check
UCI_LimitStrength = true
UCI_Elo = 1000
 
[3check@1500]
Variant = 3check
UCI_Variant = 3check
UCI_LimitStrength = true
UCI_Elo = 1500
 
[3check@2000]
Variant = 3check
UCI_Variant = 3check
UCI_LimitStrength = true
UCI_Elo = 2000
 
[3check@2850]
Variant = 3check
UCI_Variant = 3check
UCI_LimitStrength = false
Threads = 2

# =============================================================================
# KING OF THE HILL - First player to get king to center (d4/d5/e4/e5) wins
# =============================================================================
 
[KotH@1000]
Variant = kingofthehill
UCI_Variant = kingofthehill
UCI_LimitStrength = true
UCI_Elo = 1000
 
[KotH@1500]
Variant = kingofthehill
UCI_Variant = kingofthehill
UCI_LimitStrength = true
UCI_Elo = 1500
 
[KotH@2000]
Variant = kingofthehill
UCI_Variant = kingofthehill
UCI_LimitStrength = true
UCI_Elo = 2000
 
[KotH@2850]
Variant = kingofthehill
UCI_Variant = kingofthehill
UCI_LimitStrength = false
Threads = 2

# =============================================================================
# ATOMIC - First player to get the opponent's king to explode wins
# =============================================================================
 
[Atomic@1000]
Variant = atomic
UCI_Variant = atomic
UCI_LimitStrength = true
UCI_Elo = 1000
 
[Atomic@1500]
Variant = atomic
UCI_Variant = atomic
UCI_LimitStrength = true
UCI_Elo = 1500
 
[Atomic@2000]
Variant = atomic
UCI_Variant = atomic
UCI_LimitStrength = true
UCI_Elo = 2000
 
[Atomic@2850]
Variant = atomic
UCI_Variant = atomic
UCI_LimitStrength = false
Threads = 2

# =============================================================================
# RACING KINGS - First player to get king to the 8th rank wins
# =============================================================================

[RK@1000]
Variant = racingkings
UCI_Variant = racingkings
UCI_LimitStrength = true
UCI_Elo = 1000

[RK@1500]
Variant = racingkings
UCI_Variant = racingkings
UCI_LimitStrength = true
UCI_Elo = 1500

[RK@2000]
Variant = racingkings
UCI_Variant = racingkings
UCI_LimitStrength = true
UCI_Elo = 2000

[RK@2850]
Variant = racingkings
UCI_Variant = racingkings
UCI_LimitStrength = false
Threads = 2



Greetings,
DJ

Op donderdag 26 december 2024 om 14:28:09 UTC+1 schreef DJ Dekker:

Johan Sjöblom

unread,
Feb 15, 2026, 9:57:41 AMFeb 15
to PicoChess
Nice work! And I see you have created a new branch 257-feature-request-implement-chess-variants in our V4 fork.
Do you want me to try to cherrypick your treecheck branch into that branch you created, or do you want to do that yourself?

Not sure how many conflicts we get to resolve... hopefully very few.

-- Johan

Randy Reade

unread,
Feb 15, 2026, 10:38:12 AMFeb 15
to pico...@googlegroups.com
This is great, DJ! I'm looking forward to trying it out. Thanks for sharing.

Exciting times for PicoChess.

Randy

Johan Sjöblom

unread,
Feb 16, 2026, 2:19:26 PMFeb 16
to PicoChess
Thanks DJ Dekker. I accepted your PR so your code is now in the branch you created:
  257-feature-request-implement-chess-variants
Anyone can now test the above branch.

There is a second PR open now to introduce this branch into master: https://github.com/JohanSjoblom/picochess/pull/265
I consider that low risk for "normal" chess.

Nice step to first PR it into a testable branch... No need to cherrypick anything. Quite neat and nice!

BR, Johan


Johan Sjöblom

unread,
Feb 21, 2026, 3:19:22 AMFeb 21
to PicoChess
This chess variants feature is now merged to master branch! I have only tested normal chess to make sure we did not break anything. Added a few commits for that.

Johan Sjöblom

unread,
Feb 21, 2026, 6:22:17 AMFeb 21
to PicoChess
I also merged you 2 additional PRs...

DJ Dekker

unread,
Feb 21, 2026, 7:47:34 AMFeb 21
to PicoChess
Great, thanks Johan! I have also continued testing and the variants are working well now. I'll report and provide a fix in case a bug might show up.

Users will need the Fairy-Stockfish engine to play the variants. Right now they'll have to build the engine themselves. Shouldn't we consider to include the engine, along with its .uci file and the updated engines.ini, to the 'lite' engine pack?

Op zaterdag 21 februari 2026 om 12:22:17 UTC+1 schreef messi...@gmail.com:

Johan Sjöblom

unread,
Feb 21, 2026, 11:03:34 AMFeb 21
to pico...@googlegroups.com
Yes.
We need to compose a new lite resource file. We could build a new (normal) Stockfish 18 at the same time.
I guess the aarch64 is the first priority.
Not sure when I have time to do it


--
You received this message because you are subscribed to the Google Groups "PicoChess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picochess+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/picochess/e4f88567-2a12-430a-b8b5-f92c7119f387n%40googlegroups.com.

Randy Reade

unread,
Feb 21, 2026, 11:15:40 AMFeb 21
to pico...@googlegroups.com
There are a few things that need updating, including SF18, rodent3, mame lua files, fairy,... I've been holding out on an update while trying to figure out an issue with updating MAME to v0.285 - it breaks at least one lua script (risc2500) and likely others that read directly from memory. 

The other thing we need to decide (for the Pi) is whether to switch to compiling under Trixie as this may break running them under Bookworm.

Randy

RandyR

unread,
Feb 21, 2026, 5:44:44 PMFeb 21
to PicoChess
I've never played Atomic but I gave it a try and I'm not sure what is supposed to happen at the end of the game. Black's knight took a pawn beside my king, which I think means I lost, but there was no announcement of checkmate and I couldn't move the knight to the square indicated. However, # was shown on the display. Is this correct or should I also hear checkmate? And, it would be nice to hear an explosion sound played when there is a capture and maybe a triumphant sound when checkmate occurs. :^)

On Sunday, February 15, 2026 at 6:21:56 AM UTC-6 DJ Dekker wrote:
Hello PicoChess users,

RandyR

unread,
Feb 21, 2026, 5:53:55 PMFeb 21
to PicoChess
Also, you can get the fairy engine, .uci file and engines.ini entry here.

There is a Bookworm and a Trixie compile in separate folders. The Trixie compile won't run on Bookworm but the Bookworm one will run on Trixie.

fairy and fairy.uci go in the engines/aarch64 folder. Ensure you give fairy executable rights ('chmod a+x fairy'). Add the contents of engines.ini to your aarch64/engines.ini file (don't replace engines.ini!). Reboot and select Fairy from the Modern Engines menu.

DJ Dekker

unread,
Feb 22, 2026, 3:57:38 AMFeb 22
to PicoChess
Hi Randy,

You're absolutely right: when the knight takes the pawn beside your king, all of them (the knight, the pawn and the king) will explode. The display shows '#' to indicate that the game is over. After you have removed the exploded pieces from the board, it will show the message 'King exploded. 0-1'.

I like your idea to hear an explosion when there is a capture. I'll dive into that soon.

Greetings,
DJ

Op zaterdag 21 februari 2026 om 23:44:44 UTC+1 schreef RandyR:

DJ Dekker

unread,
Feb 22, 2026, 1:05:46 PMFeb 22
to PicoChess
Also, you can get the fairy engine, .uci file and engines.ini entry here.

There is a Bookworm and a Trixie compile in separate folders. The Trixie compile won't run on Bookworm but the Bookworm one will run on Trixie.

I have compiled updated versions of Stockfish 18, Texel 1.12, Arasan 25.3 and Fairy-Stockfish 14 that should run on both Bookworm and Trixie. The binaries should go into the /opt/picochess/engines/aarch64 folder, along with both .nnue files required by Stockfish 18.

You can find the files zipped into a single archive engine_updates.tgz.

RandyR

unread,
Feb 22, 2026, 2:09:48 PMFeb 22
to PicoChess
Hi DJ,

Is there any way to support 'noeboard' mode (for Atomic)? Maybe auto-remove pieces, refresh display?

RandyR

unread,
Feb 22, 2026, 2:23:16 PMFeb 22
to PicoChess
Fortunately hap fixed the issue in MAME and the affected plugins are working again. Looks like v0.286 is about to drop.

DJ Dekker

unread,
Feb 23, 2026, 3:25:13 AMFeb 23
to PicoChess
Hi Randy,

Atomic already supports noeboard mode ("board-type = noeboard" in picochess.ini). I can play an Atomic game on my touch screen and see the exploded pieces being autoremoved. Am I understanding your question incorrectly?

Greetings,
DJ

Op zondag 22 februari 2026 om 20:09:48 UTC+1 schreef RandyR:

Randy Reade

unread,
Feb 23, 2026, 8:26:31 AMFeb 23
to pico...@googlegroups.com
Hi DJ, 

Yes. That's what I meant. I was testing on my laptop. I'll try again today. Just to be clear, if there is a checkmate due to the explosions of an adjacent piece, all pieces will automatically be removed, including the 'dead' king? Or is it just those moves before checkmate?

Randy

Randy Reade

unread,
Feb 23, 2026, 8:48:55 AMFeb 23
to pico...@googlegroups.com
Disregard, DJ.

I tested today and it worked as expected. 😀

Screenshot from 2026-02-23 07-43-20.jpg
Randy
Reply all
Reply to author
Forward
0 new messages