python-chess supports several chess variants.
Variant | Board class | UCI/XBoard | Syzygy |
---|---|---|---|
Standard | chess/normal | .rtbw, .rtbz | |
Suicide |
| suicide | .stbw, .stbz |
Giveaway |
| giveaway | .gtbw, .gtbz |
Antichess |
| antichess | .gtbw, .gtbz |
Atomic |
| atomic | .atbw, .atbz |
King of the Hill |
| kingofthehill | |
Racing Kings |
| racingkings | |
Horde |
| horde | |
Three-check | 3check | ||
Crazyhouse | crazyhouse |
Each variant will teach you something new and interesting about chess. They are fun to play, and they will sharpen your mind and your chess skills. If you get tired of playing normal chess, you can enjoy these fun chess variants. Give Away Chess: The object of the game is to give away all your pieces. The first person to lose all their pieces wins.
chess.variant.
find_variant
(name:str) → Type[chess.Board][source]¶Looks for a variant board class by variant name. Supports many commonaliases.
- . Free Demo Download Purchase Boxed Version The Most Comprehensive Chess Variant Program In The World Zillions of Games is a program for Windows that plays over 300 board game variants and puzzles in a single, smooth user interface.
- Battle Of Chess. Platform – Android & Web. Server – Online & Offline.
- Chess variant free download. Winboard 4.5 Accessible Chess Winboard 4.5 32-bit is a free Windows accessible Chess program that works automatically with the JAW.
Game end¶
See chess.Board.is_variant_end()
, is_variant_win()
,is_variant_draw()
,or is_variant_loss()
for special variant end conditionsand results.
Note that if all of them return False
, the game may still be over anddecided by standard conditions like is_checkmate()
,is_stalemate()
,is_insufficient_material()
, move counters, repetitions,and legitimate claims.
Chess960¶
Chess960 is orthogonal to all other variants.
See chess.BaseBoard.set_chess960_pos()
,chess960_pos()
, andfrom_chess960_pos()
for dealing with Chess960 startingpositions.
Crazyhouse¶
chess.variant.
CrazyhousePocket
(symbols:Iterable[str]=')[source]¶A Crazyhouse pocket with a counter for each piece type.
add
(piece_type:int) → None[source]¶Adds a piece of the given type to this pocket.
remove
(piece_type:int) → None[source]¶Removes a piece of the given type from this pocket.
count
(piece_type:int) → int[source]¶Returns the number of pieces of the given type in the pocket.
reset
() → None[source]¶The Chess Variants Club Download Free Pc Games
Clears the pocket.
copy
() → CrazyhousePocketT[source]¶Returns a copy of this pocket.
Best Chess Variants
chess.variant.
CrazyhouseBoard
(fen:Optional[str]='rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR[] w KQkq - 0 1', chess960:bool=False)[source]¶pockets
= [chess.variant.CrazyhousePocket(), chess.variant.CrazyhousePocket()]¶Pockets for each color. For example, board.pockets[chess.WHITE]
are the pocket pieces available to White.
legal_drop_squares
() → chess.SquareSet[source]¶Gets the squares where the side to move could legally drop a piece.Does not check whether they actually have a suitable piece in theirpocket.
It is legal to drop a checkmate.
Returns a setofsquares
.
Three-check¶
chess.variant.
ThreeCheckBoard
(fen:Optional[str]='rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 3+3 0 1', chess960:bool=False)[source]¶remaining_checks
= [3, 3]¶Remaining checks until victory for each color. For example,board.remaining_checks[chess.WHITE]0
implies that White has won.
UCI/XBoard¶
Multi-Variant Stockfish and other engines have an UCI_Variant
option.XBoard engines may declare support for variants
.This is automatically managed.
Syzygy¶
Syzygy tablebases are available for suicide, giveaway and atomic chess.