I have been reading several interesting posts on this and other forums about Critter learning capabilities. For example, here some details on its usage are given along with comparison with the learning capabilities of other engines:
http://rybkaforum.net/cgi-bin/rybkaforu ... ?tid=25154
I tried myself to use Critter and I have generated a session file, but it is in a binary format and it is not human-readable as I open from reading the above link. Is there any way that I can extract text info from the session file or at least have a clue of the learning process that it is going on?
Thanks in advance.
Arturo
Extracting info from Critter session file
Moderators: hgm, Rebel, chrisw
-
- Posts: 481
- Joined: Thu Apr 16, 2009 12:00 pm
- Location: Slovakia, EU
Re: Extracting info from Critter session file
No, because positions are not stored in the session file, only hash keys (like in polyglot opening books).arturo100 wrote:Is there any way that I can extract text info from the session file
There is a console mode command that probes the session file for the current position - I used it for debugging. Open critter in a console window, setup the session file location, enter a position and type "sf probe".arturo100 wrote: or at least have a clue of the learning process that it is going on?
Here is an example:
Code: Select all
setoption name session file value c:/chess/engines/critter16a/session.csf
position fen rnbqkbnr/ppp1pppp/8/3p4/3P4/8/PPP1PPPP/RNBQKBNR w KQkq - 0 2
sf probe
Code: Select all
depth score line
-------------------
13 +0.18 Bf4
-------------------
1 entries found
-
- Posts: 27790
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Extracting info from Critter session file
I have only a vague idea what such a session file would be used for, so please correct me if I am wrong: this session file contains only (position, score) pairs that can be assigned by the user? Or does it also contain other information about the positions?
The reason I ask is that I would like to allow the user to operate such a session file through the GUI. E.g. by setting up a position, and then allowing the user to type "=xxx" with xxx a score in centi-Pawn, to define the score of any position. This of course would require some standard protocol to communicate it to the engine. For WB protocol I proposed to use the 'setscore xxx' command for this.
How does this work in Critter now? Is there an engine-defined option that can be used to add positions to the session file?
The reason I ask is that I would like to allow the user to operate such a session file through the GUI. E.g. by setting up a position, and then allowing the user to type "=xxx" with xxx a score in centi-Pawn, to define the score of any position. This of course would require some standard protocol to communicate it to the engine. For WB protocol I proposed to use the 'setscore xxx' command for this.
How does this work in Critter now? Is there an engine-defined option that can be used to add positions to the session file?
-
- Posts: 481
- Joined: Thu Apr 16, 2009 12:00 pm
- Location: Slovakia, EU
Re: Extracting info from Critter session file
It is very much like a persistent hash table and each entry contains a hashkey, score, depth and the best move.hgm wrote:I have only a vague idea what such a session file would be used for, so please correct me if I am wrong: this session file contains only (position, score) pairs that can be assigned by the user? Or does it also contain other information about the positions?
for storing a position:hgm wrote: How does this work in Critter now? Is there an engine-defined option that can be used to add positions to the session file?
Code: Select all
position fen <fen-string>
sf store <score> <best_move> <depth>
for deleting:
Code: Select all
position fen <fen-string>
sf delete [n]
-
- Posts: 27790
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Extracting info from Critter session file
Are there GUIs that support this format? Or must people that want to use the session file always run Critter from the command line?
If the latter is the case, would you have any objection to (also) support the session file through commands that fit better in the existing UCI option framework? Like defining "sf store" and "sf delete" as UCI string options, and then respond to
?
This would also allow users of GUIs that have no special provision for these commands to emit them from the GUI. (Problem could be that they have no way to emit the "position fen" command other than actually starting a search / analysis on the position. Would Critter still remember the position after such a search, when it receives the sf command, or is it mandatory to set up the position again? I guess a convenient way for the user to store a position in the session file could be through a button option that stores the current analysis (i.e. the last PV info received from it) in the session file while the analysis is still going on).
If the latter is the case, would you have any objection to (also) support the session file through commands that fit better in the existing UCI option framework? Like defining "sf store" and "sf delete" as UCI string options, and then respond to
Code: Select all
setoption name sf store value <score> <move> <depth>
This would also allow users of GUIs that have no special provision for these commands to emit them from the GUI. (Problem could be that they have no way to emit the "position fen" command other than actually starting a search / analysis on the position. Would Critter still remember the position after such a search, when it receives the sf command, or is it mandatory to set up the position again? I guess a convenient way for the user to store a position in the session file could be through a button option that stores the current analysis (i.e. the last PV info received from it) in the session file while the analysis is still going on).
-
- Posts: 481
- Joined: Thu Apr 16, 2009 12:00 pm
- Location: Slovakia, EU
Re: Extracting info from Critter session file
No.hgm wrote:Are there GUIs that support this format?
If they want to manually override/delete individual entries then yes. Otherwise it is fully transparent to the user.hgm wrote: Or must people that want to use the session file always run Critter from the command line?
I will implement this in the next version.hgm wrote: If the latter is the case, would you have any objection to (also) support the session file through commands that fit better in the existing UCI option framework? Like defining "sf store" and "sf delete" as UCI string options, and then respond to
?Code: Select all
setoption name sf store value <score> <move> <depth>
Yes, Critter remembers the last searched position.hgm wrote: This would also allow users of GUIs that have no special provision for these commands to emit them from the GUI. (Problem could be that they have no way to emit the "position fen" command other than actually starting a search / analysis on the position. Would Critter still remember the position after such a search, when it receives the sf command, or is it mandatory to set up the position again?
If the session file is enabled, current analysis result is being written to it on each completed iteration automatically. No extra user action is needed.hgm wrote: I guess a convenient way for the user to store a position in the session file could be through a button option that stores the current analysis (i.e. the last PV info received from it) in the session file while the analysis is still going on).