# Jacobi: Fairy Chess Helpgame Solver

### by François Labelle

Jacobi is a program to solve fairy chess proof game problems. Here's an example:

Dirk Borst
Nunspeet 2005
2nd place

Proof game in 9.5 moves   (15+16)
Circe Rex Inclusive

The solution is 1.g3 d5 2.Bg2 d4 3.Bc6+ Kd7 4.Sf3 d3 5.O-O dxe2 6.d3 exf1=R [+wRh1] 7.Sbd2 Rxg1 [+wKe1]+ 8.Sf1 Rxg3 [+wPg2] 9.Se3 e5 10.O-O.

Jacobi solves this in a few minutes:

• 814s with v0.1 in Firefox 52 on an i7-6700 CPU @ 3.40GHz

Jacobi's strengths:

• solves fairy proof games faster than Popeye in most cases,
• solves proof games with undefined pieces (letter X),
• supports special proof game options like AddPieces and ColorThePieces,
• supports chaining multiple stipulations together.

Jacobi can also solve some ordinary help stipulations but there is very little reason to do that because Jacobi is on average 5x slower than Popeye for this type of problem. In addition, Popeye and WinChloe support more stipulations, fairy conditions, and fairy pieces. One reason, though, would be for conditions exclusive to Jacobi.

Jacobi can also solve orthodox proof games, but there is very little reason to do that because Jacobi should be slower than Natch or Euclide which are optimized for the orthodox case.

It cannot solve stipulations containing defensive moves, like directmates or selfmate, which is why the subtitle calls it a "helpgame solver". As an exception, Jacobi will accept one defensive halfmove at the very end of the problem.

## Documentation

See the separate documentation page.

## How to quickly try Jacobi

• Find an example problem that interests you from the documentation page.
• Click on the corresponding "Load in solver" button.
• On the solver page, click "Start".
• Click on a solution to view it in the Game editor.

Feel free to experiment by modifying the "Text representation" box, but keep in mind that each time you change something, you have to click on "Set problem from text" and then "Start".

## Offline use

### Method 1

Just bookmark the latest version page so you can get to it directly. This page contains a WebWorker (and an AppCache manifest as fallback) which tells your browser to store every file needed by Jacobi on your computer/device so that the page still "loads" when offline in that particular browser. Some browsers even offer the option "Add to homescreen", which will turn Jacobi into a Web App that you can launch by clicking on an icon (as long as the browser remains installed and its application cache is not cleared).

### Method 2

Zip archives of Jacobi are available. Updated irregularly.

## Upcoming features

Here are the features I'm planning to add soon, so don't bother suggesting them! Jacobi will reach v1.0 when they are all implemented.

• Add a graphical editor for diagrams.
• Add an editor for stipulations with dropdown menus to select from available stipulations and aims.
• Add a graphical viewer for solutions.
• Add a few more aims (%, 00, ep).
• Warn of self-check in the initial position instead of crashing.
• Teach the PG solver that doubled pawns imply a capture nearby when the fairy conditions are close to orthodox.
• Teach the PG solver that the path traversed by a pawn appearing in the goal diagram can't be vertically crossed in some cases when fairy conditions are close to orthodox.
• Rewrite the PG-demolition-mode code, hopefully making it faster.
• Add a WebAssembly version of the chess engine for a speed increase of maybe 50% in modern browsers, with fallback to asm.js for the rest.
• Document the "elementary commands".

Jacobi is freeware, more precisely it is licensed under CC BY-ND 4.0. This means that I retain the Copyright, but you are free to redistribute verbatim copies as long as you give proper credit.

The code for the interface is unobfuscated JavaScript, feel free to look at it and propose patches to me. On the other hand, the Chess engine is obfuscated JavaScript, having been compiled from C with Emscripten. I'm keeping the C source code private. Code in the libs directory is from third parties and you have additional rights to it.

## Privacy

The problems that you enter are solved on your own computer using WebAssembly or JavaScript, and are not transmitted over the Internet.

## Version history

Here I keep links to future, current, and old versions. Old versions are useful to you if I break something with an update. Future versions are not recommended unless you want to test upcoming features.

### Future version

• v0.7.6 beta1 (2020-08-24)

• Added the Patrol options Team, White, and Black. In "Patrol Team", a piece can capture if at least one piece from the same camp is controlled.
• Added the Provocation options Team, White, and Black. These options are also avaiable for Functionary since Functionary = Provocation Ultra.
• Added the condition WhitePassesIfStuck, the white counterpart to the already existing BlackPassesIfStuck.

### Current version

• v0.7.5 (2020-05-23)

• Fixed a bug with MarsCirce Make Mirror.
• Fixed a notation bug in Masand with non-English output languages.
• Fixed the sluggish performance for the combinaison AntiCirce Cage + Circe Assassin.
• Disabled castling in Losing Chess by default to correspond to its usual definition. Add "NonRoyalKings CastlingAllowed" to add it back.
• Added the condition Bolero with options RexInclusive, PawnInclusive, and Inverse.
• Added the condition Pandemic = Contagion ByBlack + Distancing WhiteAvoidsBlack . See the introductory article on Julia's Fairies and the documentation for details.
• Added the Masand option Generalized seen at JF-1498 B.
• Heuristic mode: Added detection of duals due to en-passant as orange moves.
• License: Added the right to distribute copies of Jacobi under certain conditions. This way, if I disappear or my webhost has problems, then someone else can host Jacobi.

### Old versions

Page created: October 16, 2017
Page last updated: August 24, 2020

back to François Labelle's homepage