CookieCat retouched

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

CookieCat retouched

Post by Roland Chastain »

Hello!

Some days ago I discovered CookieCat, the Pascal chess program by Steven Edwards.

I began to study it and to dream of what I could do with it: make a GUI for it, write an UCI or a WinBoard interface...

I noticed that the program had a memory leak. With a little patience, I was lucky enough to find the origin of the memory leak and to fix it. So I thought that it would be a good idea to share the modified source code.

Here is where you can get it:
https://github.com/rchastain/cookiecat

As I said, I would like in the future to make some more important modifications. One of my wishes for 2020 is to learn the WinBoard protocol, so why not a WinBoard interface for CookieCat?

In his to do list, the author speaks of a "SCI (Simple Chess Interface) command processor". I asked to Google what it is and found nothing. Have you ever heard of that protocol?

Regards.

Roland
Qui trop embrasse mal étreint.
mar
Posts: 2559
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: CookieCat retouched

Post by mar »

Nice of you to carry on Steven's legacy.

CECP support would be very nice, we could even see CookieCat in rating lists.
I'm sure hgm can answer any of your questions regarding the xboard protocol.

I don't know about SCI, perhaps something internal to CookieCat?

Good luck with the project.
Martin Sedlak
User avatar
Guenther
Posts: 4610
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: CookieCat retouched

Post by Guenther »

bump... ;)
https://rwbc-chess.de

trollwatch:
Talkchess nowadays is a joke - it is full of trolls/idiots/people stuck in the pleistocene > 80% of the posts fall into this category...
User avatar
Guenther
Posts: 4610
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: CookieCat retouched

Post by Guenther »

Finally it happened :)

CookieCat 2012.10.10 rc1 'released' a few days ago
https://github.com/En-En-Code/cookiecat

Compilations + some xboard-interface and time management added by user 'En-En-Code'
(thanks also to Roland, who had fixed a memory leak already before)
https://rwbc-chess.de

trollwatch:
Talkchess nowadays is a joke - it is full of trolls/idiots/people stuck in the pleistocene > 80% of the posts fall into this category...
Dann Corbit
Posts: 12542
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: CookieCat retouched

Post by Dann Corbit »

nice!
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
AdminX
Posts: 6340
Joined: Mon Mar 13, 2006 2:34 pm
Location: Acworth, GA

Re: CookieCat retouched

Post by AdminX »

Thanks.

[pgn] [Event "?"] [Site "?"] [Date "2023.09.21"] [Round "?"] [White "CookieCat v.2012.10.10"] [Black "Pigeon 1.5.1"] [Result "1/2-1/2"] [ECO "D85"] [GameDuration "00:12:28"] [GameEndTime "2023-09-21T08:16:38.611 EDT"] [GameStartTime "2023-09-21T08:04:10.570 EDT"] [Opening "Gruenfeld"] [PlyCount "107"] [TimeControl "40/300"] [Variation "Exchange variation"] 1. d4 {book} Nf6 {book} 2. c4 {book} g6 {book} 3. Nc3 {book} d5 {book} 4. cxd5 {book} Nxd5 {book} 5. Bd2 {book} Bg7 {book} 6. e4 {book} Nxc3 {book} 7. Bxc3 {book} c5 {book} 8. d5 {book} Bxc3+ {book} 9. bxc3 {book} O-O {book} 10. Qd2 {book} Nd7 {book} 11. g4 {-0.04/10 15s} Ne5 {+0.03/8 10s} 12. g5 {-0.01/8 14s} Bg4 {+0.04/8 2.7s} 13. Qc2 {-0.08/9 14s} Nf3+ {+0.46/8 3.6s} 14. Nxf3 {-0.08/9 13s} Bxf3 {+0.36/9 7.5s} 15. Rg1 {-0.04/8 12s} Qd6 {+0.30/9 10.0s} 16. Rg3 {-0.04/8 12s} Qf4 {+0.34/8 2.5s} 17. Bg2 {-0.14/8 11s} Bxg2 {+0.42/9 6.4s} 18. Rxg2 {-0.13/8 10s} e6 {+0.41/8 4.8s} 19. dxe6 {-0.05/8 9.9s} Rae8 {+0.53/9 6.1s} 20. exf7+ {-0.17/9 9.5s} Rxf7 {+0.37/10 9.2s} 21. Kf1 {-0.16/9 9.0s} Rxe4 {+0.37/8 3.0s} 22. Rd1 {-0.20/7 8.5s} Re5 {+0.42/8 6.4s} 23. Qd3 {-1.02/8 8.1s} Re3 {+1.01/8 3.6s} 24. Qd6 {-1.06/8 7.7s} Qf3 {+1.14/8 2.4s} 25. Qd8+ {-1.03/10 7.3s} Kg7 {+1.26/10 5.3s} 26. Qd2 {-1.03/8 7.0s} Rfe7 {+1.26/8 3.2s} 27. Rg3 {-1.09/9 6.6s} Qh1+ {+0.62/9 3.5s} 28. Rg1 Qxh2 {+1.53/10 16s} 29. Qxe3 {-0.90/11 6.3s} Rxe3 {+1.55/12 14s} 30. fxe3 {-0.89/11 6.0s} Qh3+ {+1.25/11 11s} 31. Kf2 {-0.89/9 5.7s} Qf5+ {+1.20/11 13s} 32. Ke2 {-0.89/9 5.4s} Qe6 {+1.18/9 3.7s} 33. Rd2 {-0.89/9 5.1s} a5 {+1.11/10 9.4s} 34. Rg3 {-0.90/9 4.9s} a4 {+1.25/11 11s} 35. Ke1 {-0.89/9 4.6s} a3 {+1.50/11 8.5s} 36. Kf2 {-0.89/11 4.4s} h6 {+1.51/11 24s} 37. gxh6+ {-0.66/10 4.2s} Kxh6 {+1.49/11 8.8s} 38. Kg1 {-0.66/8 4.0s} Qe5 {+1.50/10 12s} 39. Rh2+ {-0.66/15 3.8s} Kg7 {+1.61/14 32s} 40. Rhg2 {-0.66/13 3.6s} Qxc3 {+1.53/13 23s} 41. Rxg6+ {-0.62/13 18s} Kf7 {+1.40/12 3.0s} 42. Rb6 {-0.65/13 17s} Qxe3+ {+1.52/11 2.0s} 43. Rf2+ {-0.61/11 17s} Ke8 {+1.34/11 3.1s} 44. Rxb7 {-1.34/16 16s} Qe1+ {+1.53/12 2.9s} 45. Rf1 {-1.34/14 15s} Qg3+ {+1.80/13 8.7s} 46. Kh1 Qh4+ {+1.55/12 6.6s} 47. Kg1 {-1.34/14 14s} Qg5+ {+1.75/12 5.1s} 48. Kh2 {-1.34/14 14s} Qd2+ {+1.79/11 2.6s} 49. Kg3 {-1.34/14 13s} Qxa2 {+1.81/11 7.0s} 50. Rh1 {0.00/9 12s} Qg8+ {+2.12/13 3.2s} 51. Kf2 {0.00/7 12s} Qa2+ {+2.08/14 5.2s} 52. Kg3 {0.00/5 11s} Qg8+ {+2.12/13 3.1s} 53. Kf2 {0.00/3 10s} Qa2+ {+2.08/14 5.2s} 54. Kg3 {0.00/1 9.9s, Draw by 3-fold repetition} 1/2-1/2 [/pgn]
"Good decisions come from experience, and experience comes from bad decisions."
__________________________________________________________________
Ted Summers
Gabor Szots
Posts: 1364
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: CookieCat retouched

Post by Gabor Szots »

I have started a tournament for the CCRL blitz list featuring CookieCat.
Gabor Szots
CCRL testing group
Gabor Szots
Posts: 1364
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: CookieCat retouched

Post by Gabor Szots »

Gabor Szots wrote: Fri Sep 22, 2023 8:15 am I have started a tournament for the CCRL blitz list featuring CookieCat.
Unfortunately it exceeds time in all games.
Gabor Szots
CCRL testing group
Gabor Szots
Posts: 1364
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: CookieCat retouched

Post by Gabor Szots »

Gabor Szots wrote: Fri Sep 22, 2023 8:51 am
Gabor Szots wrote: Fri Sep 22, 2023 8:15 am I have started a tournament for the CCRL blitz list featuring CookieCat.
Unfortunately it exceeds time in all games.

That was under Arena. No problem under Cute Chess so far.

The reason under Arena, allegedly, was receiving an 'unknown command'. Here is an excerpt from its debug:
2023-09-22 08:27:07,641-->1:Nb4
2023-09-22 08:27:07,665<--1:4 -390 0 19 12 Rxa7 Rxa7 13 bxc6 bxc6
2023-09-22 08:27:07,665<--1:4 -227 0 50 12 Bxh6 Rxh6 13 bxc6 Nxc6
2023-09-22 08:27:07,681<--1:2 -227 0 79 12 Nxd5 cxd5
2023-09-22 08:27:07,697<--1:2 4 0 90 12 bxc6 Nxc6
2023-09-22 08:27:07,698<--1:5 -305 0 187 12 bxc6 Nc2+ 13 Kd1 Nxa1 14 cxb7
2023-09-22 08:27:07,700<--1:5 -195 1 337 12 Bf4 Nc2+ 13 Kd2 Nxa1 14 Rxa1
2023-09-22 08:27:07,713<--1:2 -10 1 564 12 O-O Nc2
2023-09-22 08:27:07,714<--1:3 -17 1 1146 12 O-O Nc2 13 Ra4
2023-09-22 08:27:07,729<--1:5 -3 1 2333 12 Ra4 Nc2+ 13 Kf1 cxb5 14 Nxb5
2023-09-22 08:27:07,745<--1:5 -3 1 4667 12 Ra4 Nc2+ 13 Kf1 cxb5 14 Nxb5
2023-09-22 08:27:07,761<--1:5 -2 1 6991 12 O-O Nc2 13 Ra4 cxb5 14 Nxb5
2023-09-22 08:27:07,776<--1:5 -5 3 20114 12 O-O Ne4 13 Nxe4 dxe4 14 Nd2
2023-09-22 08:27:07,792<--1:5 2 4 30843 12 Ra4 a5 13 bxc6 Nxc6 14 Bf4
2023-09-22 08:27:07,808<--1:8 -1 11 121478 12 Ra4 Nc2+ 13 Kf1 Ne4 14 bxc6 Nxc3 15 bxc3 bxc6
2023-09-22 08:27:07,824<--1:6 2 17 187536 12 O-O Ne4 13 Nxe4 dxe4 14 Nd2 Nc2
2023-09-22 08:27:07,950<--1:6 4 29 334013 12 Kf1 Ne4 13 bxc6 Nxc6 14 Nxe4 Bxe4
2023-09-22 08:27:08,345<--1:8 -1 70 721899 12 Kf1 Ne4 13 Ra4 Nxc3 14 bxc3 Nc2 15 bxc6 bxc6
2023-09-22 08:27:08,614<--1:8 -1 96 965787 12 O-O Ne4 13 Ra4 Nxc3 14 bxc3 Nc2 15 bxc6 bxc6
2023-09-22 08:27:08,978<--1:7 1 132 1341844 12 Ra4 a5 13 Bd2 O-O 14 bxc6 Nxc6 15 Bf4
2023-09-22 08:27:12,090<--1:10 7 444 4927695 12 Ra4 a5 13 bxc6 Nxc6 14 Nb5 Bc2 15 Nc7+ Kd7 16 Nxa8 Bxa4
2023-09-22 08:27:13,561<--1:move Ra4
2023-09-22 08:27:13,561*1*Found move:Ra1-a4
2023-09-22 08:27:13,716*2*Child Process Prio Adj: PID 10836 conhost.exe
2023-09-22 08:27:13,717*2*Start calc, move no: 23
2023-09-22 08:27:13,718-->2:position startpos moves g1f3 g8f6 d2d4 d7d5 c2c4 c7c6 g2g3 c8f5 f1g2 e7e6 d1b3 d8b6 b1c3 h7h6 c4c5 b6b3 a2b3 f8e7 b3b4 b8a6 b4b5 a6b4 a1a4
2023-09-22 08:27:13,718-->2:go wtime 113468 btime 116526 winc 1000 binc 1000
2023-09-22 08:27:13,734<--2:info depth 1 nodes 112 score cp 48 nps 1555555 pv b4c2
2023-09-22 08:27:13,750<--2:info depth 2 nodes 308 score cp 39 nps 1072423 pv b4c2 e1d1
2023-09-22 08:27:13,750<--2:info depth 3 nodes 2315 score cp 33 nps 1850223 pv b4c2 e1d1 f6g4
2023-09-22 08:27:13,766<--2:info depth 4 nodes 7815 score cp 30 nps 876435 pv b4c2 e1d1 f6g4 c3e4
2023-09-22 08:27:13,782<--2:info depth 5 nodes 41976 score cp 30 nps 1545013 pv b4c2 e1d1 f6g4 c3e4 d5e4
2023-09-22 08:27:13,861<--2:info depth 6 nodes 129384 score cp 15 nps 944402 pv b4c2 e1d1 f6g4 c3e4 d5e4 d1c2
2023-09-22 08:27:14,114<--2:info depth 7 nodes 610590 score cp 18 nps 1558147 pv b4c2 e1f1 e8g8 b5c6 b7c6
2023-09-22 08:27:16,123<--2:info depth 8 nodes 2510756 score cp 3 nps 1048243 pv b4c2 e1f1 e8g8 b5c6 b7c6 f3e5 f8c8 c1f4
2023-09-22 08:27:20,507<--2:bestmove b4c2
2023-09-22 08:27:20,507*2*Found move:Nb4-c2
2023-09-22 08:27:20,661*1*Child Process Prio Adj: PID 24852 conhost.exe
2023-09-22 08:27:20,663*1*Start calc, move no: 24
2023-09-22 08:27:20,720-->1:time 11347
2023-09-22 08:27:20,720-->1:otim 11074
2023-09-22 08:27:20,720-->1:Nc2
2023-09-22 08:27:20,727<--1:Error (unknown command): Nc2
Gabor Szots
CCRL testing group
User avatar
Guenther
Posts: 4610
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: CookieCat retouched

Post by Guenther »

Gabor Szots wrote: Fri Sep 22, 2023 10:22 am
Gabor Szots wrote: Fri Sep 22, 2023 8:51 am
Gabor Szots wrote: Fri Sep 22, 2023 8:15 am I have started a tournament for the CCRL blitz list featuring CookieCat.
Unfortunately it exceeds time in all games.

That was under Arena. No problem under Cute Chess so far.

The reason under Arena, allegedly, was receiving an 'unknown command'. Here is an excerpt from its debug:
2023-09-22 08:27:07,641-->1:Nb4
2023-09-22 08:27:07,665<--1:4 -390 0 19 12 Rxa7 Rxa7 13 bxc6 bxc6
2023-09-22 08:27:07,665<--1:4 -227 0 50 12 Bxh6 Rxh6 13 bxc6 Nxc6
2023-09-22 08:27:07,681<--1:2 -227 0 79 12 Nxd5 cxd5
2023-09-22 08:27:07,697<--1:2 4 0 90 12 bxc6 Nxc6
2023-09-22 08:27:07,698<--1:5 -305 0 187 12 bxc6 Nc2+ 13 Kd1 Nxa1 14 cxb7
2023-09-22 08:27:07,700<--1:5 -195 1 337 12 Bf4 Nc2+ 13 Kd2 Nxa1 14 Rxa1
2023-09-22 08:27:07,713<--1:2 -10 1 564 12 O-O Nc2
2023-09-22 08:27:07,714<--1:3 -17 1 1146 12 O-O Nc2 13 Ra4
2023-09-22 08:27:07,729<--1:5 -3 1 2333 12 Ra4 Nc2+ 13 Kf1 cxb5 14 Nxb5
2023-09-22 08:27:07,745<--1:5 -3 1 4667 12 Ra4 Nc2+ 13 Kf1 cxb5 14 Nxb5
2023-09-22 08:27:07,761<--1:5 -2 1 6991 12 O-O Nc2 13 Ra4 cxb5 14 Nxb5
2023-09-22 08:27:07,776<--1:5 -5 3 20114 12 O-O Ne4 13 Nxe4 dxe4 14 Nd2
2023-09-22 08:27:07,792<--1:5 2 4 30843 12 Ra4 a5 13 bxc6 Nxc6 14 Bf4
2023-09-22 08:27:07,808<--1:8 -1 11 121478 12 Ra4 Nc2+ 13 Kf1 Ne4 14 bxc6 Nxc3 15 bxc3 bxc6
2023-09-22 08:27:07,824<--1:6 2 17 187536 12 O-O Ne4 13 Nxe4 dxe4 14 Nd2 Nc2
2023-09-22 08:27:07,950<--1:6 4 29 334013 12 Kf1 Ne4 13 bxc6 Nxc6 14 Nxe4 Bxe4
2023-09-22 08:27:08,345<--1:8 -1 70 721899 12 Kf1 Ne4 13 Ra4 Nxc3 14 bxc3 Nc2 15 bxc6 bxc6
2023-09-22 08:27:08,614<--1:8 -1 96 965787 12 O-O Ne4 13 Ra4 Nxc3 14 bxc3 Nc2 15 bxc6 bxc6
2023-09-22 08:27:08,978<--1:7 1 132 1341844 12 Ra4 a5 13 Bd2 O-O 14 bxc6 Nxc6 15 Bf4
2023-09-22 08:27:12,090<--1:10 7 444 4927695 12 Ra4 a5 13 bxc6 Nxc6 14 Nb5 Bc2 15 Nc7+ Kd7 16 Nxa8 Bxa4
2023-09-22 08:27:13,561<--1:move Ra4
2023-09-22 08:27:13,561*1*Found move:Ra1-a4
2023-09-22 08:27:13,716*2*Child Process Prio Adj: PID 10836 conhost.exe
2023-09-22 08:27:13,717*2*Start calc, move no: 23
2023-09-22 08:27:13,718-->2:position startpos moves g1f3 g8f6 d2d4 d7d5 c2c4 c7c6 g2g3 c8f5 f1g2 e7e6 d1b3 d8b6 b1c3 h7h6 c4c5 b6b3 a2b3 f8e7 b3b4 b8a6 b4b5 a6b4 a1a4
2023-09-22 08:27:13,718-->2:go wtime 113468 btime 116526 winc 1000 binc 1000
2023-09-22 08:27:13,734<--2:info depth 1 nodes 112 score cp 48 nps 1555555 pv b4c2
2023-09-22 08:27:13,750<--2:info depth 2 nodes 308 score cp 39 nps 1072423 pv b4c2 e1d1
2023-09-22 08:27:13,750<--2:info depth 3 nodes 2315 score cp 33 nps 1850223 pv b4c2 e1d1 f6g4
2023-09-22 08:27:13,766<--2:info depth 4 nodes 7815 score cp 30 nps 876435 pv b4c2 e1d1 f6g4 c3e4
2023-09-22 08:27:13,782<--2:info depth 5 nodes 41976 score cp 30 nps 1545013 pv b4c2 e1d1 f6g4 c3e4 d5e4
2023-09-22 08:27:13,861<--2:info depth 6 nodes 129384 score cp 15 nps 944402 pv b4c2 e1d1 f6g4 c3e4 d5e4 d1c2
2023-09-22 08:27:14,114<--2:info depth 7 nodes 610590 score cp 18 nps 1558147 pv b4c2 e1f1 e8g8 b5c6 b7c6
2023-09-22 08:27:16,123<--2:info depth 8 nodes 2510756 score cp 3 nps 1048243 pv b4c2 e1f1 e8g8 b5c6 b7c6 f3e5 f8c8 c1f4
2023-09-22 08:27:20,507<--2:bestmove b4c2
2023-09-22 08:27:20,507*2*Found move:Nb4-c2
2023-09-22 08:27:20,661*1*Child Process Prio Adj: PID 24852 conhost.exe
2023-09-22 08:27:20,663*1*Start calc, move no: 24
2023-09-22 08:27:20,720-->1:time 11347
2023-09-22 08:27:20,720-->1:otim 11074
2023-09-22 08:27:20,720-->1:Nc2
2023-09-22 08:27:20,727<--1:Error (unknown command): Nc2
I think san requires a check symbol in the notation, which is missing here.

Code: Select all

CookieCat 2012.10.10   Copyright (c) 2012 by S. J. Edwards
CookieCat ready

[] xboard

protover 2
feature done=0 myname="CookieCat 2012.10.10" ping=1 setboard=1 san=1 time=1 draw=0 sigint=0 sigterm=0 reuse=1 colors=0 done=1
https://www.gnu.org/software/xboard/engine-intf.html
Beginning in protocol version 2, you can use the feature command to select SAN (standard algebraic notation) instead; for example, e4, Nf3, exd5, Bxf7+, Qxf7#, e8=Q, O-O, or P@h3. Note that the last form, P@h3, is a extension to the PGN standard's definition of SAN, which does not support bughouse or crazyhouse.
http://hgm.nubati.net/newspecs.html
san (0) Requests sending of the moves to the engine as SAN instead of long algebraic. Using SAN is not recommended, especially in variants, and GUIs are allowed to refrain from using SAN even when they accepted the san feature requesting it, when SAN would be problematic.
The last part from newspecs sounds a bit confusing, but I see no reason to refrain from san for Arena as this was no variant game
and CookieCat clearly sent san=1.
BTW I guess it was set up as protover 2 engine in Arena? May be it works with WB2UCI then?
https://rwbc-chess.de

trollwatch:
Talkchess nowadays is a joke - it is full of trolls/idiots/people stuck in the pleistocene > 80% of the posts fall into this category...