BozoChess Monday release schedule

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

BozoChess Monday release schedule

Post by sje » Mon Dec 12, 2011 9:53 pm

On every Monday, I ask myself if enough improvements have been made to BozoChess to justify a source release.

On this Monday, the program can now play real chess (but not very well) and while some features are missing, there are no known bugs with those which are present. So I've emailed a copy of the Pascal source to those who've gotten earlier versions. Also, I can send a copy to anyone else who might want to review and experiment; just let me know.

The BozoChess 2011.12.12 source is 13,062 lines long and about 375 KB in size. A free Pascal compiler can be had from the http://www.freepascal.org/download.var web page.

A sample game at blitz speed:

Code: Select all

[Event "Unknown event"]
[Site "Unknown site"]
[Date "2011.12.12"]
[Round "-"]
[White "Unknown player"]
[Black "Unknown player"]
[Result "1/2-1/2"]

1 Nf3 Nf6 2 d4 d5 3 Nc3 Bf5 4 Bf4 Nh5 5 Be3 Nf6 6 Nh4 Be6 7 Qd3 a6 8 g3 Nc6 9 Bg2 g6 10 O-O Bg7 11
h3 Qd7 12 Kh2 h6 13 f4 Nb4 14 Qd2 Nc6 15 a3 Ne4 16 Qd3 g5 17 Nf3 gxf4 18 Bxf4 Nxc3 19 Qxc3 O-O 20
Ne5 Nxe5 21 dxe5 a5 22 g4 Qb5 23 Qxc7 Rfc8 24 Qxe7 Rxc2 25 Bf3 Qxb2 26 Rab1 Qd4 27 Bg3 Bxe5 28 Rxb7
Rac8 29 Bxe5 Qxe5+ 30 Kg2 d4 31 Re1 d3 32 Qh4 dxe2 33 Qg3 Qe3 34 a4 Qd4 35 g5 h5 36 g6 f5 37 Qg5
R2c7 38 Rxc7 Rxc7 39 Rxe2 Bc4 40 Re8+ Kg7 41 Qxf5 Qd6 42 Qxh5 Qxg6+ 43 Qxg6+ Kxg6 44 Re5 Ra7 45 Bd5
Bd3 46 Kg3 Bc2 47 Bc6 Kf6 48 Rh5 Rc7 49 Bf3 Rc3 50 Rh6+ Ke7 51 Rc6 Rxc6 52 Bxc6 Kd6 53 Bb5 Kc5 54
h4 Bd1 55 Bd3 Kd5 56 Bg6 Bxa4 57 h5 Ke5 58 h6 Kf6 59 h7 Kg7 60 Be4 Bd7 61 Kf4 a4 62 Ke5 a3 63 Bb1
Kh8 64 Ba2 Kxh7 65 Kd6 Bf5 66 Kc5 Be4 67 Kb4 Kh6 68 Kxa3 1/2-1/2

User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 2:27 pm

Re: BozoChess Monday release schedule

Post by Don » Mon Dec 12, 2011 10:17 pm

I hope you have not already answered this question, but just out of curiosity I was wondering why you chose Pascal?

I have a warm spot in my heart for Pascal as it was my first compiled language, the $50 Turbo Pascal from Borland and it was a wonder to behold coming from interpreted basic. Any given program was something like 40 or 50x faster when written in Pascal.

So why Pascal over C or C++? Just a preference? Surely you give up some performance for this choice, although I know Pascal these days is still pretty fast.

Don


sje wrote:On every Monday, I ask myself if enough improvements have been made to BozoChess to justify a source release.

On this Monday, the program can now play real chess (but not very well) and while some features are missing, there are no known bugs with those which are present. So I've emailed a copy of the Pascal source to those who've gotten earlier versions. Also, I can send a copy to anyone else who might want to review and experiment; just let me know.

The BozoChess 2011.12.12 source is 13,062 lines long and about 375 KB in size. A free Pascal compiler can be had from the http://www.freepascal.org/download.var web page.

A sample game at blitz speed:

Code: Select all

[Event "Unknown event"]
[Site "Unknown site"]
[Date "2011.12.12"]
[Round "-"]
[White "Unknown player"]
[Black "Unknown player"]
[Result "1/2-1/2"]

1 Nf3 Nf6 2 d4 d5 3 Nc3 Bf5 4 Bf4 Nh5 5 Be3 Nf6 6 Nh4 Be6 7 Qd3 a6 8 g3 Nc6 9 Bg2 g6 10 O-O Bg7 11
h3 Qd7 12 Kh2 h6 13 f4 Nb4 14 Qd2 Nc6 15 a3 Ne4 16 Qd3 g5 17 Nf3 gxf4 18 Bxf4 Nxc3 19 Qxc3 O-O 20
Ne5 Nxe5 21 dxe5 a5 22 g4 Qb5 23 Qxc7 Rfc8 24 Qxe7 Rxc2 25 Bf3 Qxb2 26 Rab1 Qd4 27 Bg3 Bxe5 28 Rxb7
Rac8 29 Bxe5 Qxe5+ 30 Kg2 d4 31 Re1 d3 32 Qh4 dxe2 33 Qg3 Qe3 34 a4 Qd4 35 g5 h5 36 g6 f5 37 Qg5
R2c7 38 Rxc7 Rxc7 39 Rxe2 Bc4 40 Re8+ Kg7 41 Qxf5 Qd6 42 Qxh5 Qxg6+ 43 Qxg6+ Kxg6 44 Re5 Ra7 45 Bd5
Bd3 46 Kg3 Bc2 47 Bc6 Kf6 48 Rh5 Rc7 49 Bf3 Rc3 50 Rh6+ Ke7 51 Rc6 Rxc6 52 Bxc6 Kd6 53 Bb5 Kc5 54
h4 Bd1 55 Bd3 Kd5 56 Bg6 Bxa4 57 h5 Ke5 58 h6 Kf6 59 h7 Kg7 60 Be4 Bd7 61 Kf4 a4 62 Ke5 a3 63 Bb1
Kh8 64 Ba2 Kxh7 65 Kd6 Bf5 66 Kc5 Be4 67 Kb4 Kh6 68 Kxa3 1/2-1/2

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

Re: BozoChess Monday release schedule

Post by sje » Tue Dec 13, 2011 2:16 am

Don wrote:I hope you have not already answered this question, but just out of curiosity I was wondering why you chose Pascal?

I have a warm spot in my heart for Pascal as it was my first compiled language, the $50 Turbo Pascal from Borland and it was a wonder to behold coming from interpreted basic. Any given program was something like 40 or 50x faster when written in Pascal.

So why Pascal over C or C++? Just a preference? Surely you give up some performance for this choice, although I know Pascal these days is still pretty fast.
I wanted to provide an open source, educational chess program written in a well supported portable language which itself was designed for pedagogical purposes. Pascal has all the good stuff of ANSI C++ plus better control flow structure and lexically scoped routines. It is easy for a student to read a single file Pascal source from top to bottom than to attempt the same in any other language.

The Atkin/Frey Chess 0.5 program from 1978 was a good attempt. But in the third of a century since then, Pascal has improved in many ways and has better standard support and portability. Chess programs have gotten better as well including better search techniques, better evaluation ideas, and use of data interchange format standards for interoperability. It's time for an update.

Here's a game played at a minute per move:

Code: Select all

[Event "Unknown event"]
[Site "Unknown site"]
[Date "2011.12.12"]
[Round "-"]
[White "Unknown player"]
[Black "Unknown player"]
[Result "1-0"]

1 Nc3 Nf6 2 e4 d5 3 exd5 Nxd5 4 Nf3 Nc6 5 d4 Bf5 6 Bd3 Nxc3 7 bxc3 Qd5 8 Rb1 e6 9 Bxf5 exf5 10 Bf4
O-O-O 11 Qd3 g6 12 a4 Bd6 13 Bxd6 Rxd6 14 O-O Re8 15 Qb5 Qxb5 16 axb5 Nd8 17 Ra1 Kb8 18 c4 Re2 19
c3 c6 20 bxc6 Rxc6 21 c5 Rc2 22 Rac1 Rxc1 23 Rxc1 f6 24 h3 Ne6 25 h4 Nf4 26 Kf1 Ra6 27 g3 Ne6 28
Kg2 f4 29 Re1 fxg3 30 fxg3 Kc8 31 c6 Nc7 32 cxb7+ Kxb7 33 c4 Ra2+ 34 Kh3 Rc2 35 Re7 Rxc4 36 Rxh7
Rc3 37 Kg2 Rc2+ 38 Kf1 Rc1+ 39 Ke2 Rc2+ 40 Nd2 f5 41 Rg7 Rc6 42 d5 Rd6 43 Nc4 Rxd5 44 Rxg6 Nb5 45
Ne3 Nc3+ 46 Ke1 Re5 47 Kf2 Ne4+ 48 Kf3 Nd2+ 49 Kf2 Ne4+ 50 Kg2 Nd2 51 Rd6 Rxe3 52 Rxd2 Kc6 53 Rd8
Re5 54 Kf3 Rd5 55 Ra8 a5 56 h5 Kb7 57 Rf8 f4 58 g4 Rd4 59 Rxf4 Rd7 60 g5 Rd8 61 g6 Rd3+ 62 Kg2 Rd5
63 Rf7+ Kb6 64 g7 Rg5+ 65 Kf2 a4 66 h6 Rh5 67 g8=Q Rh2+ 68 Kg1 Rxh6 69 Qd8+ Ka6 70 Qc8+ Kb5 71 Rf5+
Kb4 72 Qc5+ Kb3 73 Rf3+ Kb2 74 Qc3+ Ka2 75 Qc2+ Ka1 76 Ra3# 1-0

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

Another game; this one at 180 seconds/move

Post by sje » Tue Dec 13, 2011 9:08 am

Here's another sample auto play game; this one at 180 seconds/move:

Code: Select all

[Event "Unknown event"]
[Site "Unknown site"]
[Date "2011.12.12"]
[Round "-"]
[White "Unknown player"]
[Black "Unknown player"]
[Result "1-0"]

1 e4 e5 2 Nc3 Nc6 3 Nf3 Nf6 4 d4 exd4 5 Nxd4 Bc5 6 Be3 Nxd4 7 Bxd4 Qe7 8 Bc4 d6 9 O-O O-O 10 Re1
Bg4 11 Bxf6 Qd7 12 Qd3 gxf6 13 Nd5 Kg7 14 Qc3 Qd8 15 Qg3 f5 16 exf5 Qg5 17 h3 Qxf5 18 Nxc7 Rac8 19
Bd3 Bxf2+ 20 Qxf2 Qxf2+ 21 Kxf2 Bd7 22 Nd5 Rfe8 23 Ne7 Rc5 24 g4 Kf8 25 Nf5 Rc6 26 Rxe8+ Bxe8 27 b3
d5 28 Ne3 Rh6 29 Nxd5 Rxh3 30 Nf6 h5 31 gxh5 Bc6 32 Ke2 Bf3+ 33 Kf2 Bc6 34 Rf1 Rf3+ 35 Kg1 Kg7 36
Rxf3 Bxf3 37 Be4 Bxe4 38 Nxe4 Kh6 39 Nd6 Kxh5 40 Nxf7 b6 41 Nd6 a6 42 c4 Kg5 43 c5 bxc5 44 Ne4+ Kf5
45 Nxc5 a5 46 Nb7 a4 47 bxa4 Ke6 48 a5 Kd7 49 Nc5+ Kc6 50 a6 Kb6 51 a4 Ka7 52 a5 Ka8 53 Ne6 Ka7 54
Nc7 Kb8 55 Nb5 Ka8 56 Kf2 Kb8 57 Ke3 Ka8 58 Kd4 Kb8 59 Kc5 Kc8 60 Nd6+ Kb8 61 Kb6 Ka8 62 Nb5 Kb8 63
a7+ Kc8 64 a8=Q+ Kd7 65 Qe4 Kd8 66 Kc6 Kc8 67 Qe8# 1-0
At this time:

1) There is no opening book.

2) There are no king scoring terms in the evaluation function.

3) There are no pawn scoring terms in the evaluation function.

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

The name change

Post by sje » Fri Dec 16, 2011 7:19 pm

As I promised back in early October, I'm changing the name of the project as the program is starting to play somewhat decent chess. Also, I don't want to worry about possible copyright problems with the old name, even if it was given in jest.

So from here on out, the program's name is CookieCat. Why? Well, many good names like TreeFrog and IronFish have already been taken. And CookieCat should be easily searchable on the net without too many false positives.

In other news:

1) CookieCat now runs the generate/execute/retract machinery abut seven percent faster than before, at least on a 64 bit CPU.

2) I've found a couple of compiler bugs and have coded around them. If the CookieCat source were smaller, I'd submit bug reports or maybe fix the compiler bugs myself as I have the compiler sources.

3) CookieCat has five different transposition tables. One of them is the prft table, used only by the perft subsystem. The other four are used (or will be used) by the search: eval (evaluation), main (traditional), pawn (pawn structure), and tbas (tablebase probe results).

4) The incrementally updated material signature routines are present and working. These are needed for fast tablebase probing.

5) The tablebase initialization code is present and working. This took much longer than expected, but the result is both general and fast. The general part is that the code can handle upper limits on class size from 2 to 10 men without any hard coded class information. The fast part is the binary probe of the tablebase signature table. The difficulty in writing the initialization code came from the work needed to generate all the tablebase names without misses, duplications, of malformations. The unsavory alternative would have been a boatload of explicit array element initializations.

6) Next for tablebase support: file I/O operations, file seek position offset generation, score decoding, and integration with the tbas transposition table. There is not a lot of code here, but it is largely specific to the flavor of tablebase files in use. For now, this isolated code will handle only my tablebase format, but it could be changed to handle other formats.

I hope to send out a new release on Monday, Dec 19th.

Post Reply