Announcement: The Bozochess Project

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

Some advances

Post by sje » Wed Oct 26, 2011 10:25 am

Some advances:

1) Bozo now has all of its I/O traffic gated through a only a few routines instead of having write/writeln calls scattered throughout the code. There are several reasons for this including the possibility of adding a thread-safe log file generator and performing internal I/O redirection or cloning. The retreat is that the fancy "rgstat" output format is gone; a simple version is back in place.

2) Bozo can now correctly do FEN I/O to a user specified file. Alas, while there is full data checking, there is no file I/O checking. This will be added later. One problem with file I/O is that every Pascal system treats it differently and I have to pick the calls limited to the intersection of different functionality.

3) Bozo can now correctly do PGN output to a user specified file, but as is the case with FEN, there are no file I/O error checks yet. Bozo does not yet handle PGN input from a file; this will have to wait until after the initial release.

4) Console command input has only a single readln() call. This is done in part to simplify the addition of recursive (and parametrized) batch command file invocation, a very helpful feature. But completion of such will not appear in the initial release.

5) The ICP "help" command output is now entirely table driven as it should have been in the first place.

6) The word "Insufficient" is now spelled correctly.

Five more days until the source release.

Here's the latest ICP command set:

Code: Select all

BozoChess 2011.10.26   Copyright (C) 2011 by S. J. Edwards
BozoChess ready

[] help
Enter a command, or a sequence of one or more SAN chess moves 
  Commands:
    db         Display board (ANSI color)
    dbbdb      Display bitboard database
    dbmono     Display board (monochrome)
    dfen       Display FEN
    dm         Display moves
    dp         Display position
    dpgn       Display PGN
    exit       Exit program
    help       Show help
    loadfen    Load FEN from a <file>
    loadpgn    Load PGN from a <file>
    new        New game
    noop       No operation
    perftbulk  Run perft to <depth> with bulk counting
    perftfull  Run perft to <depth> with each node visited
    perfttran  Run perft to <depth> with transposition help
    rg         Generate and display a single random game
    rgstat     Generate a report for <number> random game&#40;s&#41;
    rm         Retract move
    savefen    Save FEN to a <file>
    savepgn    Save PGN to a <file>
    sfen       Set FEN <MPD> <good> <cavs> <epsq> <hmvc> <fmvn>
    test       Run developer test
&#91;&#93; exit

BozoChess done
The newly simplified rgstat output:

Code: Select all

&#91;&#93; rgstat 100000
Checkmate 15610
FiftyMoves 19105
Insufficient 56711
Repetition 2521
Stalemate 6053
Unterminated 0
Total 100000
&#91;&#93; exit

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

Some minor additions

Post by sje » Thu Oct 27, 2011 7:10 pm

Some minor additions:

1) The overall formatted operations have been further streamlined to more easily adapt to one-line-at-a-time regime for log file and dribble file generation.

2) More PGN tags are supported including the "Date" tag that needs some external Pascal unit help for accessing date and time information. There is a concern here that what I might use some system feature that works fine under Free Pascal but won't work under a different compiler or platform. And that's one reason I need testers.

3) The "rg" random game generator now uses the upgraded PGN encoder. This includes support for the tags "EndFEN", "Termination", and PlyCount". More to come on this.

4) I've swapped in my own pseudo random number generator. The program uses one instance to produce the Zobrist hash codes and another instance for everything else. The hash code generator instance gives the same codes each time and for each platform as is a requirement for an external, independent, hash-indexed opening book library. The other instance gives a different sequence on each program invocation.

Four more days until the source release.

Sample "rg" transcript:

Code: Select all

&#91;&#93; rg
&#91;Event "Random Game"&#93;
&#91;Site "Unknown site"&#93;
&#91;Date "2011.10.27"&#93;
&#91;Round "-"&#93;
&#91;White "Random player"&#93;
&#91;Black "Random player"&#93;
&#91;Result "0-1"&#93;
&#91;EndFEN "6rK/p4q2/P7/2k5/3p3p/2r5/8/8 w - - 6 119"&#93;
&#91;Termination "Checkmate"&#93;
&#91;PlyCount "236"&#93;

1 b4 h5 2 d4 Nc6 3 Nd2 f6 4 e3 Nb8 5 Ndf3 b6 6 g4 Ba6 7 Kd2 Rh6 8 Rb1 Bc8 9 c3 Na6 10 Bb5 Nc5 11
Qc2 Nd3 12 Bb2 Bb7 13 Ne2 Bc6 14 h4 Bxb5 15 e4 Qb8 16 d5 Bc4 17 Ba1 Nxf2 18 Qb3 c6 19 Kc1 Bd3 20
Ned4 e5 21 Nh2 c5 22 Nf5 Bxb1 23 d6 Nx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Ka2 Rh4 195 Ba4
Kf3 196 Ka1 Kg2 197 Bb5 Rg4 198 Bc4 Rh4 199 Bd5+ Kf2 200 Bh1 Re4 201 Ka2 Ke1 202 Kb3 Rf4 203 Bb7
Ra4 204 Bh1 Rh4 205 Bb7 Ra4 206 Bh1 Ra1 207 Bb7 Ra4 1/2-1/2

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

Three more days

Post by sje » Sat Oct 29, 2011 3:55 am

Three more days until the BozoChess source release.

As mentioned in other threads, there has been work done on the random game generation and the self test facility. I'm now putting the final touches on the PGN subsystem which will be complete except for decoding PGN files.

Alas, there is a big-ass snowstorm heading my way and I expect to lose power by late Saturday, so the release might be delayed. If this happens, I'll do the release soon after the electricity is restored.

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

Two more days, at least

Post by sje » Sat Oct 29, 2011 11:28 pm

Two more days (at least) until the release. I say "at least" as the houses on the west end of my street have all gone dark because of storm-related power failure and I expect to lose power here soon.

Bozo's PGN code now understands games that started from other than the initial array and so can continue and encode these correctly.

The program is gaining a better understanding of time at the expense of potentially greater compiler/platform dependencies. The basic time unit is the nanosecond and is expressed internally as a 64 bit signed integer. The CompTime record type presents an unsigned nanosecond count in terms of days, hours, minutes, seconds, and nanoseconds stored modular-wise (DDD:HH:MM:SS.nnnnnnnnn); this is encoded only to the millisecond level for sake of brevity.

When playing or retracting a move, Bozo now prints the string "Playing" or "Unplaying" followed by the numbered move with an ellipsis added as a number suffix for a move by Black.

In-source compiler options appear prior to the program declaration in Pascal style. Only three of these are explicitly present for now, more might be added later. Such options are generally compiler dependent:

Code: Select all

&#123;$C+ Assertions &#125;
&#123;$H- Ansistrings &#125;
&#123;$R+ Range checking &#125;

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

Re: Announcement: The Bozochess Project

Post by sje » Tue Nov 01, 2011 11:13 pm

Sorry for missing the release date: I lost power during the storm and just got back online. I'll report more when I get the machines fixed up from their current scrambled state.

I hope to have things fixed up soon for a new release date of Monday November 7th.

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

Current perft records for self testing

Post by sje » Wed Nov 02, 2011 12:57 am

Thanks to all who have contributed FEN perft records for self testing. I have sixteen so far, and room for more.

Here's the current list:

Code: Select all

      SetStpr&#40; 0, 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1',             20,  400,  8902&#41;;
      SetStpr&#40; 1, '2qrr1n1/3b1kp1/2pBpn1p/1p2PP2/p2P4/1BP5/P3Q1PP/4RRK1 w - - 0 1',       44,  833, 35770&#41;;
      SetStpr&#40; 2, 'r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1', 48, 2039, 97862&#41;;
      SetStpr&#40; 3, '8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1',                            14,  191,  2812&#41;;
      SetStpr&#40; 4, 'r3k2r/Pppp1ppp/1b3nbN/nP6/BBP1P3/q4N2/Pp1P2PP/R2Q1RK1 w kq - 0 1',      6,  264,  9467&#41;;
      SetStpr&#40; 5, 'r2q1rk1/pP1p2pp/Q4n2/bbp1p3/Np6/1B3NBn/pPPP1PPP/R3K2R b KQ - 0 1',      6,  264,  9467&#41;;
      SetStpr&#40; 6, 'rnbqkb1r/ppppp1pp/7n/4Pp2/8/8/PPPP1PPP/RNBQKBNR w KQkq f6 0 1',        31,  570, 17546&#41;;
      SetStpr&#40; 7, '8/3k4/8/4b3/1p1p1p2/8/1PPRP2K/8 w - - 0 1',                            12,  197,  2696&#41;;
      SetStpr&#40; 8, '8/4rP2/8/8/4pk2/8/3P2PP/4K2R w K - 0 1',                               17,  182,  3232&#41;;
      SetStpr&#40; 9, 'rnb1kbnr/pp1ppppp/8/8/q1p4K/5P2/PPPPP1PP/RNBQ1BNR w kq - 2 5',         21,  607, 12644&#41;;
      SetStpr&#40;10, 'rnbq1bnr/pppp1ppp/3kp3/3P4/1B6/8/PPP1PPPP/RN1QKBNR b KQ - 2 4',         2,   63,  1721&#41;;
      SetStpr&#40;11, 'n1n5/PPPk4/8/8/8/8/4Kppp/5N1N b - - 0 1',                              24,  496,  9483&#41;;
      SetStpr&#40;12, '8/p7/8/1P6/K1k3p1/6P1/7P/8 w - - 0 1',                                  5,   39,   237&#41;;
      SetStpr&#40;13, 'r3k2r/p6p/8/B7/1pp1p3/3b4/P6P/R3K2R w KQkq - 0 1',                     17,  341,  6666&#41;;
      SetStpr&#40;14, '8/5p2/8/2k3P1/p3K3/8/1P6/8 b - - 0 1',                                  9,   85,   795&#41;;
      SetStpr&#40;15, 'r3k2r/pb3p2/5npp/n2p4/1p1PPB2/6P1/P2N1PBP/R3K2R b KQkq - 0 1',         29,  953, 27990&#41;

mike_bike_kite
Posts: 98
Joined: Mon Jul 25, 2011 10:18 pm
Location: London
Contact:

Re: Current perft records for self testing

Post by mike_bike_kite » Wed Nov 02, 2011 7:17 pm

Have you considered just writing a simple blog rather than posting on a discussion forum?

User avatar
Ajedrecista
Posts: 1401
Joined: Wed Jul 13, 2011 7:04 pm
Location: Madrid, Spain.
Contact:

Re: Current perft records for self testing.

Post by Ajedrecista » Wed Nov 02, 2011 7:32 pm

Hello Steven:
sje wrote:Thanks to all who have contributed FEN perft records for self testing. I have sixteen so far, and room for more.

Here's the current list:

Code: Select all

      SetStpr&#40; 0, 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1',             20,  400,  8902&#41;;
      SetStpr&#40; 1, '2qrr1n1/3b1kp1/2pBpn1p/1p2PP2/p2P4/1BP5/P3Q1PP/4RRK1 w - - 0 1',       44,  833, 35770&#41;;
      SetStpr&#40; 2, 'r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1', 48, 2039, 97862&#41;;
      SetStpr&#40; 3, '8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1',                            14,  191,  2812&#41;;
      SetStpr&#40; 4, 'r3k2r/Pppp1ppp/1b3nbN/nP6/BBP1P3/q4N2/Pp1P2PP/R2Q1RK1 w kq - 0 1',      6,  264,  9467&#41;;
      SetStpr&#40; 5, 'r2q1rk1/pP1p2pp/Q4n2/bbp1p3/Np6/1B3NBn/pPPP1PPP/R3K2R b KQ - 0 1',      6,  264,  9467&#41;;
      SetStpr&#40; 6, 'rnbqkb1r/ppppp1pp/7n/4Pp2/8/8/PPPP1PPP/RNBQKBNR w KQkq f6 0 1',        31,  570, 17546&#41;;
      SetStpr&#40; 7, '8/3k4/8/4b3/1p1p1p2/8/1PPRP2K/8 w - - 0 1',                            12,  197,  2696&#41;;
      SetStpr&#40; 8, '8/4rP2/8/8/4pk2/8/3P2PP/4K2R w K - 0 1',                               17,  182,  3232&#41;;
      SetStpr&#40; 9, 'rnb1kbnr/pp1ppppp/8/8/q1p4K/5P2/PPPPP1PP/RNBQ1BNR w kq - 2 5',         21,  607, 12644&#41;;
      SetStpr&#40;10, 'rnbq1bnr/pppp1ppp/3kp3/3P4/1B6/8/PPP1PPPP/RN1QKBNR b KQ - 2 4',         2,   63,  1721&#41;;
      SetStpr&#40;11, 'n1n5/PPPk4/8/8/8/8/4Kppp/5N1N b - - 0 1',                              24,  496,  9483&#41;;
      SetStpr&#40;12, '8/p7/8/1P6/K1k3p1/6P1/7P/8 w - - 0 1',                                  5,   39,   237&#41;;
      SetStpr&#40;13, 'r3k2r/p6p/8/B7/1pp1p3/3b4/P6P/R3K2R w KQkq - 0 1',                     17,  341,  6666&#41;;
      SetStpr&#40;14, '8/5p2/8/2k3P1/p3K3/8/1P6/8 b - - 0 1',                                  9,   85,   795&#41;;
      SetStpr&#40;15, 'r3k2r/pb3p2/5npp/n2p4/1p1PPB2/6P1/P2N1PBP/R3K2R b KQkq - 0 1',         29,  953, 27990&#41;
I have checked all these FEN strings with JetChess and I did not found any error or typo, so good job! But I do not reply for this... I found an issue:

https://sites.google.com/site/numptyche ... position-5

In this position I recommended you (the last one of your code box, number 15), there is something wrong: the image of the position matches with the FEN string posted below... but the perft values given on Numpty web are wrong: they correspond with the same position, but replacing the black pawn on g6 to a black pawn on g7. I mean:

Code: Select all

r3k2r/pb3p2/5npp/n2p4/1p1PPB2/6P1/P2N1PBP/R3K2R b KQkq -
Perft&#40;1&#41; = 29; Perft&#40;2&#41; = 953; Perft&#40;3&#41; = 27,990.

r3k2r/pb3pp1/5n1p/n2p4/1p1PPB2/6P1/P2N1PBP/R3K2R b KQkq -
Perft&#40;1&#41; = 30; Perft&#40;2&#41; = 986; Perft&#40;3&#41; = 29,777.
I say this just in case someone wants to check your results with the ones posted on Numpty web and thinks that something is wrong with your perft counter implemented in BozoChess. Tip: please check the second FEN I give in the code box, just in case... but I think that, if you managed to count all the positions flawlessly, this should not be an exception.

I am sorry for the storms there... as we say in Spain: después de la tempestad viene la calma (after the storm comes the calm). Good luck!

Regards from Spain.

Ajedrecista.

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

Re: Current perft records for self testing.

Post by sje » Thu Nov 03, 2011 12:47 am

Thank you for the update on position 15:

Code: Select all

SetStpr&#40;15, 'r3k2r/pb3pp1/5n1p/n2p4/1p1PPB2/6P1/P2N1PBP/R3K2R b KQkq - 0 1',        30,  986, 29777&#41;

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

The current command set

Post by sje » Thu Nov 03, 2011 1:10 am

Here's the current command set:

Code: Select all

&#91;&#93; help
Enter a command, or a sequence of one or more SAN chess moves 
  Commands&#58;
    bench      Run the benchmark
    d          Display everything
    db         Display board &#40;ANSI color&#41;
    dbbdb      Display bitboard database
    dbmono     Display board &#40;monochrome&#41;
    dfen       Display FEN
    dm         Display moves
    dp         Display position
    dpgn       Display PGN
    echo       Echo parameters
    exit       Exit program
    go         Search for a move and then play it
    gogame     Play both sides until the end of the game
    help       Show help
    loadfen    Load FEN from a <file>
    loadpgn    Load PGN from a <file>
    mate       Search for a checkmate in <n> full moves
    new        New game
    noop       No operation
    perftbulk  Run perft to <depth> with bulk counting
    perftfull  Run perft to <depth> with each node visited
    perfttran  Run perft to <depth> with transposition help
    rg         Generate and display a single random game
    rgdump     Generate <number> random game&#40;s&#41; and dump to a <file>
    rgstat     Generate a report for <number> random game&#40;s&#41;
    rm         Retract move
    savefen    Save FEN to a <file>
    savepgn    Save PGN to a <file>
    selftest   Run the self test
    sfen       Set FEN <MPD> <good> <cavs> <epsq> <hmvc> <fmvn>
    stag       Set PGN <tagname> to <tagvalue>
    test       Run developer test
Not yet implemented: bench, go, gogame, loadpgn, mate, and stag.

The "mate" command does correctly report if there is a mate in N, but not very efficiently nor does it give the PV.

Code: Select all

&#91;&#93; sfen 1B1bk3/7R/1r5p/1Pp1p3/2NP1N2/1RP2Pp1/2QK4/8 w - - 2 52
&#91;&#93; mate 1
Node count&#58; 5
Predicted score&#58; Even
&#91;&#93; mate 2
Node count&#58; 369
Predicted score&#58; Even
&#91;&#93; mate 3
Node count&#58; 34224
Predicted score&#58; Even
&#91;&#93; mate 4
Node count&#58; 645271
Predicted score&#58; MateIn4
In other news:

1) The high speed checking move marker is in place. This makes the check and checkmate notation routines much, much faster.

2) The PosGenOnlyChecks routine is halfway there; it calls the PosGenerate routine and the the fast check marker to output only checking moves. Later, it will generate checking moves directly.

3) Joerg Oster has reported successful operation of the pre-release October 28th version under Windows 7 64 bit. This is very useful information as I have no access to a Windows machine.

4) I've changed the base time resolution from one nanosecond to one microsecond due to library and portability concerns. If everyone had a Mac OS/X or Linux box, using nanoseconds would not be a problem. But I want to make the source as portable as I can and this means all or nearly all of the Free Pascal target platforms:

Processors (Intel x86, Amd64/x86_64, PowerPC, PowerPC64, Sparc, and ARM)

Operating systems (Linux, FreeBSD, Haiku, Mac OS X/Darwin, DOS, Win32, Win64, WinCE, OS/2, Netware (libc and classic) and MorphOS)

Also, the Java Virtual Machine.

Post Reply