New UCI engine - CuckooChess

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

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
tmokonen
Posts: 1182
Joined: Sun Mar 12, 2006 5:46 pm
Location: Kelowna
Full name: Tony Mokonen
Contact:

New UCI engine - CuckooChess

Post by tmokonen » Mon Jan 11, 2010 7:26 pm

This engine is a Java based program, written by Peter Osterlund. I believe he is Swedish, but I am not 100% sure about that. The home page of the engine (and also an applet) is:

http://web.telia.com/~u89404340/javachess/index.html

Carlos777
Posts: 786
Joined: Sun Dec 13, 2009 5:09 pm

Re: New UCI engine - CuckooChess

Post by Carlos777 » Tue Jan 12, 2010 12:14 pm

Hi Tony,

Nice find. I can play with it in Arena 2.01, but I can not make it work in tournament mode.

Here is the debug:

Code: Select all

881.312********Starting engine 1 Cuckoo Chess
881.640*1*-----------------------Starting engine 1 Cuckoo Chess-----------------------
881.655*1*Configured Engine 1 Type:   UCI
881.780*1*Engine 1 dir: E:\install\arena201\weak\newone
881.812*1*Engine 1 commandline: E:\install\arena201\weak\newone\go.bat 
882.031*1*Engine 1 ProcessID: 1360
882.046<--1&#58;E&#58;\install\arena201\weak\newone>java -Xmx64m -jar chess.jar uci
882.171-->1&#58;uci
882.233<--1&#58;id name CuckooChess
882.281<--1&#58;id author Peter Osterlund
882.344<--1&#58;option name Hash type spin default 16 min 1 max 2048
882.344<--1&#58;option name OwnBook type check default false
882.389<--1&#58;option name Ponder type check default true
882.453<--1&#58;option name UCI_AnalyseMode type check default false
882.453<--1&#58;option name UCI_EngineAbout type string default CuckooChess by Peter Osterlund, see http&#58;//web.telia.com/~u89404340/javachess/index.html
882.453<--1&#58;uciok
882.453-->1&#58;setoption name Hash value 64
882.469-->1&#58;isready
884.219<--1&#58;Exception in thread "main" java.lang.OutOfMemoryError&#58; Java heap space
884.249<--1&#58;at chess.TranspositionTable.<init>&#40;TranspositionTable.java&#58;85&#41;
884.264<--1&#58;at uci.EngineControl.setupTT&#40;EngineControl.java&#58;229&#41;
884.297<--1&#58;at uci.EngineControl.setOption&#40;EngineControl.java&#58;300&#41;
884.327<--1&#58;at uci.UCIProtocol.handleCommand&#40;UCIProtocol.java&#58;102&#41;
884.344<--1&#58;at uci.UCIProtocol.mainLoop&#40;UCIProtocol.java&#58;62&#41;
884.374<--1&#58;at uci.UCIProtocol.main&#40;UCIProtocol.java&#58;40&#41;
884.389<--1&#58;at chess.Main.main&#40;Main.java&#58;23&#41;
889.422-->1&#58;isready
897.500********3. try&#58;  Terminating engine 1 Cuckoo Chess
897.500-->1&#58;quit
My go.bat config is:

java -Xmx64m -jar chess.jar uci

What would be the problem?

Best,
Carlos

PS: Here is the debug for player vs engine:

Code: Select all

1.113.749*1*-----------------------Starting engine 1 Cuckoo Chess-----------------------
1.113.749*1*Configured Engine 1 Type&#58;   UCI
1.113.875*1*Engine 1 dir&#58; E&#58;\install\arena201\weak\newone
1.113.922*1*Engine 1 commandline&#58; E&#58;\install\arena201\weak\newone\go.bat 
1.114.125*1*Engine 1 ProcessID&#58; 1628
1.114.140<--1&#58;E&#58;\install\arena201\weak\newone>java -Xmx64m -jar chess.jar uci
1.114.265-->1&#58;uci
1.114.328<--1&#58;id name CuckooChess
1.114.375<--1&#58;id author Peter Osterlund
1.114.421<--1&#58;option name Hash type spin default 16 min 1 max 2048
1.114.468<--1&#58;option name OwnBook type check default false
1.114.468<--1&#58;option name Ponder type check default true
1.114.531<--1&#58;option name UCI_AnalyseMode type check default false
1.114.578<--1&#58;option name UCI_EngineAbout type string default CuckooChess by Peter Osterlund, see http&#58;//web.telia.com/~u89404340/javachess/index.html
1.114.624<--1&#58;uciok
1.114.624-->1&#58;isready
1.115.156<--1&#58;readyok
1.116.436*1*Start calc, move no&#58; 1
1.116.436*1*HS-20moves.abk&#58;
1.116.436*1*c7c5
1.123.562*1*Start calc, move no&#58; 3
1.123.562*1*HS-20moves.abk&#58;
1.123.562*1*d7d6
1.136.218*1*Start calc, move no&#58; 5
1.136.218*1*HS-20moves.abk&#58;
1.136.218*1*c5d4
1.137.609*1*Start calc, move no&#58; 7
1.137.609*1*HS-20moves.abk&#58;
1.137.609*1*g8f6
1.139.031*1*Start calc, move no&#58; 9
1.139.031*1*HS-20moves.abk&#58;
1.139.047*1*a7a6
1.142.031*1*Start calc, move no&#58; 11
1.142.046*1*HS-20moves.abk&#58;
1.142.046*1*e7e5
1.144.625*1*Start calc, move no&#58; 13
1.144.640*1*HS-20moves.abk&#58;
1.144.640*1*h7h6
1.146.186*1*Start calc, move no&#58; 15
1.146.203-->1&#58;ucinewgame
1.146.203-->1&#58;isready
1.146.203<--1&#58;readyok
1.146.218-->1&#58;position startpos moves e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4 g8f6 b1c3 a7a6 f1e2 e7e5 d4f3 h7h6 h2h3
1.146.218-->1&#58;go wtime 140953 btime 162000 winc 6000 binc 6000
1.146.296<--1&#58;info depth 1 score cp -18 time 63 nodes 154 nps 2444 pv b8c6
1.146.311<--1&#58;info depth 2 score cp -71 upperbound time 63 nodes 172 nps 2730 pv b8c6 e1g1
1.146.311<--1&#58;info depth 2 score cp -71 time 78 nodes 217 nps 2782 pv b8c6
1.146.343<--1&#58;info depth 3 score cp -53 time 110 nodes 496 nps 4509 pv b8c6 e1g1 c8e6
1.146.375<--1&#58;info depth 3 score cp -48 lowerbound time 141 nodes 857 nps 6078 pv f8e7
1.146.390<--1&#58;info depth 3 score cp -48 time 141 nodes 894 nps 6340 pv f8e7 e1g1
1.146.468<--1&#58;info depth 4 score cp -67 time 235 nodes 3126 nps 13302 pv f8e7 e1g1 e8g8 c1e3
1.147.109<--1&#58;info depth 5 score cp -26 time 875 nodes 12110 nps 13840 pv f8e7 e1g1 e8g8 c1e3 b8c6
1.147.733<--1&#58;info depth 6 score cp -39 time 1500 nodes 26205 nps 17470 pv f8e7 e1g1 e8g8 c1e3 b8c6 e2c4
1.150.812<--1&#58;info depth 7 score cp -25 time 4578 nodes 87089 nps 19023 pv f8e7 e1g1 e8g8 e2c4 b7b5 c4d5 f6d5
1.151.639<--1&#58;info currmove c8h3 currmovenumber 29
1.151.764<--1&#58;info currmove c8g4 currmovenumber 30
1.151.764<--1&#58;info currmove f6d5 currmovenumber 31
1.151.827<--1&#58;info currmove c8f5 currmovenumber 32
1.151.859<--1&#58;info depth 8
1.151.859<--1&#58;info currmove f8e7 currmovenumber 1
1.152.405<--1&#58;info nodes 117951 nps 19110 time 6172
1.153.406<--1&#58;info nodes 135057 nps 18831 time 7172
1.154.406<--1&#58;info nodes 150500 nps 18416 time 8172
1.155.405<--1&#58;info nodes 165761 nps 18072 time 9172
1.156.108<--1&#58;info nodes 176930 nps 17916 time 9875
1.156.108<--1&#58;bestmove f8e7 ponder e1g1
1.156.108*1*Found move&#58;Bf8-e7

User avatar
Roman Hartmann
Posts: 295
Joined: Wed Mar 08, 2006 7:29 pm
Contact:

Re: New UCI engine - CuckooChess

Post by Roman Hartmann » Tue Jan 12, 2010 12:20 pm

He also wrote a chess program for the HP48/49/50 series of calculators. It was written in a mix of saturn assembler code and system RPL and you could compile the source on the calculator. Great stuff!

Emodul

jesper_nielsen

Re: New UCI engine - CuckooChess

Post by jesper_nielsen » Tue Jan 12, 2010 1:13 pm

Carlos777 wrote:Hi Tony,

Nice find. I can play with it in Arena 2.01, but I can not make it work in tournament mode.

Here is the debug:

Code: Select all

881.312********Starting engine 1 Cuckoo Chess
881.640*1*-----------------------Starting engine 1 Cuckoo Chess-----------------------
881.655*1*Configured Engine 1 Type&#58;   UCI
881.780*1*Engine 1 dir&#58; E&#58;\install\arena201\weak\newone
881.812*1*Engine 1 commandline&#58; E&#58;\install\arena201882.453--

SNIP!

>1&#58;setoption name Hash value 64

SNIP!

884.219<--1&#58;Exception in thread "main" java.lang.OutOfMemoryError&#58; Java heap space
884.249<--1&#58;at chess.TranspositionTable.<init>&#40;TranspositionTable.java&#58;85&#41;
884.264<--1&#58;at uci.EngineControl.setupTT&#40;EngineControl.java&#58;229&#41;
884.297<--1&#58;at uci.EngineControl.setOption&#40;EngineControl.java&#58;300&#41;
884.327<--1&#58;at uci.UCIProtocol.handleCommand&#40;UCIProtocol.java&#58;102&#41;
884.344<--1&#58;at uci.UCIProtocol.mainLoop&#40;UCIProtocol.java&#58;62&#41;
884.374<--1&#58;at uci.UCIProtocol.main&#40;UCIProtocol.java&#58;40&#41;
884.389<--1&#58;at chess.Main.main&#40;Main.java&#58;23&#41;
889.422-->1&#58;isready
897.500********3. try&#58;  Terminating engine 1 Cuckoo Chess
897.500-->1&#58;quit
My go.bat config is:

java -Xmx64m -jar chess.jar uci

What would be the problem?

Best,
Carlos

SNIP!

[/code]
I don't think you allocate enough memory for the java runtime.

The option -Xmx64m specifies, i believe, that the runtime is allowed to use 64 mb of memory. But when the hash table is set to 64, there is nothing left for the rest of the program.

Please notice, that the hash defaults to 16 mb, and the "hash" option is NOT set when playing against the engine outside a tournament.

So you can either specify less memory for this engine than 64 mb
OR
allocate more than the 64 mb for the runtime. Use -Xmx128m instead.

Java experts may correct me! :)

Kind regards,
Jesper

Carlos777
Posts: 786
Joined: Sun Dec 13, 2009 5:09 pm

Re: New UCI engine - CuckooChess

Post by Carlos777 » Tue Jan 12, 2010 1:36 pm

jesper_nielsen wrote: I don't think you allocate enough memory for the java runtime.

The option -Xmx64m specifies, i believe, that the runtime is allowed to use 64 mb of memory. But when the hash table is set to 64, there is nothing left for the rest of the program.

Please notice, that the hash defaults to 16 mb, and the "hash" option is NOT set when playing against the engine outside a tournament.

So you can either specify less memory for this engine than 64 mb
OR
allocate more than the 64 mb for the runtime. Use -Xmx128m instead.

Java experts may correct me! :)

Kind regards,
Jesper
Hi Jesper,

Thanks for your help.

I tried with 32mb , didn't work, but with -Xmx128m is working now.

Task manager shows it is using aprox. 95Mb of RAM.

Best,
Carlos

User avatar
beachknight
Posts: 3533
Joined: Tue Jan 09, 2007 7:33 pm
Location: Antalya, Turkey
Contact:

Re: New UCI engine - CuckooChess

Post by beachknight » Tue Jan 12, 2010 2:12 pm

Carlos777 wrote:
jesper_nielsen wrote: I don't think you allocate enough memory for the java runtime.

The option -Xmx64m specifies, i believe, that the runtime is allowed to use 64 mb of memory. But when the hash table is set to 64, there is nothing left for the rest of the program.

Please notice, that the hash defaults to 16 mb, and the "hash" option is NOT set when playing against the engine outside a tournament.

So you can either specify less memory for this engine than 64 mb
OR
allocate more than the 64 mb for the runtime. Use -Xmx128m instead.

Java experts may correct me! :)

Kind regards,
Jesper
Hi Jesper,

Thanks for your help.

I tried with 32mb , didn't work, but with -Xmx128m is working now.

Task manager shows it is using aprox. 95Mb of RAM.

Best,
Carlos
Working in tournament mode?

Please share with us the batch (bat) file.

Best,
hi, merhaba, hallo HT

Carlos777
Posts: 786
Joined: Sun Dec 13, 2009 5:09 pm

Re: New UCI engine - CuckooChess

Post by Carlos777 » Tue Jan 12, 2010 2:26 pm

beachknight wrote: Working in tournament mode?

Please share with us the batch (bat) file.

Yes, works fine in tournament mode, Arena 2.01.

My batch is:

java -Xmx128m -jar chess.jar uci

jesper_nielsen

Re: New UCI engine - CuckooChess

Post by jesper_nielsen » Tue Jan 12, 2010 2:59 pm

Carlos777 wrote:
beachknight wrote: Working in tournament mode?

Please share with us the batch (bat) file.

Yes, works fine in tournament mode, Arena 2.01.

My batch is:

java -Xmx128m -jar chess.jar uci
Please note that on some systems (well mine at least! :) ) the default "Common Hashtable Size" option for Arena defaults to 128mb.

So in this case, even the 128 mb for the Java runtime will not be enough. So the bat file can be changed to:

Code: Select all

java -Xmx256m -jar chess.jar uci
This allows the runtime to use 256 mb memory.

Kind regards,
Jesper

User avatar
beachknight
Posts: 3533
Joined: Tue Jan 09, 2007 7:33 pm
Location: Antalya, Turkey
Contact:

Re: New UCI engine - CuckooChess

Post by beachknight » Tue Jan 12, 2010 4:26 pm

jesper_nielsen wrote:
Carlos777 wrote:
beachknight wrote: Working in tournament mode?

Please share with us the batch (bat) file.

Yes, works fine in tournament mode, Arena 2.01.

My batch is:

java -Xmx128m -jar chess.jar uci
Please note that on some systems (well mine at least! :) ) the default "Common Hashtable Size" option for Arena defaults to 128mb.

So in this case, even the 128 mb for the Java runtime will not be enough. So the bat file can be changed to:

Code: Select all

java -Xmx256m -jar chess.jar uci
This allows the runtime to use 256 mb memory.

Kind regards,
Jesper
Thank you so much, Jesper. That is exactly my case.

I'll try these bat out.

Best to you,
hi, merhaba, hallo HT

User avatar
towforce
Posts: 10850
Joined: Wed Mar 08, 2006 11:57 pm
Location: Birmingham UK

Re: New UCI engine - CuckooChess

Post by towforce » Tue Jan 12, 2010 9:09 pm

tmokonen wrote:The home page of the engine (and also an applet) is: http://web.telia.com/~u89404340/javachess/index.html .
As this thread's self-appointed representative of the human race, I am pleased to report that we beat them! I played the applet at the above link, and I set its thinking time to zero. The outcome was the following game: 1. e4 e5 2. Nf3 Nf6 3. Nxe5 d6 4. Nf3 Nxe4 5. Qe2 Qe7 6. d3 Nf6 7. Bd2 Nc6 8. Nc3 Bf5 9. O-O-O O-O-O 10. Re1 Re8 11. Qe3 h6 12. Qf4 Be6 13. Nd4 Nxd4 14. Qxd4 a6 15. Qa7 c6 16. d4 g5 17. d5 cxd5 18. Na4 Ne4 19. Ba5 Nc5 20. Qa8+ Kd7 21. Nxc5+ dxc5 22. Qxb7+ Kd6 23. Qb6+ Kd7 24. Qc7# 1-0

Oh what joy! :D
Writing is the antidote to confusion

Post Reply