Can Crafty analyse tablebase positions?

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Can Crafty analyse tablebase positions?

Postby Dhanish » 21 Apr 2008, 07:54

Hi All,

Is it possible to make Crafty analyse a particular tablebase position (not in a game)?

I tried both Winboard and Arena, the log shows EGTBprobes=1 hits=1, but the best move was not displayed.

How can I display the best move?

Regards,
Dhanish
Dhanish
 
Posts: 12
Joined: 21 Apr 2008, 07:49

Re: Can Crafty analyse tablebase positions?

Postby Volker Pittlik » 21 Apr 2008, 08:25

Dhanish wrote:...
How can I display the best move?
...


Scid does that excellent.


vp
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

Re: Can Crafty analyse tablebase positions?

Postby Dhanish » 22 Apr 2008, 08:46

Volker Pittlik wrote:
Dhanish wrote:...
How can I display the best move?
...


Scid does that excellent.


vp


Hi Volker,

Yes, Scid does well in displaying the best move as well as alternatives. The random position feature is very good for training. Only limitation is that it cannot access 6 men bases. I had requested Pascal to consider including this, and he has replied that it was not easy but will look into it. Perhaps if more people request, the feature may be included.

Anyway my question was in connection with the development of an EGTB test suite, see http://kirill-kryukov.com/chess/discuss ... b1f9aec773


How can I verify whether Crafty is really choosing the correct tablebase move for a position setup by me?

Regards
Dhanish
Dhanish
 
Posts: 12
Joined: 21 Apr 2008, 07:49

Re: Can Crafty analyse tablebase positions?

Postby Volker Pittlik » 22 Apr 2008, 09:48

Dhanish wrote:...How can I display the best move?
...


Dhanish wrote:...Anyway my question was in connection with the development of an EGTB test suite, see http://kirill-kryukov.... How can I verify whether Crafty is really choosing the correct tablebase move for a position setup by me?
...


I don't read that other forum often. I have quoted your initial question again.

As far as I know the tablebase access is implemented since a decade or so. The access code has been written by Eugene Nalimov. Bob also knows how to write a program. Have you any hint or evidence that a wrong move is chosen? Has that been shown anywhere else?

Instead of verfiying it try to falsify it: proof it false on the board! Maybe I get you totally wrong, but I don't understand why a tablebase move needs additional verification.

Volker
User avatar
Volker Pittlik
 
Posts: 1031
Joined: 24 Sep 2004, 10:14
Location: Murten / Morat, Switzerland

Re: Can Crafty analyse tablebase positions?

Postby Dhanish » 23 Apr 2008, 05:49

Successful tablebase access requires four components: 1. Proper tablebase files (which can easily get corrupt during generation / downloading / storage 2. Proper engine (recall Toga 1.3X4 which could not access bitbases) 3. Proper GUI (In Fritz GUI, after enabling tablebases, if you don't restart engine, the access will not take place) 4. Proper operator (Correct tablebase paths). It is easy to have problems in any component.

Volker Pittlik wrote:Instead of verfiying it try to falsify it: proof it false on the board!


As a user, I am trying to do this, give a position to the engine and see whether the engine chooses the correct move.


I thought perhaps Crafty may have some internal command to display the best move in egtb positions, and somebody in this forum may be able to help.

Regards,
Dhanish
Dhanish
 
Posts: 12
Joined: 21 Apr 2008, 07:49

Re: Can Crafty analyse tablebase positions?

Postby bob » 23 Apr 2008, 16:52

Dhanish wrote:Successful tablebase access requires four components: 1. Proper tablebase files (which can easily get corrupt during generation / downloading / storage 2. Proper engine (recall Toga 1.3X4 which could not access bitbases) 3. Proper GUI (In Fritz GUI, after enabling tablebases, if you don't restart engine, the access will not take place) 4. Proper operator (Correct tablebase paths). It is easy to have problems in any component.

Volker Pittlik wrote:Instead of verfiying it try to falsify it: proof it false on the board!


As a user, I am trying to do this, give a position to the engine and see whether the engine chooses the correct move.


I thought perhaps Crafty may have some internal command to display the best move in egtb positions, and somebody in this forum may be able to help.

Regards,
Dhanish


In Crafty, just enter a position and it should automatically dump the PV if it is a tablebase position. Otherwise, just type "egtb" and you should get the PV to a draw, loss or win...
User avatar
bob
 
Posts: 156
Joined: 10 May 2006, 17:59

Re: Can Crafty analyse tablebase positions?

Postby Dhanish » 24 Apr 2008, 06:31

bob wrote:In Crafty, just enter a position and it should automatically dump the PV if it is a tablebase position. Otherwise, just type "egtb" and you should get the PV to a draw, loss or win...


Hi Bob,

Thankyou very much for your reply.

The analyze command does not display the PV (in this version at least):
71.533-->1:setboard 2K5/k7/7p/8/8/8/6P1/8 w - - 0 1
71.572<--1:White(1): Crafty 22.0 PS vs dhanish
71.582<--1:tellicsnoalias kibitz Hello from Crafty v22.0 PS! (1 cpus)
71.593<--1:White(1): usage: force <move>
79.634-->1:analyze
79.634<--1:White(1): White(1): Analyze Mode: type "exit" to terminate.
79.634<--1: time surplus 0.00 time limit 4.00 (+0.00) (4.00) [easy move]
79.634<--1: depth time score variation (1)
79.634<--1: time=0.00 mat=0 n=65 fh=100% nps=1.0M
79.644<--1: ext-> check=0 1rep=0 mate=0 pp=0 reduce=0/0
79.644<--1: predicted=0 evals=1 50move=0 EGTBprobes=1 hits=1
79.644<--1: SMP-> splits=0 aborts=0 data=0/256 elap=0.00
81.177-->1:.

But the egtb command does the needful:
92.202-->1:egtb
92.233<--1:White(1): 1. Kc7! Ka6! 2. Kc6! Ka5! 3. Kc5! Ka4! 4. Kc4! Ka3! 5. Kc3! Ka2!
92.233<--1:6. Kc2! Ka3! 7. g3! Ka4 8. Kc3! Kb5 9. Kd4! Kc6 10. Ke5! Kd7 11.
92.252<--1:Kf6! h5! 12. Kg6 Ke6 13. Kxh5! Kf6! 14. g4! Kg7! 15. Kg5! Kh7! 16.
92.252<--1:Kf6! Kh6! 17. g5+! Kh7! 18. Kf7! Kh8 19. Kg6! Kg8 20. Kh6! Kf7! 21.
92.252<--1:Kh7 Ke6 22. g6! Kd5 23. g7! Kc4 24. g8=Q+ Kc3 25. Qf8 Kb2 26. Qc5
92.262<--1:Ka1 27. Qb6 Ka2 28. Kg7 Ka1 29. Kf6! Ka2 30. Ke5! Ka1 31. Kd4! Ka2
92.262<--1:32. Kc3! Ka1 33. Qb2#

According to the documentation egtb only "enables endgame database probes"!

Regards,
Dhanish
Dhanish
 
Posts: 12
Joined: 21 Apr 2008, 07:49

Re: Can Crafty analyse tablebase positions?

Postby bob » 25 Apr 2008, 02:33

Dhanish wrote:
bob wrote:In Crafty, just enter a position and it should automatically dump the PV if it is a tablebase position. Otherwise, just type "egtb" and you should get the PV to a draw, loss or win...


Hi Bob,

Thankyou very much for your reply.

The analyze command does not display the PV (in this version at least):
71.533-->1:setboard 2K5/k7/7p/8/8/8/6P1/8 w - - 0 1
71.572<--1:White(1): Crafty 22.0 PS vs dhanish
71.582<--1:tellicsnoalias kibitz Hello from Crafty v22.0 PS! (1 cpus)
71.593<--1:White(1): usage: force <move>
79.634-->1:analyze
79.634<--1:White(1): White(1): Analyze Mode: type "exit" to terminate.
79.634<--1: time surplus 0.00 time limit 4.00 (+0.00) (4.00) [easy move]
79.634<--1: depth time score variation (1)
79.634<--1: time=0.00 mat=0 n=65 fh=100% nps=1.0M
79.644<--1: ext-> check=0 1rep=0 mate=0 pp=0 reduce=0/0
79.644<--1: predicted=0 evals=1 50move=0 EGTBprobes=1 hits=1
79.644<--1: SMP-> splits=0 aborts=0 data=0/256 elap=0.00
81.177-->1:.

But the egtb command does the needful:
92.202-->1:egtb
92.233<--1:White(1): 1. Kc7! Ka6! 2. Kc6! Ka5! 3. Kc5! Ka4! 4. Kc4! Ka3! 5. Kc3! Ka2!
92.233<--1:6. Kc2! Ka3! 7. g3! Ka4 8. Kc3! Kb5 9. Kd4! Kc6 10. Ke5! Kd7 11.
92.252<--1:Kf6! h5! 12. Kg6 Ke6 13. Kxh5! Kf6! 14. g4! Kg7! 15. Kg5! Kh7! 16.
92.252<--1:Kf6! Kh6! 17. g5+! Kh7! 18. Kf7! Kh8 19. Kg6! Kg8 20. Kh6! Kf7! 21.
92.252<--1:Kh7 Ke6 22. g6! Kd5 23. g7! Kc4 24. g8=Q+ Kc3 25. Qf8 Kb2 26. Qc5
92.262<--1:Ka1 27. Qb6 Ka2 28. Kg7 Ka1 29. Kf6! Ka2 30. Ke5! Ka1 31. Kd4! Ka2
92.262<--1:32. Kc3! Ka1 33. Qb2#

According to the documentation egtb only "enables endgame database probes"!

Regards,
Dhanish


add "noise 0" to your crafty.rc and the analyze will probably work. This is a setting used to prevent output from the 1-2-3-4-5-6-7-8 ply searches that go by almost instantly and can drown you in output if you don't turn it off. The noise "n" command says "don't display any search output until at least N nodes have been searched." Unfortunately, in a position that starts in an EGTB position, it will not search more than a few dozen nodes...
User avatar
bob
 
Posts: 156
Joined: 10 May 2006, 17:59

Re: Can Crafty analyse tablebase positions?

Postby Dhanish » 28 Apr 2008, 09:18

Hi Bob,

Noise=0 in the crafty.rc file also works. Then the first move can be obtained in the GUI itself. Anyway, the egtb command has the benefit of giving the complete variation, which can also be useful in some cases.

Thankyou Bob, its simple when you know how!

Regards,
Dhanish
Dhanish
 
Posts: 12
Joined: 21 Apr 2008, 07:49

Re: Can Crafty analyse tablebase positions?

Postby bob » 01 May 2008, 18:16

Dhanish wrote:Hi Bob,

Noise=0 in the crafty.rc file also works. Then the first move can be obtained in the GUI itself. Anyway, the egtb command has the benefit of giving the complete variation, which can also be useful in some cases.

Thankyou Bob, its simple when you know how!

Regards,
Dhanish


Yes it is. :)

The "noise" feature can cause problems. Sometimes a search terminates before the "noise" number of nodes has been searched, and it produces no output. That causes me grief here and there. But then when I reach a pawn ending and search 50 plies deep, I would prefer to avoid having the screen scroll for several hundred lines... :) In real tournaments, I run Crafty in command mode (no GUI) and if it dumps too much output, the output from pondering will scroll its move right off the top of the screen which can make me overlook the fact it has moved. The pondering output is different than actual search output to help, but too much output is bad there. Hence the "noise feature" as implemented. But probably any GUI should just make "noise 0" a default command for Crafty as the GUI can control what output the user sees anyway... Or perhaps I should make noise 0 the default, and let users set it up if they want to reduce screen output.
User avatar
bob
 
Posts: 156
Joined: 10 May 2006, 17:59

Re: Can Crafty analyse tablebase positions?

Postby Dhanish » 07 May 2008, 07:31

Hi Bob,

Noise>0 is beneficial when using no GUI.

But ordinary mortals use the engine through a GUI, hence making Noise=0 the default option seems to be preferable.

This is behavior similar to most other engines, I suppose.

Regards,
Dhanish
Dhanish
 
Posts: 12
Joined: 21 Apr 2008, 07:49

Re: Can Crafty analyse tablebase positions?

Postby bob » 09 May 2008, 18:28

Dhanish wrote:Hi Bob,

Noise>0 is beneficial when using no GUI.

But ordinary mortals use the engine through a GUI, hence making Noise=0 the default option seems to be preferable.

This is behavior similar to most other engines, I suppose.

Regards,
Dhanish


There is a cost for doing noise 0. The GUI blocks on a read to Crafty, when Crafty sends it a move, that will unblock the GUI and cause a context switch in the operating system. The GUI consumes the line, displays or discards it, and then blocks on a read again, causing a context switch back to Crafty. Each line of output repeats this. In fast games (say playing bullet chess on ICC) this will have a serious impact on performance and time usage, which is why I turn it up enough to not produce any output for about a second or so...
User avatar
bob
 
Posts: 156
Joined: 10 May 2006, 17:59


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 30 guests

cron