Chess variants for Picochess?

175 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 AM (5 days ago) Feb 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 AM (5 days ago) Feb 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 AM (5 days ago) Feb 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 PM (4 days ago) Feb 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


Reply all
Reply to author
Forward
0 new messages