About
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.
Anonymity is a thing worth mentioning too. You will never be required to sign up or leave your personal information here. Your queries will never be logged.
Currently there are 285904 problems in the database. Duplicates and incorrect positions are many.
Acknowlegments
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:
- Eduardo Sadier's collection of about 30000 twomovers. Eduardo has given his kind permission to use it on this site. You can download this collection from The Art of Direct Mate in Two.
- Valery Smirnov's miniatures collection with about 10000 moremovers. There used to be a great Chess problems library of him, but it was last updated in August 2007 and it seems like you cannot dowload files from there anymore. It says "disk quota exceeded" in russian.
- When i found out that i can't download Valery Smirnov's collection, i started to look for it on my old hard drive. Surprisingly i also have found an archive named "ProblemsPGN.rar" with more that 40000 problems of various genres. It seems like i've downloaded it a while ago and forgot about it. It contains files named in russian (e.g. Задачи.pgn). If you know where this file comes from, please let me know, i'm pretty curious about it. Anyway, i'd like to acknowledge the yet unknown collector.
- Processing of the Problemiste PBM collections resulted in about 4500 new positions and also allowed to add twins to a little more than 3000 problems. Problemiste is a proprietary program for solving and collecting chess problems by Matthieu Leschemelle.
- I have found Leonardo Mano pages (the link doesn't work anymore) via the Vaclav Kotesovec website. They featured a proprietary program called "Forsyth" and a large collection of files with chess problems in its (Forsyth) format (PGN-clone) to download. This outstanding collection has had about 23000 problems that were not yet in the yacpdb.
- Dejan Glišić has sent me his collection of chess problems from the croatian sources. It is relatively small compared to the other collections i have processed, but it's the first time something is sent to me, not found by myself, and i appreciate it a lot. Thank you, Dejan. Upd: And thanks for keeping sending me more problems!
- Dr. Rainer Staudte has emailed me a number of corrections as well as the wonderful collection of miniature selfmates (more than 3000 of them). Founded by the late composer Peter Kniest (and earlier by his brother Albert Kniest) as a card index archive, this collection was digitized by Rainer Staudte after Kniest's passing in 1993. Rainer Staudte continued collecting miniatures and was later joined by chess composers Hans Gruber and Frank Müller. There's a book based on this collection where you can find more details about its history: P.Kniest; H.Gruber, F.Müller, R.Staudte: Selbstmatt-Miniaturen Reflexmatt-Miniaturen. Editions feenschach - phénix, Aachen 2003.
- The collection of about 18000 bohemian threemoveres (with some two-, four- and moremovers) collected by Evgeni Fomichev and late Vladimir Kos was submitted by Rainer Staudte. Later Vaclav Kotesovec and Jiri Jelinek provided a fresher version and a Kos's twomovers collection (with model mates mostly).
- Vito Rallo has sent me his archive of originals from italian magazines Torre & Cavallo-Scacco, years 2000-2005 and Telescacco 2000 years 1994-2007
- Klaus-Peter Zuncke's (1954 - 2007) database of more than 60000 orthodox miniatures was submitted by his friend Rainer Staudte. Some info about this impressive collection is available in German Wikipedia: http://de.wikipedia.org/wiki/Schachdatenbank#Schachkomposition.
- Mirko Degenkolbe from Germany has sent me the digitized Fritz Schonert's collection of ~45000 directmate problems. Full credits for digitizing also include Volker Felber and Udo Degener. Full credits for the whole event also include Steven Dowd from the USA who has served as a German-English translator between me and Mirko, thank you Steven.
- I've contacted Brian Stephenson who runs the Meson Chess Problem Database (i know, you all know this site). Brian was extremely helpful and sent me the best-structured chess problem data file i've seen this far: the Meson. Hats off.
- Gabriel Török, volunteer yacpdb editor from Slovakia, has sent me his twomovers collection with more than 56000 problems. Almost half of them were not in the database yet. Thanks!
- Gabriel also sent me his fourmovers collection of ~10000 problems. About 3000 entries were new and others have their `References' section updated. And over 8000 selfmates. And 33000 threemovers.
- Uwe Würker has given his permission to include his archive of all original directmate problems from the German paper Freie Presse (years 1989-2009) into the yacpdb. The file was submitted via Olaf Jenkner and Rainer Staudte. Thank you very much, everyone.
- Anders Thulin has invited me to use his digitized collection of chess problems from books in public domain that are available on his site. I did.
- Mihail Croitor has kindly provided me with the PGN sources of Chess Endgame Study Database. These entries include a link to Mihail's site where they can be played online via PGN Live, a cool PGN viewer by Milan Velimirović.
- Anatoly Mukoseev from Tver (Russia) has sent me the legacy of the late Tver composer Nikolay Kosolapov. Thank you, Anatoly.
- Alexandr Bulavka from Belarus sent me the collection of his own published problems, thank you very much. Everybody is welcome to enjoy these problems by searching for author:"Булавка, Александр Геннадьевич"
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.
Compatibility
This page has been tested to work with default settings in Firefox3 (Win32/Linux), Firefox2, MSIE6, MSIE7, Opera 9.5 and Safari 3.1.2 (all Win32).
It is also known to crash in Symbian s60 v3 built-in browser. No workaround so far. It crashes in Nokia N80, but it works perfectly fine in Nokia 5800, so i guess, the issue is related to the firmware version or to the amount of RAM.
Contact
Please feel free to send any feedback to
dmitri.turevski@gmail.com or post a comment to
yacpdb.
Theme checker
Name
Theme checker - a program to solve direct orthodox chess problems in two moves and recognize specific patterns in the solution.
Synopsis
tch.py [-fFILENAME]
tch.py { -l | -h}
Description
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.
Examples
Input bolded:
$ 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.
Performance
This program can be quite slow when processing specific problems. Partly this is because it is written in python, but mostly because it uses very naive algorithms. Based on running it on about 43000 problems from yacpdb, the average analysis time is roughly 30 seconds per position per core on 2x Core2 @ 1.86GHz, while median processing time for a problem is about 11 sec. In some extreme cases analysis took hours(!) which is the reason for the high average. Such behaviour is not currently considered as a bug.
Bugs
If you find a bug, please report it to
dmitri.turevski@gmail.com
Author
Dmitri Turevski <dmitri.turevski@gmail.com>
Wiki Help / Guidelines
A wiki is a page or collection of Web pages designed to enable anyone who accesses it to contribute or modify content, using a simplified markup language.
In case of this site it is in fact a collection of pages, thousands of them, each representing a single chess problem or endgame study. Anyone is welcome to correct misspelled names, mistaken sources or misplaced pieces, or leave comments on these problems, or contribute in any other way. There's no need (and actually no means) to sign up or login - you can edit pages anonymously or just sign every contribution with your (nick)name (w/o need to type it each time).
Another important feature of the wikis is that all changes of all pages are stored, and thus any page can be easily reverted to any of the previous versions. This makes wiki kind of immune to vandals, also it is nice to know that you can't really mess the things up by mistake.
Due to the nature of the database content (chess problems) the forementioned simplified markup language is different from what you could be familiar with if you contributed to Wikipedia or any other Mediawiki-based project. YACPDB makes use of YAML.
YAML is a very easy to learn data storage format that aims to be as much human readable as possible. This
YAML in 5 minutes tutorial should give you a quite solid understanding of YAML in about five minutes literally. The Wikipedia article about
YAML is fine too. Or you can skip it now and get back to it after following the example below.
Here's how YAML entry in YACPDB looks like (it may be different from what you may actually find on problem page:
>>83062):
---
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 >>83064
As 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).
0. ---
---
This is not a field, this is a record separator in YAML. Here it is used to indicate the beginning of a new entry.
1. authors
authors :
- Valuska, Ján
This 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, Jane
Note: 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 Disambiguations
in author's original language, however database search facilities will accept "Loshinski" and fetch you "Лошинский, Лев Ильич". Future tense. Not ready yet.
Few rules to follow:
- Don't use other punctuation than comma (,) to separate last and first name. Inside names use only ASCII dots (.), dashes (-) and apostrophes (').
- Use only latin (including western ć, ł, ß etc) and cyrillic characters. If possible, provide original spelling. If impossible (e.g. original is arabic, or you don't know cyrillic) - use latin ASCII.
- Don't abbreviate. If impossible, abbreviate to a single letter. Correct: Booth, David Junior. Incorrect: Booth, David Jr
- Mind what is a given name. Correct: Von Gottschall, Hermann. Incorrect: Gottschall, Hermann von
- Don't overuse disambiguations. Correct: Sparrow, Jack. Incorrect: CAPTAIN Sparrow, Jack
2. source
source : Al Hamishmar
Name 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.
3. source-id
source : ProblemOnline
source-id : A0036
Sources 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
4. date
date : 1987
When 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.
5. distinction
distinction: Special HM
How this problem was awarded. The general format is
[Special|1st|2nd|Nth[-2nd...] ]Prize|Place|HM|Comm.[, remark]
If you are not afraid of
regular expressions click to view the
complete spec
/^(((Special)|([0-9]*1st)|([0-9]*2nd)|([0-9]*3rd)|([0-9]*[0456789]th)|([0-9]*1[123]th))(-(([0-9]*1st)|([0-9]*2nd)|([0-9]*3rd)|([0-9]*[0456789]th)|([0-9]*1[123]th)))? )?((Prize)|(Place)|(HM)|(Honorable Mention)|(Commendation)|(Comm\.)|(cm))(, .*)?$/i
6. algebraic
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 over
For convenience lists of supported fairy pieces, specifications and conditions are available at the edit form via the `Insert' pulldown menu.
7. fen
fen : 5B2/8/4BP2/6kP/2K5/5pS1/5P2/4S3
The diagram may be specified in Forsyth-Edwards Notation as well.
8. stipulation
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.
9. intended-solutions
intended-solutions: 3
intended-solutions: 2.2.1.1
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.
10. options
options :
- SetPlay
- Circe
The 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).
11. twins
twins :
b : Stipulation =2
Twins 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:
Popeye twins syntax
The following specifications for twins and zeropositions using Popeye syntax are recommended:
- Stipulation "stipulation" determines a new stipulation.
Example: Stipulation s#2
- Condition "option_or_condition" determines a new fairy condition.
Example: Condition Circe
- Move "square_from" "square_to" moves the piece from "square_from" to "square_to". A
piece accidentally standing on square2 will be removed.
Example: Move g2 h2
- Exchange "square_from" "square-to" changes the squares of the pieces on "square_from" and "square-to".
Example: Exchange e6 f3
- Remove "square" removes the piece located on square "square".
Example: Remove f6
- Substitute "piece_old" "piece_new" replaces all pieces of type "piece_old" by pieces of type "piecee_new". Colour and further piece specifications
(like paralysing etc.) are not affected.
Example (All rooks to replace by bishops): Substitute R B
- Add "colour" ["piecesspecifications"] "type" "squarelist" adds a new piece.
Example (add a white Night on e2): Add white Se2
Example (add a black paralysing NightriderHopper on c3): Add black para NHc3
- Rotate "n" turnes the board by "n" degrees clockwise ("n"=90, 180, 270).
Example: Rotate 180
- Mirror "square1"<-->"square2" Mirrors the position so that "square1" mirrors "square2"
Example: Mirror h1<-->a8: Mirrors the position on the diagonal a1-h8.
- Shift "square1" "square2" Shift the whole position into the direction determined by the two squares.
Example: Shift a1 a2 - all pieces are moved one square up.
- PolishType All pieces change their colour.
- More than one change may be specified.
Example: Remove f6 Add white qe8
- twin continued (or twin cont) By default the changes refer to the position initially set.
Alternatively the changes can be applied to the position solved most recently.
Example: twin cont rem a1
- ZeroPosition (or Zero) Alternatively used to twin, indicates that the initial position is to be completed by a change in any case.
Example: Zero Move h1 h2
12. solution
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.
13. keywords
keywords :
- Lacny
The 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).
There are two special or "system" keywords:
- Attention - to make other users know that there's something wrong with this problem, but you don't know how to fix it.
- To delete - to make administrator know that this problem needs to be deleted from the database.
Use comments field to give more details.
14. comments
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:
Note the wakaba-style reference to another problem in the database, which has been converted into link and also automatic link to the other site. No other hypertext facilities are supported..
Have fun.
Last updated: 2010-02-08
It also includes a # sign and
thus must be quoted.