This page features a simple front-end to the database of chess problems. This project is designed to be a proof of concept that complex searches for chess problems can be fast and served online. The primary purpose of such searches is finding anticipations. Another purpose is being a beta testing facility for the `theme checker'. I'll gladly share the whole source code and the data with anyone interested in it.
Currently there are 331266 problems in the database (817 added in last 30 days). Duplicates and incorrect positions are many.
I'd like to thank all the people who collect chess problems and don't mind sharing their collections.Currently, this database comprises the following sources:
Of course all new contrubutions are very welcome. I'm not promising i'll add them overnight, but i'll try to do my best.
Also i'd like to thank developers and maintainers of the Popeye - a free solving program which was used to solve many problems in the database.
tch.py is a command line utility written in Python programming language. It accepts input from a file (or from standart input if -f option is not specified), one problem per line in Forsyth-Edwards Notation and outputs the solution and the list of the recognized patterns to the standart output.
As well as the actual solution(s), the setplay and tries are also listed if found (stalemating and unproven en passant tries are not supported yet).
If solution matches a multiphase pattern, thematic moves for that pattern are highlited with latin letters in square brackets (white moves in caps). The relevant phases (if they are tries) are then marked with single question mark (`?'), while other tries are marked with double question mark (`??').
FEN record in input may contain just the `Piece placement' field, in this case it is treated as if `w KQkq - 0 1' was appended to it (all castlings are legal, en passant capture is not possible). `Active color', `Halfmove clock' and `Fullmove number' FEN fields are ignored (but can not be omitted): side to move is always considered to be white, 50-moves rule is never applied, moves in the solution are numbered starting from 1.
The -l option lists all supported patterns in alphabetical order with pattern dependencies, e.g. output line like `A: B, C' means that problem that matches pattern A also will match patterns B and C. View the list of all currently supported patterns. Theme definitions were taken from the chess composition literature.
The -h option displays the help message.
$ echo 8/3p4/5R2/1RP1k1P1/8/3K4/8/8 | ./tch.py 1...Kd5[a] 2.c6#[A] 1...d6/d5[b] 2.cxd6#[B] 1.Rbb6? zz 1...Kd5[a] 2.Rf5#[C] 1...d5[b] 2.Rbe6#[D] but 1...d6! 1.Ke3?? zz 1...d6/d5[b] 2.cxd6#[B] but 1...Kd5[a]! 1.Ra5! zz 1...Kd5[a] 2.c6#[A] 1...d6/d5[b] 2.cxd6#[B] Keywords: Block, Changed mates
This example (Ewgenij BALASCHOW, 6292 Sakkelet 3.-4.1997) features setplay, keyplay and two tries, one of which (Rbb6) is marked as relevant to the `Changed mates' pattern. "Thematic" moves have letters assigned to them.
$ echo "r3k3/p1p5/Q3K3/8/8/8/8/8 w - - 0 1" | ./tch.py 1...Rc8 2.Qxc8# 1.Qa3?? (2.Qe7#) 1...Kd8 2.Qf8# but 1...c5! 1.Qc6+?? 1...Kd8 2.Qd7#/Qxa8# but 1...Kf8! 1.Qd6?? (2.Qe7#) but 1...cxd6! 1.Qa1! (2.Qh8#)
Here (Sam LOYD, Musical World, 1859) it can be proven that black have lost their chance to castle queenside, so explicit disallowing of all castlings in FEN line allows tch to find the key move.
$ echo "4b3/7p/4N2k/1R2N1pP/8/3R4/2K5/3B4 w - g6 0 1" | ./tch.py 1...Bf7/Bd7/Bc6/Bxb5 2.Nxf7# 1...g4 2.Nxg4#[A] 1.Rh3[B]! (2.Ng4#[A]) 1...Bg6+[a] 2.hxg6#[C] 1...Bxh5 2.Rxh5# 1.hxg6 e.p.[C]! (2.Rh3#[B]) 1...Bxg6[a] 2.Ng4#[A] Keywords: Anti-reversal, Cooked, Jurasevic cycle, Threat anti-reversal
In the third example (J. ROTENBERG, J.-M. LOUSTAU, M. CAILLAUD, Phénix 1988, special prize) it can not be proven that black last move was g7-g5, but explicitly allowing white to capture en passant on g6 leads to `Jurasevic cycle' being discovered. The downside is that this amazing problem is now recognized as `Cooked', while in fact it isn't.
|Problem||Edited by||When||View changes|
|30030.||Brabec, Juraj & Lehen, Ľudovít #2||Evgeniy Permyakov||2 hours ago||144 bytes|
|355119.||Карпов, Валерий ... #2||Evgeniy Permyakov||3 hours ago||12 bytes|
|355118.||Беспалько, А. К. #2||Evgeniy Permyakov||3 hours ago||12 bytes|
|355117.||Кривенко, Валер ... #2||Evgeniy Permyakov||3 hours ago||12 bytes|
|355116.||Василенко, Анат ... #2||Evgeniy Permyakov||3 hours ago||12 bytes|
|355115.||Владиновский, В. #2||Evgeniy Permyakov||3 hours ago||12 bytes|
|160986.||Holladay, Edgar Dinwiddie #5||Luke Neyndorff||7 hours ago||76 bytes|
|173364.||Loyd, Samuel #2||Luke Neyndorff||7 hours ago||32 bytes|
|161977.||Holladay, Edgar Dinwiddie #5||Luke Neyndorff||7 hours ago||32 bytes|
|148217.||Holladay, Edgar Dinwiddie #5||Luke Neyndorff||7 hours ago||32 bytes|
|146447.||Holladay, Edgar Dinwiddie #5||Luke Neyndorff||7 hours ago||32 bytes|
|133760.||Taffs, Anthony John #3||Luke Neyndorff||7 hours ago||32 bytes|
|106306.||Neyndorff, Luke #2||Luke Neyndorff||7 hours ago||32 bytes|
|104900.||Loyd, Samuel #3||Luke Neyndorff||7 hours ago||32 bytes|
|103271.||Holladay, Edgar Dinwiddie h#3.5||Luke Neyndorff||7 hours ago||32 bytes|
|94669.||Menkis, Herman #3||Luke Neyndorff||7 hours ago||32 bytes|
|94660.||Menkis, Herman #3||Luke Neyndorff||7 hours ago||32 bytes|
|322100.||Holladay, Edgar Dinwiddie h=5||Luke Neyndorff||7 hours ago||32 bytes|
|322050.||Menkis, Herman h#5||Luke Neyndorff||7 hours ago||32 bytes|
|309669.||Holladay, Edgar Dinwiddie #4||Luke Neyndorff||7 hours ago||32 bytes|
--- authors : - Valuska, Ján source : Al Hamishmar date: 1987 distinction: Special HM algebraic : white: [Kc4, Bf8, Be6, Sg3, Se1, Pf2, Ph5, Pf6] black: [Kg5, Pf3] stipulation : "#2" twins : b : Stipulation =2 solution : | "a) 1.Kd5! zz 1...Kxf6 2.Se4# 1...Kh4 2.Sxf3# 1...Kf4 2.Bh6# b) =2 1.Kd5! zz 1...Kxf6 2.Sxf3= 1...Kh4 2.Bh6= 1...Kf4 2.Se4=" keywords : - Lacny comments : - This is an example comment, it is not actually in the database. - | "This is a multi-line comment, It also includes a # sign and thus must be quoted." - Check also >>83064As you see, the document is actually a dictionary of key : value pairs where key is a string and value is either a string, or a list (each entry starts with '-') or another dictionary. Currently there are 14 keys (or fields) recognized by the YACPDB (in the example there are just 8: fen, options, intended-solutions and source-id are not used).
---This is not a field, this is a record separator in YAML. Here it is used to indicate the beginning of a new entry.
authors : - Valuska, JánThis is a list of people who composed this problem. If there was more than one of them it would go like this:
authors : - Doe, John - Doe, JaneNote: not "- DOE John and Jane". The automatic unification of all composer names is currently under development. The canonical name representation will be:
authors : - Last-Or-Family Name, Given And Patronymic Names And Disambiguationsin author's original language, however database search facilities will accept "Loshinski" and fetch you "Лошинский, Лев Ильич". Future tense. Not ready yet.
source : Al HamishmarName of the periodical/book or tourney in which this problem has first featured. This field is not a list, please use comments field if you want to list the reproductions.
source : ProblemOnline source-id : A0036Sources often use their own enumeration/labeling for original materials. Supplying these may help future inquirers. Also source-id can be used to indicate the issue number:
source : MatPlus source-id : 36/1486 # i.e. problem number 1486 published in the 36th issue of the MatPlus
date : 1987When this problem first appeared in source. In case of tourneys that run for several years (like WCCT) please indicate only the beginning year. You can also optionally provide month and date in this format: YYYY[-MM[-DD]] (attention, american friends). The benefit of putting numbers in this way is that chronological order matches lexicographical order.
distinction: Special HMHow this problem was awarded. The general format is
algebraic : white: [Kc4, Bf8, Be6, Sg3, Se1, Pf2, Ph5, Pf6] black: [Kg5, Pf3]Note S for the knights as N is reserverd for Nightriders. Fairy pieces are suported and use the same syntax as in Popeye solving program. Popeye reference manual can be found within the popeye distribution or at the Joost de Heer website here.
algebraic : white: [Ka1, Pag7] # white pao (chinese rook) g7 black: [Royal Zf3, Qh8] # black royal zebra (2,3-leaper) f3 neutral: [Pa2, HurdleColourChanging Ga5] # neutral grasshopper at a5 that changes the color of the piece it hops overFor convenience lists of supported fairy pieces, specifications and conditions are available at the edit form via the `Insert' pulldown menu.
fen : 5B2/8/4BP2/6kP/2K5/5pS1/5P2/4S3The diagram may be specified in Forsyth-Edwards Notation as well.
stipulation : "#2"If possible, stipulation should be given in the same notation as used by the Popeye solving program (english input). Please also note the double-quotes around the #2. The reason they are there is that # (number sign) is used for comments in YAML, and to keep it as the part of the content it should be escaped by surrounding the whole stipulation string in double-quotes.
intended-solutions: 3 intended-solutions: 220.127.116.11 intended-solutions: 4.1.1...When author intended more than one solution to his problem, this can be indicated under the diagram using one of these three example formats.
options : - SetPlay - CirceThe list of extra options and conditions. Allowed is everything that can be used with the Popeye directives Option and Condition except options that do not make sense in the database context (e.g. NoBoard or StopOnShortSolutions).
twins : b : Stipulation =2Twins use the Popeye syntax too, with one little difference: in case of Zero-positions first twin must be labeled 'a', the second - 'b' etc, and in case of normal twins the first is 'b', the second - 'c' and so on. Please note that Popeye is aware of fairy pieces, so it is "Add white Sa1", not "Add white Na1" to add a white knight. Here's a Popeye twins memo written by Rainer Staudte:
solution : | "a) 1.Kd5! zz 1...Kxf6 2.Se4# 1...Kh4 2.Sxf3# 1...Kf4 2.Bh6# b) =2 1.Kd5! zz 1...Kxf6 2.Sxf3= 1...Kh4 2.Bh6= 1...Kf4 2.Se4="Note: the blank line between the solutions of the twins is not actually empty, there are 2 whitespace characters on it because YAML is all about identation. To make copying and pasting the solution from other programs easier, YAML edit form has ident buttons. So you copy the solution, paste it into the edit form, select it again and click the 'Ident Right' button. This will add 2 spaces to the beginning of every line and solution will be properly idented. 'Ident Left' button strips 2 spaces from the beginning of every line, it can be used if you accidentaly clicked 'Ident Right' too many times for example.
keywords : - LacnyThe list of the keywords associated with the problem. Anything will do as keywords, but if the keyword can be found in the general YACPDB search form then it is advised that you use that exact spelling. This way the problem will become a subject to the keyword search. However feel free to add any keywords, eventually they'll get to the search form, it is just not an automated process (keywords need to be categorized, they may have dependencies etc).
comments : - This is an example comment, it is not actually in the database. - | "This is a multi-line comment, It also includes a # sign and thus must be quoted." - Check also >>83064 - Visit http://example.com/This will be rendered as: