epd/fen parser with unit test...

Archive of the old Parsimony forum. Some messages couldn't be restored. Limitations: Search for authors does not work, Parsimony specific formats do not work, threaded view does not work properly. Posting is disabled.

epd/fen parser with unit test...

Postby Dann Corbit » 29 Jun 2004, 22:56

Geschrieben von:/Posted by: Dann Corbit at 29 June 2004 23:56:22:


/*
From the PGN Standard by Steven J. Edwards:
16.1.3.1: 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&#59; the digit used represents the count of
contiguous empty squares along a rank. A solidus character "/" is
used to separate data of adjacent ranks.
16.1.3.2: Active color
The second field represents the active color. A lower case "w" is
used if White is to move&#59; a lower case "b" is used if Black is the
active player.
16.1.3.3: Castling availability
The third field represents castling availability. This indicates
potential future castling that may of 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.
16.1.3.4: 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.
16.1.3.5: 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.
16.1.3.6: 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.
*/

#define MAX_FEN_WIDTH 256
//
// Reading a FEN or EPD string does not have to be stupendously fast,
// but it must be very robust. Therefore, extensive error checks
// should be performed.
//

#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cctype>
using namespace std&#59;
/*
From Jack Klein's programming page:
http://home.att.net/~jackklein/ctips01.html#safe_gets
*/
char           *getsafe(char *buffer, int count)
{
    char           *result = buffer,
                   *np&#59;
    if ((buffer == NULL) || (count < 1))
        result = NULL&#59;
    else if (count == 1)
        *result = '\0'&#59;
    else if ((result = fgets(buffer, count, stdin)) != NULL)
        if (np = strchr(buffer, '\n'))
            *np = '\0'&#59;
    return result&#59;
}
static int      char_count(char *s, char c)
{
    int             count = 0&#59;
    assert(s)&#59;
    while (*s) {
        if (*s == c)
            ++count&#59;
        s++&#59;
    }
    return count&#59;
}
typedef struct fen_epd_tag_limits {
    char            c&#59;
    int             min_allowed&#59;
    int             max_allowed&#59;
    char           *message&#59;
}               fen_epd_tag_limits&#59;
static const fen_epd_tag_limits legality[] = {
    {'k', 1, 1, "ERROR: Must be exactly one black king."},
    {'K', 1, 1, "ERROR: Must be exactly one white king."},
    {'r', 0, 10, "ERROR: Must be between 0 and 10 black rooks."},
    {'R', 0, 10, "ERROR: Must be between 0 and 10 white rooks."},
    {'b', 0, 10, "ERROR: Must be between 0 and 10 black bishops."},
    {'B', 0, 10, "ERROR: Must be between 0 and 10 white bishops."},
    {'n', 0, 10, "ERROR: Must be between 0 and 10 black knights."},
    {'N', 0, 10, "ERROR: Must be between 0 and 10 white knights."},
    {'q', 0, 9, "ERROR: Must be between 0 and 9 black queens."},
    {'Q', 0, 9, "ERROR: Must be between 0 and 9 white queens."},
    {'p', 0, 8, "ERROR: Must be between 0 and 8 black pawns."},
    {'P', 0, 8, "ERROR: Must be between 0 and 8 white pawns."},
    {'/', 7, 7, "ERROR: Must be exactly 7 row separators."},
    {0, 0, 0, "Unexpected refererence to unused array position."}
}&#59;
char           *validate_piece_placement(char *s)
{
    int             i = 0&#59;
    char           *mess = ""&#59;
    while (legality[i].c) {
        int             count = char_count(s, legality[i].c)&#59;
        if (count < legality[i].min_allowed || count > legality[i].max_allowed) {
            mess = legality[i].message&#59;
            return mess&#59;
        }
        i++&#59;
    }
    int             white_pieces = char_count(s, 'P') + char_count(s, 'B') + char_count(s, 'N') + char_count(s, 'R') + char_count(s, 'Q') + char_count(s, 'K')&#59;
    if (white_pieces > 16)
        return "ERROR: Count of white chessmen > 16"&#59;
    int             black_pieces = char_count(s, 'p') + char_count(s, 'b') + char_count(s, 'n') + char_count(s, 'r') + char_count(s, 'q') + char_count(s, 'k')&#59;
    if (black_pieces > 16)
        return "ERROR: Count of black chessmen > 16"&#59;
    return mess&#59;
}
char           *validate_active_color(char *s)
{
    char           *error_string&#59;
    if (*s == 'w' || *s == 'b')
        error_string = ""&#59;
    else
        error_string = "ERROR: active color must be 'w' or 'b'"&#59;
    return error_string&#59;
}
static const fen_epd_tag_limits castling[] = {
    {'k', 0, 1, "ERROR: Must be zero or one black king in castling rights."},
    {'K', 0, 1, "ERROR: Must be zero or one white king in castling rights."},
    {'q', 0, 1, "ERROR: Must be zero or one black queen in castling rights."},
    {'Q', 0, 1, "ERROR: Must be zero or one white queen in castling rights."},
    {'-', 0, 1, "ERROR: Must be zero or one 'no castling rights indicator' (-) in castling rights."},
    {0, 0, 0, "Unexpected refererence to unused array position."}
}&#59;
char           *validate_castling_availability(char *s)
{
    char           *ss = s&#59;
    int             i = 0&#59;
    while (*ss) {
        if (*ss != 'K' && *ss != 'k' && *ss != 'Q' && *ss != 'q' && *ss != '-') {
            return "ERROR: Only 'K
Dann Corbit
 

Re: epd/fen parser with unit test...

Postby Andreas Herrmann » 30 Jun 2004, 01:00

Geschrieben von:/Posted by: Andreas Herrmann at 30 June 2004 02:00:29:
Als Antwort auf:/In reply to: epd/fen parser with unit test... geschrieben von:/posted by: Dann Corbit at 29 June 2004 23:56:22:

Hi Dann,
does your parser recognize the errors (illegal positions) in the following fen strings?
8/8/3k2R1/8/8/8/3K4/8 w - - 0 1
8/8/8/8/8/1Kk5/8/1Q6 w - - 0 1
2p1P3/8/8/2k5/4K3/8/8/3p4 w - - 0 1
8/P7/P2k4/P7/P1P5/P7/P2K4/8 w - - 0 1
The first three ones are handled correct by my engine, but not the last one. I'm not sure if the last FEN string is an illegal position, but i think it's not possible to get 6 pawns from the same side during a game to the a or the h line.
white(1): setboard 8/8/3k2R1/8/8/8/3K4/8 w - - 0 1
8/8/3k2R1/8/8/8/3K4/8 w - - 0 1
ERROR (white to move but black king in check)
white(1): setboard 8/8/8/8/8/1Kk5/8/1Q6 w - - 0 1
8/8/8/8/8/1Kk5/8/1Q6 w - - 0 1
ERROR (white to move but black king in check)
white(1): setboard 2p1P3/8/8/2k5/4K3/8/8/3p4 w - - 0 1
2p1P3/8/8/2k5/4K3/8/8/3p4 w - - 0 1
ERROR (pawn in row 1 or 8)
white(1): setboard 8/P7/P2k4/P7/P1P5/P7/P2K4/8 w - - 0 1
8/P7/P2k4/P7/P1P5/P7/P2K4/8 w - - 0 1
My parser also does not check if there are 10 bishops on the same field color like the following:
6B1/5B2/3kB1B1/3B1B2/2B1B3/1B1B4/3K4/8 w - - 0 1
Perhaps there could be other positions, which are not illegal, but it's not possible during a game to reach such positions.
regards
Andreas




wbholmes.de
Andreas Herrmann
 

Re: epd/fen parser with unit test...

Postby Uri Blass » 30 Jun 2004, 01:13

Geschrieben von:/Posted by: Uri Blass at 30 June 2004 02:13:25:
Als Antwort auf:/In reply to: Re: epd/fen parser with unit test... geschrieben von:/posted by: Andreas Herrmann at 30 June 2004 02:00:29:
Hi Dann,
does your parser recognize the errors (illegal positions) in the following fen strings?
8/8/3k2R1/8/8/8/3K4/8 w - - 0 1
8/8/8/8/8/1Kk5/8/1Q6 w - - 0 1
2p1P3/8/8/2k5/4K3/8/8/3p4 w - - 0 1
8/P7/P2k4/P7/P1P5/P7/P2K4/8 w - - 0 1
The first three ones are handled correct by my engine, but not the last one. I'm not sure if the last FEN string is an illegal position, but i think it's not possible to get 6 pawns from the same side during a game to the a or the h line.
It is possible but the problem is that it is impossible to get another pawn
in the c file after you have 6 pawns in the a file.
Uri
Uri Blass
 

Re: epd/fen parser with unit test...

Postby Dann Corbit » 30 Jun 2004, 01:40

Geschrieben von:/Posted by: Dann Corbit at 30 June 2004 02:40:16:
Als Antwort auf:/In reply to: Re: epd/fen parser with unit test... geschrieben von:/posted by: Andreas Herrmann at 30 June 2004 02:00:29:
Hi Dann,
does your parser recognize the errors (illegal positions) in the following fen strings?
8/8/3k2R1/8/8/8/3K4/8 w - - 0 1
8/8/8/8/8/1Kk5/8/1Q6 w - - 0 1
2p1P3/8/8/2k5/4K3/8/8/3p4 w - - 0 1
8/P7/P2k4/P7/P1P5/P7/P2K4/8 w - - 0 1
The first three ones are handled correct by my engine, but not the last one. I'm not sure if the last FEN string is an illegal position, but i think it's not possible to get 6 pawns from the same side during a game to the a or the h line.
white(1): setboard 8/8/3k2R1/8/8/8/3K4/8 w - - 0 1
8/8/3k2R1/8/8/8/3K4/8 w - - 0 1
ERROR (white to move but black king in check)
white(1): setboard 8/8/8/8/8/1Kk5/8/1Q6 w - - 0 1
8/8/8/8/8/1Kk5/8/1Q6 w - - 0 1
ERROR (white to move but black king in check)
white(1): setboard 2p1P3/8/8/2k5/4K3/8/8/3p4 w - - 0 1
2p1P3/8/8/2k5/4K3/8/8/3p4 w - - 0 1
ERROR (pawn in row 1 or 8)
white(1): setboard 8/P7/P2k4/P7/P1P5/P7/P2K4/8 w - - 0 1
8/P7/P2k4/P7/P1P5/P7/P2K4/8 w - - 0 1
My parser also does not check if there are 10 bishops on the same field color like the following:
6B1/5B2/3kB1B1/3B1B2/2B1B3/1B1B4/3K4/8 w - - 0 1
Perhaps there could be other positions, which are not illegal, but it's not possible during a game to reach such positions.
The parser I posted will only count pieces and types and things of that nature. But you could have both kings in check or other clearly illegal positions and it will not recognize it. The only notion of the parser is to prevent some kinds of crashes and overwrites.
The code that I posted does not require that the EPD/FEN is converted into some kind of a board representation, where you can check for legality.
These are the things tested in the current version:

exactly one king of each color
between 0 and 10 black rooks
between 0 and 10 white rooks
between 0 and 10 black bishops
between 0 and 10 white bishops
between 0 and 10 black knights
between 0 and 10 white knights
between 0 and 9 black queens
between 0 and 9 white queens
between 0 and 8 black pawns
between 0 and 8 white pawns
exactly 7 row separators (/) and hence 8 rows
no rows wider than 8 files
16 or fewer white chessmen
16 or fewer black chessmen
zero or one black king in castling rights
zero or one white king in castling rights
zero or one black queen in castling rights
zero or one white queen in castling rights
zero or one 'no castling rights indicator' (-) and if it occurs, no king or queen castling is allowed
the e.p. square must be a valid e.p. target square for the color to move (but it does not check for a pawn to see if the move could be made or to see if there are any vulnerable pawns)
halfmove clock is a number from 0 to 99
fullmove number is a number from 1 to 6000

It is not very sophisticated, and has some design quirks that I am not proud of, but it serves the basic purpose.



my ftp site {remove http:// unless you like error messages}
Dann Corbit
 

Re: epd/fen parser with unit test...

Postby Andreas Herrmann » 30 Jun 2004, 01:44

Geschrieben von:/Posted by: Andreas Herrmann at 30 June 2004 02:44:10:
Als Antwort auf:/In reply to: Re: epd/fen parser with unit test... geschrieben von:/posted by: Uri Blass at 30 June 2004 02:13:25:
Hi Dann,
does your parser recognize the errors (illegal positions) in the following fen strings?
8/8/3k2R1/8/8/8/3K4/8 w - - 0 1
8/8/8/8/8/1Kk5/8/1Q6 w - - 0 1
2p1P3/8/8/2k5/4K3/8/8/3p4 w - - 0 1
8/P7/P2k4/P7/P1P5/P7/P2K4/8 w - - 0 1
The first three ones are handled correct by my engine, but not the last one. I'm not sure if the last FEN string is an illegal position, but i think it's not possible to get 6 pawns from the same side during a game to the a or the h line.
It is possible but the problem is that it is impossible to get another pawn
in the c file after you have 6 pawns in the a file.
Uri
right. What about the following ones:
r1nnk1br/P1bqpppp/P1pp2pp/P7/P7/P7/P2R4/3K4 w - - 0 1
5k2/8/8/8/8/PPPP4/PPPP4/2K5 w - - 0 1
Andreas



wbholmes.de
Andreas Herrmann
 

Re: epd/fen parser with unit test...

Postby Uri Blass » 30 Jun 2004, 01:51

Geschrieben von:/Posted by: Uri Blass at 30 June 2004 02:51:10:
Als Antwort auf:/In reply to: Re: epd/fen parser with unit test... geschrieben von:/posted by: Andreas Herrmann at 30 June 2004 02:44:10:
Hi Dann,
does your parser recognize the errors (illegal positions) in the following fen strings?
8/8/3k2R1/8/8/8/3K4/8 w - - 0 1
8/8/8/8/8/1Kk5/8/1Q6 w - - 0 1
2p1P3/8/8/2k5/4K3/8/8/3p4 w - - 0 1
8/P7/P2k4/P7/P1P5/P7/P2K4/8 w - - 0 1
The first three ones are handled correct by my engine, but not the last one. I'm not sure if the last FEN string is an illegal position, but i think it's not possible to get 6 pawns from the same side during a game to the a or the h line.
It is possible but the problem is that it is impossible to get another pawn
in the c file after you have 6 pawns in the a file.
Uri
right. What about the following ones:
r1nnk1br/P1bqpppp/P1pp2pp/P7/P7/P7/P2R4/3K4 w - - 0 1
5k2/8/8/8/8/PPPP4/PPPP4/2K5 w - - 0 1
Andreas
illegal
h7 h7 g7 or a2 a3 b2 are illegal pawn structure so both are illegal positions.
It does not prevent movei to analyze them.
Uri
Uri Blass
 

Re: epd/fen parser with unit test...

Postby Dann Corbit » 30 Jun 2004, 02:00

Geschrieben von:/Posted by: Dann Corbit at 30 June 2004 03:00:19:
Als Antwort auf:/In reply to: Re: epd/fen parser with unit test... geschrieben von:/posted by: Dann Corbit at 30 June 2004 02:40:16:

Added a test for pawns on 1st or 8th ranks.



my ftp site {remove http:// unless you like error messages}
Dann Corbit
 

Re: epd/fen parser with unit test...

Postby Andreas Herrmann » 30 Jun 2004, 02:06

Geschrieben von:/Posted by: Andreas Herrmann at 30 June 2004 03:06:18:
Als Antwort auf:/In reply to: Re: epd/fen parser with unit test... geschrieben von:/posted by: Dann Corbit at 30 June 2004 02:40:16:
Hi Dann,
does your parser recognize the errors (illegal positions) in the following fen strings?
8/8/3k2R1/8/8/8/3K4/8 w - - 0 1
8/8/8/8/8/1Kk5/8/1Q6 w - - 0 1
2p1P3/8/8/2k5/4K3/8/8/3p4 w - - 0 1
8/P7/P2k4/P7/P1P5/P7/P2K4/8 w - - 0 1
The first three ones are handled correct by my engine, but not the last one. I'm not sure if the last FEN string is an illegal position, but i think it's not possible to get 6 pawns from the same side during a game to the a or the h line.
white(1): setboard 8/8/3k2R1/8/8/8/3K4/8 w - - 0 1
8/8/3k2R1/8/8/8/3K4/8 w - - 0 1
ERROR (white to move but black king in check)
white(1): setboard 8/8/8/8/8/1Kk5/8/1Q6 w - - 0 1
8/8/8/8/8/1Kk5/8/1Q6 w - - 0 1
ERROR (white to move but black king in check)
white(1): setboard 2p1P3/8/8/2k5/4K3/8/8/3p4 w - - 0 1
2p1P3/8/8/2k5/4K3/8/8/3p4 w - - 0 1
ERROR (pawn in row 1 or 8)
white(1): setboard 8/P7/P2k4/P7/P1P5/P7/P2K4/8 w - - 0 1
8/P7/P2k4/P7/P1P5/P7/P2K4/8 w - - 0 1
My parser also does not check if there are 10 bishops on the same field color like the following:
6B1/5B2/3kB1B1/3B1B2/2B1B3/1B1B4/3K4/8 w - - 0 1
Perhaps there could be other positions, which are not illegal, but it's not possible during a game to reach such positions.
The parser I posted will only count pieces and types and things of that nature. But you could have both kings in check or other clearly illegal positions and it will not recognize it. The only notion of the parser is to prevent some kinds of crashes and overwrites.
The code that I posted does not require that the EPD/FEN is converted into some kind of a board representation, where you can check for legality.
These are the things tested in the current version:

exactly one king of each color
between 0 and 10 black rooks
between 0 and 10 white rooks
between 0 and 10 black bishops
between 0 and 10 white bishops
between 0 and 10 black knights
between 0 and 10 white knights
between 0 and 9 black queens
between 0 and 9 white queens
between 0 and 8 black pawns
between 0 and 8 white pawns
exactly 7 row separators (/) and hence 8 rows
no rows wider than 8 files
16 or fewer white chessmen
16 or fewer black chessmen
zero or one black king in castling rights
zero or one white king in castling rights
zero or one black queen in castling rights
zero or one white queen in castling rights
zero or one 'no castling rights indicator' (-) and if it occurs, no king or queen castling is allowed
the e.p. square must be a valid e.p. target square for the color to move (but it does not check for a pawn to see if the move could be made or to see if there are any vulnerable pawns)
halfmove clock is a number from 0 to 99
fullmove number is a number from 1 to 6000

It is not very sophisticated, and has some design quirks that I am not proud of, but it serves the basic purpose.
Hi Dann,
you are right, for checking, if the opponent king is in check, you need a board presentation. The other checks you are doing, are the same than i do in my parser. For an illegal move number or an illegal halvmove clock i give out only a warning and change them to valid values "0 1", because AFAIK this data you have only in a FEN string but not in a EPD string.
You can also check if there is a pawn on row 1 or row 8 without a board presentation. Just look if there is a "p" or "P"-character before the first row separator "/" and the last row separator and before the first space character.
Andreas



wbholmes.de
Andreas Herrmann
 

Re: epd/fen parser with unit test...

Postby Andreas Herrmann » 30 Jun 2004, 02:25

Geschrieben von:/Posted by: Andreas Herrmann at 30 June 2004 03:25:24:
Als Antwort auf:/In reply to: Re: epd/fen parser with unit test... geschrieben von:/posted by: Uri Blass at 30 June 2004 02:51:10:
Hi Dann,
does your parser recognize the errors (illegal positions) in the following fen strings?
8/8/3k2R1/8/8/8/3K4/8 w - - 0 1
8/8/8/8/8/1Kk5/8/1Q6 w - - 0 1
2p1P3/8/8/2k5/4K3/8/8/3p4 w - - 0 1
8/P7/P2k4/P7/P1P5/P7/P2K4/8 w - - 0 1
The first three ones are handled correct by my engine, but not the last one. I'm not sure if the last FEN string is an illegal position, but i think it's not possible to get 6 pawns from the same side during a game to the a or the h line.
It is possible but the problem is that it is impossible to get another pawn
in the c file after you have 6 pawns in the a file.
Uri
right. What about the following ones:
r1nnk1br/P1bqpppp/P1pp2pp/P7/P7/P7/P2R4/3K4 w - - 0 1
5k2/8/8/8/8/PPPP4/PPPP4/2K5 w - - 0 1
Andreas
illegal
h7 h7 g7 or a2 a3 b2 are illegal pawn structure so both are illegal positions.
It does not prevent movei to analyze them.
Uri
be sure most chess programs, doesn't check such cases. Would be interesting, if the commercial chess programs are recognizing such illegal positions.
In the first position
r1nnk1br/P1bqpppp/P1pp2pp/P7/P7/P7/P2R4/3K4 w - - 0 1
i have also tryd to compose a position, where are more than one pawns in a line, but the opponent has all his pieces. Without capturing a piece, it's not possible to get 2 or more pawns in a line.
Andreas



wbholmes.de
Andreas Herrmann
 

Re: epd/fen parser with unit test...

Postby Dann Corbit » 30 Jun 2004, 02:43

Geschrieben von:/Posted by: Dann Corbit at 30 June 2004 03:43:23:
Als Antwort auf:/In reply to: Re: epd/fen parser with unit test... geschrieben von:/posted by: Andreas Herrmann at 30 June 2004 03:06:18:

[snip]
Hi Dann,
you are right, for checking, if the opponent king is in check, you need a board presentation. The other checks you are doing, are the same than i do in my parser. For an illegal move number or an illegal halvmove clock i give out only a warning and change them to valid values "0 1", because AFAIK this data you have only in a FEN string but not in a EPD string.
You can also check if there is a pawn on row 1 or row 8 without a board presentation. Just look if there is a "p" or "P"-character before the first row separator "/" and the last row separator and before the first space character.
Andreas
I added that after I saw your example positions.



my ftp site {remove http:// unless you like error messages}
Dann Corbit
 

What about this ten?

Postby Lyapko George » 30 Jun 2004, 16:27

Geschrieben von:/Posted by: Lyapko George at 30 June 2004 17:27:24:
Als Antwort auf:/In reply to: Re: epd/fen parser with unit test... geschrieben von:/posted by: Andreas Herrmann at 30 June 2004 03:25:24:

legal:1BK5/p1p4k/8/8/8/8/8/8 w - - 0 1
illegal:1BK5/ppp4k/8/8/8/8/8/8 w - - 0 1
legal:8/8/8/8/8/8/1PPPPPPP/5KNk w - - 0 1
illegal:8/8/8/8/8/8/PPPPPPPP/5KNk w - - 0 1
legal:8/8/8/8/8/8/5PPP/5KNk w - - 0 1
illegal:8/8/8/8/8/8/5PPP/5KBk w - - 0 1
legal:8/8/8/8/8/8/3PPP2/3KNk2 w - - 0 1
illegal:8/8/8/8/8/8/3PPP2/3KBk2 w - - 0 1
legal:8/8/8/8/8/8/PPPP4/RNBk3K w - - 0 1
illegal:8/8/8/8/8/8/PPPP4/QNBk3K w - - 0 1
Best regards,
George
Lyapko George
 

Re: What about this ten?

Postby Uri Blass » 30 Jun 2004, 17:03

Geschrieben von:/Posted by: Uri Blass at 30 June 2004 18:03:25:
Als Antwort auf:/In reply to: What about this ten? geschrieben von:/posted by: Lyapko George at 30 June 2004 17:27:24:
legal:1BK5/p1p4k/8/8/8/8/8/8 w - - 0 1
illegal:1BK5/ppp4k/8/8/8/8/8/8 w - - 0 1
legal:8/8/8/8/8/8/1PPPPPPP/5KNk w - - 0 1
illegal:8/8/8/8/8/8/PPPPPPPP/5KNk w - - 0 1
legal:8/8/8/8/8/8/5PPP/5KNk w - - 0 1
What is black last move before the diagram?
Same question
Uri
Uri Blass
 

Re: What about this ten?

Postby Andreas Herrmann » 30 Jun 2004, 17:08

Geschrieben von:/Posted by: Andreas Herrmann at 30 June 2004 18:08:51:
Als Antwort auf:/In reply to: Re: What about this ten? geschrieben von:/posted by: Uri Blass at 30 June 2004 18:03:25:
legal:1BK5/p1p4k/8/8/8/8/8/8 w - - 0 1
illegal:1BK5/ppp4k/8/8/8/8/8/8 w - - 0 1
legal:8/8/8/8/8/8/1PPPPPPP/5KNk w - - 0 1
illegal:8/8/8/8/8/8/PPPPPPPP/5KNk w - - 0 1
legal:8/8/8/8/8/8/5PPP/5KNk w - - 0 1
What is black last move before the diagram?
Same question
Uri
it was a Nullmove
Andreas



wbholmes.de
Andreas Herrmann
 

Re: What about this ten?

Postby Andreas Herrmann » 30 Jun 2004, 17:26

Geschrieben von:/Posted by: Andreas Herrmann at 30 June 2004 18:26:51:
Als Antwort auf:/In reply to: What about this ten? geschrieben von:/posted by: Lyapko George at 30 June 2004 17:27:24:

Hi George,
nice positions, but...
legal:1BK5/p1p4k/8/8/8/8/8/8 w - - 0 1
illegal:1BK5/ppp4k/8/8/8/8/8/8 w - - 0 1
legal:8/8/8/8/8/8/1PPPPPPP/5KNk w - - 0 1
illegal:8/8/8/8/8/8/PPPPPPPP/5KNk w - - 0 1
legal:8/8/8/8/8/8/5PPP/5KNk w - - 0 1
illegal:8/8/8/8/8/8/5PPP/5KBk w - - 0 1
legal:8/8/8/8/8/8/3PPP2/3KNk2 w - - 0 1
illegal:8/8/8/8/8/8/3PPP2/3KBk2 w - - 0 1
legal:8/8/8/8/8/8/PPPP4/RNBk3K w - - 0 1
illegal:8/8/8/8/8/8/PPPP4/QNBk3K w - - 0 1
Best regards,
George
how comes the white bishop to b8, whithout capturing a pawn?
Perhaps a new chess variant, where the Bishops can jump over pawns
last black move was a nullmove?
also a nullmove by black before?
also a nullmove by black before?
also a nullmove by black before?
Andreas



wbholmes.de
Andreas Herrmann
 

Re: What about this ten?

Postby Uri Blass » 30 Jun 2004, 18:41

Geschrieben von:/Posted by: Uri Blass at 30 June 2004 19:41:43:
Als Antwort auf:/In reply to: Re: What about this ten? geschrieben von:/posted by: Andreas Herrmann at 30 June 2004 18:26:51:
Hi George,
nice positions, but...
legal:1BK5/p1p4k/8/8/8/8/8/8 w - - 0 1
illegal:1BK5/ppp4k/8/8/8/8/8/8 w - - 0 1
legal:8/8/8/8/8/8/1PPPPPPP/5KNk w - - 0 1
illegal:8/8/8/8/8/8/PPPPPPPP/5KNk w - - 0 1
legal:8/8/8/8/8/8/5PPP/5KNk w - - 0 1
illegal:8/8/8/8/8/8/5PPP/5KBk w - - 0 1
legal:8/8/8/8/8/8/3PPP2/3KNk2 w - - 0 1
illegal:8/8/8/8/8/8/3PPP2/3KBk2 w - - 0 1
legal:8/8/8/8/8/8/PPPP4/RNBk3K w - - 0 1
illegal:8/8/8/8/8/8/PPPP4/QNBk3K w - - 0 1
Best regards,
George
how comes the white bishop to b8, whithout capturing a pawn?
Perhaps a new chess variant, where the Bishops can jump over pawns
last black move was a nullmove?
also a nullmove by black before?
also a nullmove by black before?
also a nullmove by black before?
Andreas
simply by underpromotion.
b7b8B
Uri
Uri Blass
 

Re: epd/fen parser with unit test...

Postby Pallav Nawani » 01 Jul 2004, 20:00

Geschrieben von:/Posted by: Pallav Nawani at 01 July 2004 21:00:46:
Als Antwort auf:/In reply to: epd/fen parser with unit test... geschrieben von:/posted by: Dann Corbit at 29 June 2004 23:56:22:

Hi dan,
What's the license for this code? Can I use it in my program?
Bye,
Pallav
Pallav Nawani
 


Return to Archive (Old Parsimony Forum)

Who is online

Users browsing this forum: No registered users and 21 guests