Skip to content

rebeccaloran/432k-chess-puzzles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

432,000+ Chess puzzles one per line in FEN format.

This would not be possible without  http://www.yacpdb.org/

Please show them your thanks and support.


FEN Notation:

From https://www.freechess.org/Help/HelpFiles/fen.html

===
FEN is 'Forsyth-Edwards Notation' it is a standard for describing chess
positions using the ASCII character set.

A single FEN record uses one text line of variable length composed of six
data fields. The first four fields of the FEN specification are the same as
the first four fields of the EPD specification.

A text file composed exclusively of FEN data records should have a file name
with the suffix '.fen.'

History

FEN is based on a 19th century standard for position recording designed by
the Scotsman John Forsyth, a newspaper journalist. The standard has been
slightly extended for use with chess software by Steven Edwards with
assistance from commentators on the Internet. It was first implemented in
Edwards' SAN Kit.

Uses for a position notation

Having a standard position notation is particularly important for chess
programmers as it allows them to share position databases. For example, there
exist standard position notation databases with many of the classical
benchmark tests for chessplaying programs, and by using a common position
notation format many hours of tedious data entry can be saved. Additionally,
a position notation can be useful for page layout programs and for confirming
position status for e-mail competition.

Many interesting chess problem sets represented using FEN can be found at the
chess.uoknor.edu ftp site in the directory pub/chess/SAN_testsuites.

DATA FIELDS
-----------

FEN specifies the piece placement, the active color, the castling
availability, the en passant target square, the halfmove clock, and the
fullmove number. These can all fit on a single text line in an easily read
format. The length of a FEN position description varies somewhat according to
the position. In some cases, the description could be eighty or more
characters in length and so may not fit conveniently on some displays.
However, these positions aren't too common.

A FEN description has six fields. Each field is composed only of non-blank
printing ASCII characters. Adjacent fields are separated by a single ASCII
space character.

Piece placement data

The first field represents the placement of the pieces on the board. The
board contents are specified starting with the eighth rank and ending with
the first rank. For each rank, the squares are specified from file a to file
h. White pieces are identified by uppercase SAN piece letters 'PNBRQK' and
black pieces are identified by lowercase SAN piece letters 'pnbrqk.' Empty
squares are represented by the digits one through eight; the digit used
represents the count of contiguous empty squares along a rank. A solidus
character '/' is used to separate data of adjacent ranks.

Active color

The second field represents the active color. A lower case 'w' is used if
White is to move; a lower case 'b' is used if Black is the active player.

Castling availability

The third field represents castling availability. This indicates potential
future castling that may or may not be possible at the moment due to blocking
pieces or enemy attacks. If there is no castling availability for either
side, the single character symbol '-' is used. Otherwise, a combination of
from one to four characters are present. If White has kingside castling
availability, the uppercase letter 'K' appears. If White has queenside
castling availability, the uppercase letter 'Q' appears. If Black has
kingside castling availability, the lowercase letter 'k' appears. If Black
has queenside castling availability, then the lowercase letter 'q' appears.
Those letters which appear will be ordered first uppercase before lowercase
and second kingside before queenside. There is no white space between the
letters.

En passant target square

The fourth field is the en passant target square. If there is no en passant
target square then the single character symbol '-' appears. If there is an en
passant target square then is represented by a lowercase file character
immediately followed by a rank digit. Obviously, the rank digit will be '3'
following a white pawn double advance (Black is the active color) or else be
the digit '6' after a black pawn double advance (White being the active
color).

An en passant target square is given if and only if the last move was a pawn
advance of two squares. Therefore, an en passant target square field may have
a square name even if there is no pawn of the opposing side that may
immediately execute the en passant capture.

Halfmove clock

The fifth field is a nonnegative integer representing the halfmove clock.
This number is the count of halfmoves (or ply) since the last pawn advance or
capturing move. This value is used for the fifty move draw rule.

Fullmove number

The sixth and last field is a positive integer that gives the fullmove
number. This will have the value '1' for the first move of a game for both
White and Black. It is incremented by one immediately after each move by
Black.

EXAMPLES
--------

Here's the FEN for the starting position:

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

And after the move 1. e4:

rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1

And then after 1. ... c5:

rnbqkbnr/pp1ppppp/8/2p5/4P3/8/PPPP1PPP/RNBQKBNR w KQkq c6 0 2

And then after 2. Nf3:

rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2

For two kings on their home squares and a white pawn on e2 (White to move)
with thirty eight full moves played with five halfmoves since the last pawn
move or capture:

4k3/8/8/8/8/8/4P3/4K3 w - - 5 39

ACKNOWLEDGMENTS
-------------

This help file is extracted from the SAN Kit STANDARD document.

SEE ALSO
--------

pgn

AUTHORS
-------

Created: 7 February 2004 MAd

===
Notes on Fairy pieces:

There are puzzles in this set that include fairy pieces:

https://en.wikipedia.org/wiki/Fairy_chess_piece#Notable_examples


Due to the large nature of this collection, I can't catalogue every
single case. Please use the wiki entry for further assistance.


FOR WINDOWS USERS:
I am working on making a batch script version, but for now, Windows
users can either enable bash in the PowerShell or install Cygwin.

https://cygwin.com/install.html

https://docs.microsoft.com/en-us/windows/wsl/install-win10


Tips for using this collection:

Run the script to make a text file with 100 random puzzles.

Open that text file in vim(or print it out) and work your way through
the list.

Make sure set up on a physical board but you can use chess
software. You will need chess software and an engine like stockfish
to verify the correct answers anyway, but simply working out the
solution for yourself, ideally without moving the pieces, simply using
your mind's eye, will prove to enhance your chess tactics greatly.

If you have a tough problem, it's okay to move around the pieces.

The FEN included in this collection unfortunately don't indicate which
side is to move first. This is a chance to exervice the ability to
look at both sides. I believe most of these begin with white to move,
but there are most likely many with black to move. A strong chess
player can look at the position from both sides to make the first move.

After you have completely worked out a puzzle, verify it by loading the
position into a chess engine and run it for at least 30 seconds for
white to move then do the same for black to move. Many of these
puzzles have multiple solutions so don't beat yourself up if yours
doesn't match.

Fairy puzzle solutions are probably difficult to verify with any
engine. Good luck with those.

Above all, have fun!

About

432,000+ chess puzzles in FEN format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages