Jacobi is a program to solve fairy chess proof game problems. Here's an example:
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:
Jacobi can also solve some ordinary help stipulations but there is very little reason to do that because Jacobi shouldn't be faster than Popeye or WinChloe which support more stipulations, fairy conditions, and fairy pieces.
It 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.
For now, Jacobi only supports entering problems in a text format similar to Popeye's. Eventually I plan to add a graphical editor, but the text format is still useful to make it possible to keep track of problems in a text file, or to easily exchange problems with others in a forum or by e-mail.
Here are some examples.
By default the initial position is the standard one, so the following will list every possible way to play Fool's mate.
option FirstToMove white stipulation h#2
In the example above we had to add "option FirstToMove white" to undo the convention that black plays first in a helpmate of integer length. (This option is different from Popeye's WhiteToPlay which would also remove 0.5 moves from the helpmate.) If you prefer, you can instead use Jacobi's elementary commands, play and test, which aren't loaded with a baggage of conventions:
play help 2.0 test #
Most of the time, input in Popeye's format can be used as is. This is by design so that you can more easily test the same problem in both programs. Since Jacobi can only handle one problem at a time, it accepts but doesn't require BeginProblem and EndProblem. P0527811 by Christopher John Feather in 1975 is a h#2 problem. It would be entered as
forsyth 1RrB2b1/8/4s3/2s3p1/2K2b2/1p1rk3/6BR/8 stipulation h#2
P1225028 by Milos Tomasevic and Radovan Tomasevic in 1992 is a ser-sx 126. It would be entered as
forsyth 4bsq1/2p1K3/2k2r1b/5p1s/1P1P1p2/1PpP1Pp1/2P1rp2/1B6 stipulation ser-sx 126
In the case of proof games, Jacobi is a bit picky and it requires the forsyth statement to appear immediately after the stipulation statement so it doesn't get confused with an initial position declaration. Technically the diagram is extra data attached to the dia stipulation, which is why I like to put it on the same line (but you can also insert a line break). The example problem at the top of the page is P1068521, entered as
stipulation dia9.5 forsyth rsbq1bsr/pppk1ppp/2B5/4p3/8/3PSSr1/PPP2PPP/R1BQ1RK1 condition Circe RexInclusive
P1000770 by Thierry Le Gleuher in 2000 is a PG 8.5 with the condition EinsteinChess. For fun, let's enter it using French notation. Since v0.3.1, condition names can be entered in French or German in addition to English.
DebutProbleme enonce dia8.5 forsyth tc2r2t/ppp1p1pp/3p4/5p2/8/8/PPPPPPPP/TCFDRCFT condition EchecsEinstein
The 1st prize of Retros Problemaz 2007 by Paul Rãican is a PG 21.0 with the condition BerolinaChess (available since v0.4.1) and DoubleMaximummer. Fairy pieces with 2-letter symbols can't be specified in forsyth, so we have to use the pieces notation.
stipulation dia 21.0 pieces white Kf2 Se5 BPa2b4c4e4g2g3 black Ke8 Ra8h8 Bc8a3 Sb8f6 BPa7b7d5f5g7 condition Berolina condition DoubleMaximummer
P1243719 by Andrew Buchanan and Richard Stanley in 2001, part (1), is an A-to-B in 5.5 moves. In Jacobi we could still use dia5.5 but to increase compatibility with Popeye we can also write a=>b5.5. Popeye requires the option WhiteToPlay to solve this problem but not Jacobi. The problem would be entered as
forsyth 8/3pP1p1/6p1/5P2/2p2P1k/2p2p2/PpK2pP1/r7 stipulation a=>b5.5 forsyth 6k1/3pP1p1/6P1/5PP1/2p5/2p2p2/P4p2/rb1K4
P1305233 by Alexandre Leroux in 2015 is a PG 7.0 with the option AddPieces. Since we no longer care for compatibility with Popeye we can write PG instead of dia if we want (they are synonyms). It would be entered as
stipulation PG 7.0 pieces white Ka5 Pa6 black Re4 AddPieces
P1068165 by Peter Fayers in 2005 is a PG 6.0 with the condition Kriegspiel which (in this case) means the PG option AddWhitePieces. It would be entered as
stipulation PG 6.0 forsyth r6r/pppqkppp/2bp1s2/8/8/8/8/8 AddWhitePieces
P0001674 by Vasile I. Tacu in 1991 is a PG 6.0 with undefined pieces, followed by a mate in 1. In Jacobi, the piece X is a white undefined piece, which is why we need to add the PG option ColorThePieces. The problem would be entered as
stipulation PG 6.0 forsyth XXXXXXXX/XXXXX1XX/8/5X2/8/8/XXXXXXXX/XXXXXX1X ColorThePieces stipulation #1
P1338763 by myself in 2017 is a PG 5.0 with the option AddPieces, followed by immediate checkmate. It would be entered as
stipulation PG 5.0 pieces white Kf1 Sb6 AddPieces test #
P0574859 by Franz Pachl and Markus Manhart in 1993 is a h##3.5. A double-mate requires putting oneself in check which is illegal in orthodox Chess, so in Jacobi this problem requires the fairy condition AllowTerminalAutoChecks (automatically added if you forget). This particular double-mate problem is of the variety that requires the previous move to be checkmate. Starting the problem with h#3.0 would start with the wrong player and mess with the move numbers. A clever way to enter it is
forsyth 1b6/2B5/4p3/P3K1Rr/4P3/6p1/4R1P1/1S1ks3 stipulation h~2.5 stipulation #1 stipulation ##1 condition AllowTerminalAutoChecks
P1067987 by Mark Kirtley in 2004 is a synthetic game problem which requires the move "5... e1=S" in the middle of the game. It's a bit crazy, but it can be entered as
play help 4.5 test dia pieces black Pe2 AddPieces test not dia pieces black Se1 AddPieces play help 0.5 test not dia pieces black Pe2 AddPieces test dia pieces black Se1 AddPieces stipulation hs#2
P1292590 part (b) by Raffi Ruppin in 1964 is a ser-r#4. It would be entered as
forsyth k7/P4PPs/PP5r/1r6/2p1s3/5b2/8/2K5 stipulation ser-r#4
This is shorthand for the following code, where the reflex condition has been pulled out:
forsyth k7/P4PPs/PP5r/1r6/2p1s3/5b2/8/2K5 set test # reflex stipulation ser-s#4
The set test # command creates a persistent checkmate test for every subsequent move. The command must be followed by an option such as reflex to have any effect on the game.
P1318357 by Peter Rösler in 1992 is a h#6 with the condition Semireflex-check. It would be entered as
pieces white Ka8 Pc2 black Kc8 Pd2g2h2 set test + black reflex stipulation h#6
JF-1257 by Nicolas Dupont in 2017 is a PG 17 with the condition Black reflex #. It would be entered as
set test # black reflex stipulation PG 17 forsyth rbq4r/pK1pp1sp/2s3bp/2p2pk1/8/5P2/PP1PP1PR/RSBQ1BS1
Jacobi will accept a defensive move if the situation being defended against can be directly tested. So a s#1 is fine because Black is defending against checkmate, but a s#2 is not, because the first black move is defending against a s#1, which is not an instant verification.
This means that Jacobi can handle stipulations where the only defensive move is at the very end of the problem, but it can also handle some other cases too. The stipulation hsx5 followed by the stipulation hs#2 works, but it requires elaboration. Black's 5th move is defensive in the sense that Black will avoid capturing if he can, but Black's choice among possible capturing moves will be helpful.
The solver option "PG demolition mode" searches the most likely moves first and then progressively tries less likely moves in multiple passes. It should find a cook faster if there is one. On the other hand, if the problem is sound then it will take much longer to prove it, so you should not use the option if you expect the problem to be sound. Many people ask me how many passes it makes but there's no easy way to answer that. It is best to imagine that this mode takes infinite time, so you stop it when your patience runs out.
The option is for proof games only. If the problem doesn't have a proof game component ("dia" or equivalent), then there will be just one pass which will be identical to a search with the option off. If the solver is doing more than one pass then the option is working. The option is famous for having been able to cook JF-1146 in less than 1 hour.
stipulation dia16.5 forsyth r1Bs1rs1/ppP1k2p/7b/8/p7/3K1S1r/1P5P/3S2R1 condition Masand
The solver runs quickly in recent versions of Firefox and Chrome. One exception is Internet Explorer which is from 3x to 20x slower than the competition, even with IE 11. Its successor, Edge, is supposed to be faster.
As a way to test your performance, the first example (listing solutions to Fool's mate) should take about 0.2s on a reasonable machine.
If you get poor performance, you could consider installing a second browser (different from your favorite one) that you'd use only for running Jacobi.
Jacobi uses a transposition table with hash keys of 86 bits, which gives a theoretically very tiny chance of missing a solution. Jacobi may also contain bugs, which is a more likely source of incorrect results. If you believe that Jacobi returned a wrong result for a problem, then please tell me by e-mail.
Keep in mind that fairy conditions are not always perfectly defined, especially in the way they interact when a problem uses more than one. My goal is to copy the behavior of the latest version of Popeye so that a problem that is C+ in Popeye will be C+ in Jacobi, and vice-versa. If you find a difference in behavior which is not a bug in Popeye, then tell me and I'll try to match what Popeye does.
Currently, Jacobi only searches for solutions of the exact specified length, as if each stipulation had the "exact-" prefix in Popeye. Solvers are divided on this issue, with Popeye and WinChloe reporting shorter solutions, but not Natch and Euclide. I plan to add a way to automatically search for shorter solutions, and maybe make it the default.
Jacobi does a lot of internal consistency checks and it prefers to crash rather than give you wrong results. If Jacobi crashes and you don't think it should have, then please e-mail me the problem you were trying to solve and approximately how long it took before the crash, so I can try to reproduce it.
One known way to crash Jacobi is with a ChecklessChess loop, like this one adapted from Popeye's BEISPIEL/exklohne.inp
anfang auto Gerd Rinder quel Seite 9, Die Schwalbe, X/1969 ford #1 bedi checkless stei weis kd7 td8h8 la1h1 schw ke5 nc3f3 ende
Just bookmark the latest version page so you can get to it directly. This page contains an AppCache manifest 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).
Zip archives of Jacobi are available.
Jacobi is freeware, which means that you are free to use it and make a copy for personal use, but not to redistribute copies as I retain the Copyright on it.
Here I keep links to old versions. Useful to you if I break something with an update.
Bug fixes only. Most of the crashes were found by myself through automated testing.
Many planned features have been postponed to get something out as fast as possible. For now, the problems can only be input in text representation, apart from conditions which can be set by clicking checkboxes.
Please use these definition lists. None is truly complete, but combined they cover pretty much everything.
Page created: October 16, 2017
Page last updated: May 15, 2018
back to François Labelle's homepage