The Chess Variant Pages
The House of Staunton



Check out Kyoto Shogi, our featured variant for June, 2025.

Play-test applet for chess variants

Introduction

This page contains a tool that can help you play testing your chess-variant designs, by playing those against the generic AI of the Interactive Diagram. You just have to set up the initial position by specifying a board format (and pressing 'Apply'), and moving the pieces you want to participate from the table to the board. (You can drag them one by one, but as long as you are still in setup mode you can make multiple clicks on empty squares to place a bunch of them, and the opponent will automatically be placed as mirror image.) When the setup is as you want it, you can press 'Start Position' to let the computer know you are done. You can then press the 'Play it!' link below the board to start playing your variant against the AI.

You should primarily select the pieces by the desired image; When you are not happy about the move, name or ID that comes with it you can all change these: Just specify what you would like to have instead for a certain piece, and then click the move of that piece in the table. This should immediately display all new values for that piece. If you want to use the same image for two different pieces, you can use the 'Duplicate' button after selecting the piece.

The replacement move has to be entered in Betza notation (the XBetza extensions are understood). For people not familiar with that notation there is an aid for creating it near the bottom of the page; It doesn't handle really complex cases, such as bent sliders or locusts; for those you would really have to type the move. But the chances that you need any of those (that are not already in the table) are quite slim.

When changing the properties of a piece you can (optionally) also associate automatic promotions with it, i.e. type changes that are mandatory and do not involve any choice by the player. Such promotions can be a consequence of reaching a certain square, or of capturing a piece of a certain type (or even of moving without capture). For the first case have to define a 'morph board', where each square contains the piece you should promote to when reaching it. After clicking on the 'morphing & confining' link the board diagram will be temporarily cleared to set this up. For the other case a table with possible (black) occupants of a destination square is shown, and below each of those you can specify what should appear on that square when a (white) piece of the given type captures the shown piece. (This can even be a black piece!) You can also indicate the corresponding move is not allowed, by specifying a hole as promotion piece. This can be used to confine pieces to board zones, or set up a capture hierarchy. When you assign the specified board and capture table to a piece in the piece table, (by clicking the move of the latter), the morphing & confining section will close again, and the position that was on the board before will re-appear.

Below you can specify either a row or column of the capture matrix (toggle by clicking on the link). Which row or column that is you determine at the end, by clicking (in the table) on the move of the piece it should count for (i.e. the piece that would make the capture, or the piece that was captured).

Empty (white) cells indicate that nothing special happens when the corresponding capture is made. Putting a piece in the cell means a piece of that type (and that color!) will appear in the capture square. By pressing a button before clicking a cell the effect written on the button can be applied the corresponding capture: A hole would forbid it altogether, the cyan button only when the victim was protected. The blue button doesn't apply to capture, but bans hopper moves over the 'victim'. 'Evaporate' leaves an empty square (kamikaze capture), 'Explode' (also?) destroys adjacent pieces, based on settings of other parameters.

A second click on a cell would set the state of all cells to the right of it. The Clear button can be used to revert cells to the empty state.

Capture-triggered promotions (from table) and special events (buttons): Help

Help
A move with a piece of the morphing type to a mate square wins instantly, (like capturing the King), a move to a check square only if the piece is still there after the opponent's move (and must thus be legal). Click the button, and then the squares of the morph board you want to be such goal squares.
events:
Board format
Files: Ranks:
Promotion zone (ranks):
Specify more rules
(Also press 'Apply' to enforce these)
Promotion choice: Help
The IDs of all piece types that can be chosen. Prefixing an ID with * means it is only available when you lost one before. Prefixing an ID with ! means the choice is not available on last rank. The choice can be restricted to a part of the promotion zone by suffixing it with a number. E.g. *Q1*R2BN!P with zone depth 3 means that Pawn is not available on last rank, Q is only available on the last rank, Rook only on the last two ranks. To get Q or R these must have been lost before, while B and N are in unlimited supply.
Pieces to shuffle: Help
Type the ID of all pieces that should be permuted. A ! prefix to an ID means that pieces of that type should be evenly distributed over square shades, or, if there is only one, stay on its shade. A : prefix to an ID means that a pair of those should always remains placed symmetrically. You can specify more than one shuffle, separated by commas. E.g. KQ,:BN might swap K and Q, and B and N on neither or both wings.
Royal pieces: Help
Type the ID of all piece types that are royal, concatenated or separated by commas.
Spell:    casted by Help
You can specify one piece (by ID) that should affect its neighbors in the selected way: Prevent enemies from moving (freeze), from capturing (charm), from sliding past (brake), or make them disappear altogether (burn). Friends can be made immune for capture (protect), and friendly sliders can be allowed to hop over them (hide).
satellite=playtool graphicsDir=/graphics.dir/alfaeriePNG35/ whitePrefix=w blackPrefix=b graphicsType=png squareSize=35 lightShade=#e8c080 darkShade=#a89060 symmetry=none promoZone=0 maxPromote=0 promoChoice= useMarkers=1 royal=11 royal=12 enableAI=2 pawn:::::99 shatranj pawn:P:fmWfcF:pawn::99 omega pawn:P:fmWfceFifmW*:pawn::99 wildebeest pawn:P:fmW*fceF:pawn::99 berolina pawn:P:fmFfceWifnmA:berolinapawn::99 asian pawn:P:fW:chinesepawn::99 knight:N::::99 bishop:::::99 rook:::::99 queen:::::99 king::::e1,,e8:99 (fast-castling) king:K:KispO9:king::99 archbishop:A:BN:cardinal::99 chancellor:C:RN:::99 amazon:Z:QN:::99 wazir::W:::99 ferz:::::99 dababba::D:warmachine::99 elephant::A:::99 camel:::::99 zebra:::::99 giraffe::FX:::99 frog::FH:::99 wildebeest:G:NC:wildebeest::99 hawk:H:ADGH:bird::99 squirrel::NAD:::99 lion:L:KNAD:::99 chu-lion:L:KNADcaKmcabK:::99 tiger:T::::99 crocodile:::::99 kangaroo:::::99 ram:::::99 ox:::::99 snake::[vW?B]:::99 osprey::[D?B]:bird::99 rhino::[W?B]:::99 unicorn::[N?B]:::99 gryphon:G:[F?R]:::99 dragon:::::99 grasshopper::gQ:::99 vao::mBcpB:::99 cannon:::::99 leo:L:mQcpQ:paovao::99 wide knight::sN:wideknight::99 narrow knight::vN:narrowknight::99 charging knight::fhNbFbsW:forwardknightbackwardsprince::99 charging rook::fsRbFbW:forwardrookbackwardsprince::99 half-duck (lion)::HFD:greatwarmachineferz::99 fad::FAD:elephantferzwarmachine::99 fibnif (lancer):L:FvN:narrowknightferz::99 bede::BD:bishopwarmachine::99 pegasus:::::99 nightrider::NN:::99 camelrider::CC:::99 dababbarider::DD:warmachinerider::99 elephantrider::AA:::99 amazonrider::QNN:::99 elephantrider ferz::FAA:elephantriderferz::99 elephantrider wazir::WAA:elephantriderwazir::99 elephant dabbabarider::ADD:elephantwarmachinerider::99 dabbabarider ferz::FDD:warmachineriderferz::99 dabbabarider wazir::WDD:warmachineriderwazir::99 wazirknight::WN:knightwazir::99 ferzknight::FN:knightferz::99 modern elephant::FA:elephantferz::99 phoenix::WA:elephantwazir::99 alibaba::AD:elephantwarmachine::99 kirin::FD:warmachineferz::99 woody rook::WD:warmachinewazir::99 camelwazir::WC:camelwazir::99 camelferz::FC:camelferz::99 camelguard::KC:camelguard::99 champion::WAD:::99 wizard::FC:moon::99 mage:::::99 fool::fI:::99 man::K:::99 guard::KAD:::99 archer:::::99 duke:::::99 minister:::::99 falcon::nCnZ:::99 halfbishop::B3:::99 halfrook::R4:::99 halfqueen::Q3:::99 flag:::banner::99 steward::mWcF:::99 lance::fR:::99 horse::ffN:::99 copper::vWfF:coppergeneral::99 silver::FfW:silvergeneral::99 gold::WfF:goldgeneral::99 tokin:+P:WfF:promotedshogipawn::99 promoted lance:+L:WfF:promotedlance::99 promoted knight:+N:WfF:promotedknight::99 promoted silver:+S:WfF:promotedsilver::99 dragon horse:H:BW:promotedbishop::99 dragon king:D:RF:promotedrook::99

After setting up:

* Automatic promotion on reaching a square can be specified by putting the promotion pieces on such squares (white POV). Associate this with the promoting piece by clicking its move in the table.
* A hole on the morph board denies access to the morphing piece.
* Define capture-triggered events by putting the resulting piece or a hole below the piece you capture/that captures you, in the table above.

Chess-variant play-test tool

You can drag pieces from the table to the board, or place several of the same type by clicking multiple squares. Press the absentee button for participating pieces not in the setup.

(Inaccessible board squares)

Betza move description: (aid below)
New piece name:
New piece ID:
(Leave empty to keep old) Morphing & Confining For defining
automatic
promotions

First specify the desired new values above, then click on
the move of the piece in the table that should get those.

Move definition aid

In the pane below you can define moves of a piece by clicking the squares it should be allowed to move to. First click defines a leaper move to the square. A second click would convert this to a slider/rider move that repeats that step/leap. A third click would remove the move again.

To limit the range of a slider you can click the first square along its path that it should not be able to reach. Clicking on the piece takes away all its moves, and thus clears the entire pane.


Add moves in panel to Betza description as:








(Tick, then click!)

Once you are happy with the move diagram you created in the entry panel, press one of the buttons to the right of it to add the move to the Betza description text entry. (Don't forget to clear that first, by pressing 'Clear All'!) You have a choice to add it as move-only, capture-only or both.

Before you click one of these buttons you can specify a few other properties of the move through tick boxes: whether it is to be used as initial move (i.e. on pieces that have not moved before), whether it should hop over one other piece (only sensible with rider moves), or whether it should be non-jumping (not sensible with leaps to adjacent squares). You would only rarely need any of those, so by default the checkboxes are unticked.

Note that you can always edit the move description that you created this way before you actually assign it to a piece in the table. E.g. when you needed a range limitation on a slider too large to fit into the panel; you would just specify a smaller range, and change the number in the resulting definition by typing.

As an example: to specify a FIDE Pawn you would click the square before the piece (forward is up!) and enter it by pressing 'Move-only'. Then you would click the squares diagonally in front, tick 'Also as en-passant capture', and press 'Capture-only'. Finally you would click the square two steps in front of the piece, tick the 'Initial move' and 'Non-jumping' checkboxes, and again press 'Move-only'. That should have filled the Betza move-description text entry with the Betza notation for the move of the FIDE Pawn.

Make your own Interactive Diagram

Tired of setting up the position for your variant every time you return here? You can post a version of the play-test tool that is pre-configured for your variant by putting an Interactive Diagram on a page of your own. The HTML code you would need to insert into such a page can be generated by pressing the button below.

Automating Game Courier presets

This applet can now also generate GAME code that can be copy-pasted into a Game Courier preset to make that rule enforcing. More details on how to do that will appear when you press the GAME-code button. There also is a tutorial on how to use this Applet for automating presets.

A table of pieces with verbal move description

The applet can also assist you in submitting an article to this website, by creating a table describing the pieces, which you could paste in the Pieces section of an article (in HTML mode). This table will show image, name and a verbal description of the move for each piece that occurs in the Diagram. This is not always perfect, in particular not for pieces with complex moves, but at least it would save you the work of describing the ordinary leapers, sliders and their compounds. Usually that leaves only few pieces where you have to correct the auto-generated description by hand.

Converting an existing Diagram

When there already exists an Interactive Diagram for the chess variant, you can use this facility without the need to recreate the Diagram from scratch, by pasting the description (the text normally within the HTML <div> tags) in the text entry below. This would import the existing diagram, and you then only have to press the GAME-code button to generate the rule-enforcing GAME code for it.

Paste Diagram description here:

 

The GAME code above consists mainly of tables that should go into the Pre-Game section of a Game Courier preset. These tables describe all the variant-specific rules, such as how the pieces move, where and to what they can promote, etc. Generic GAME code is used to interpret these tables for the purpose of legality testing and move highlighting. As this code is the same for any variant, it was placed in a file that is included by the above code for the Pre-Game section.

The Post-Move and Post-Game sections should only consist of a single call to a subroutine in this generic code, with a Boolean argument indicating whether the moving player is black. These are also shown above. The Pre-Move sections can remain empty. In addition to copying the code above into the five appropriate sections of the preset, you will have to tick the checkbox "Do not include moves in code" just above the Pre-Game section. This then is usually all you would have to do (after making the variant work in the Applet, of course) to make the preset rule enforcing.

This project is not entirely finished yet; some of the more exotic features supported by the Play-Test Applet (or not even by that, but by the Interactive Diagram), such as Imitators, and cylindric pieces, are not yet supported as GAME code. As this is only a matter for the code in the betza.txt included file, Game Courier presets that are automated through the above GAME code will automatically acquire these capabilities when in due time these are implemented in the included file, as GAME Courier will always use the latest version of this file.



This 'user submitted' page is a collaboration between the posting user and the Chess Variant Pages. Registered contributors to the Chess Variant Pages have the ability to post their own works, subject to review and editing by the Chess Variant Pages Editorial Staff.


By H. G. Muller.

Last revised by H. G. Muller.


Web page created: 2020年06月16日. Web page last updated: 2025年05月26日

AltStyle によって変換されたページ (->オリジナル) /