Crafty - no analysis output near mate?

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

Moderator: Ras

cyberfish

Crafty - no analysis output near mate?

Post by cyberfish »

I am writing a bot for FICS for game analysis, and I am using crafty to provide the actual analysis.

While it works in most positions, I noticed that it doesn't produce any output if the position is near mate. For example, in this position

6k1/p1p3pp/2pb1r2/3p4/3R1P2/2P1P2q/PP5Q/R5K1 b - - 2 20

My wild guess is that Crafty doesn't want to produce too much output, so it doesn't output anything for the first second or two, but it stops searching when it sees the mate (within the second or two).

How can I change this behaviour? I don't mind getting lots of output since it's going to be parsed by a program anyways.

Code: Select all

cyberfish@cyberfish-desktop:/data/cpp/AnalyzeBot$ ./crafty

Machine is NUMA, 1 nodes (2 cpus/node)

found computer opening book file [./bookc.bin].

Crafty v22.8 (1 cpus)

White(1): xboard

tellicsnoalias set 1 Crafty v22.8 (1 cpus)
tellicsnoalias kibitz Hello from Crafty v22.8! (1 cpus)
post
force
setboard 6k1/p1p3pp/2pb1r2/3p4/3R1P2/2P1P2q/PP5Q/R5K1 b - - 2 20
analyze
Analyze Mode: type "exit" to terminate.
And it just sits there.

Thanks
Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 10:01 pm
Location: Irvine, CA, USA

Re: Crafty - no analysis output near mate?

Post by Dirt »

cyberfish wrote:I am writing a bot for FICS for game analysis, and I am using crafty to provide the actual analysis.

While it works in most positions, I noticed that it doesn't produce any output if the position is near mate.

My wild guess is that Crafty doesn't want to produce too much output, so it doesn't output anything for the first second or two, but it stops searching when it sees the mate (within the second or two).

How can I change this behaviour? I don't mind getting lots of output since it's going to be parsed by a program anyways.
You, and I think most people, need

Code: Select all

noise 0
in the crafty.rc file. In some positions Crafty may still show as little as just the next move in its PV, followed by <HT> or <EGTB>. That's just the way it is.
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Crafty - no analysis output near mate?

Post by Dann Corbit »

cyberfish wrote:I am writing a bot for FICS for game analysis, and I am using crafty to provide the actual analysis.

While it works in most positions, I noticed that it doesn't produce any output if the position is near mate. For example, in this position

6k1/p1p3pp/2pb1r2/3p4/3R1P2/2P1P2q/PP5Q/R5K1 b - - 2 20

My wild guess is that Crafty doesn't want to produce too much output, so it doesn't output anything for the first second or two, but it stops searching when it sees the mate (within the second or two).

How can I change this behaviour? I don't mind getting lots of output since it's going to be parsed by a program anyways.

Code: Select all

cyberfish@cyberfish-desktop:/data/cpp/AnalyzeBot$ ./crafty

Machine is NUMA, 1 nodes (2 cpus/node)

found computer opening book file [./bookc.bin].

Crafty v22.8 (1 cpus)

White(1): xboard

tellicsnoalias set 1 Crafty v22.8 (1 cpus)
tellicsnoalias kibitz Hello from Crafty v22.8! (1 cpus)
post
force
setboard 6k1/p1p3pp/2pb1r2/3p4/3R1P2/2P1P2q/PP5Q/R5K1 b - - 2 20
analyze
Analyze Mode: type "exit" to terminate.
And it just sits there.

Thanks
I think that the problem is related to instant solution (but it looks like a bug since Crafty should cough up an answer and let you know that there is nothing left to analyze. You can get output by typing go instead of analyze:

Code: Select all

Initializing multiple threads.
System is SMP, not NUMA.

Crafty v22.8 JA (1 cpus)

White(1): xboard

tellicsnoalias set 1 Crafty v22.8 JA (1 cpus)
tellicsnoalias kibitz Hello from Crafty v22.8 JA! (1 cpus)

tellicsnoalias set 1 Crafty v22.8 (1 cpus)
Illegal move: tellicsnoalias
tellicsnoalias kibitz Hello from Crafty v22.8! (1 cpus)
Illegal move: tellicsnoalias
post
force
setboard 6k1/p1p3pp/2pb1r2/3p4/3R1P2/2P1P2q/PP5Q/R5K1 b - - 2 20
go
move Rg6+
Hint: Qg3
You can get more detail this way if you like:

Code: Select all

Initializing multiple threads.
System is SMP, not NUMA.

Crafty v22.8 JA (1 cpus)

White(1): mt 4
max threads set to 4
White(1): st 60
search time set to 60.00.
White(1): setboard  6k1/p1p3pp/2pb1r2/3p4/3R1P2/2P1P2q/PP5Q/R5K1 b - - 2 20
              puzzling over a move to ponder.
              depth   time  score   variation (1)
starting thread 1
starting thread 2
starting thread 3
Black(1): Rg6+ [pondering]
              time surplus   0.00  time limit 1:00 (+0.00) (1:00)
              depth   time  score   variation (1)
                8->   0.03 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
                9     0.08 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
                9->   0.09 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
                                    (s=2)
               10     0.19 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               10->   0.20 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               11     0.44 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               11->   0.45 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               12     1.28 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               12->   1.33 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               13     3.29 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               13->   3.35 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               14     9.77 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               14->   9.98 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               15    34.77 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               15->  35.37 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               16    45.12    1/4?  2. Qg3     (12.5Mnps)
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Crafty - no analysis output near mate?

Post by bob »

Dann Corbit wrote:
cyberfish wrote:I am writing a bot for FICS for game analysis, and I am using crafty to provide the actual analysis.

While it works in most positions, I noticed that it doesn't produce any output if the position is near mate. For example, in this position

6k1/p1p3pp/2pb1r2/3p4/3R1P2/2P1P2q/PP5Q/R5K1 b - - 2 20

My wild guess is that Crafty doesn't want to produce too much output, so it doesn't output anything for the first second or two, but it stops searching when it sees the mate (within the second or two).

How can I change this behaviour? I don't mind getting lots of output since it's going to be parsed by a program anyways.

Code: Select all

cyberfish@cyberfish-desktop:/data/cpp/AnalyzeBot$ ./crafty

Machine is NUMA, 1 nodes (2 cpus/node)

found computer opening book file [./bookc.bin].

Crafty v22.8 (1 cpus)

White(1): xboard

tellicsnoalias set 1 Crafty v22.8 (1 cpus)
tellicsnoalias kibitz Hello from Crafty v22.8! (1 cpus)
post
force
setboard 6k1/p1p3pp/2pb1r2/3p4/3R1P2/2P1P2q/PP5Q/R5K1 b - - 2 20
analyze
Analyze Mode: type "exit" to terminate.
And it just sits there.

Thanks
I think that the problem is related to instant solution (but it looks like a bug since Crafty should cough up an answer and let you know that there is nothing left to analyze. You can get output by typing go instead of analyze:

Code: Select all

Initializing multiple threads.
System is SMP, not NUMA.

Crafty v22.8 JA (1 cpus)

White(1): xboard

tellicsnoalias set 1 Crafty v22.8 JA (1 cpus)
tellicsnoalias kibitz Hello from Crafty v22.8 JA! (1 cpus)

tellicsnoalias set 1 Crafty v22.8 (1 cpus)
Illegal move: tellicsnoalias
tellicsnoalias kibitz Hello from Crafty v22.8! (1 cpus)
Illegal move: tellicsnoalias
post
force
setboard 6k1/p1p3pp/2pb1r2/3p4/3R1P2/2P1P2q/PP5Q/R5K1 b - - 2 20
go
move Rg6+
Hint: Qg3
You can get more detail this way if you like:

Code: Select all

Initializing multiple threads.
System is SMP, not NUMA.

Crafty v22.8 JA (1 cpus)

White(1): mt 4
max threads set to 4
White(1): st 60
search time set to 60.00.
White(1): setboard  6k1/p1p3pp/2pb1r2/3p4/3R1P2/2P1P2q/PP5Q/R5K1 b - - 2 20
              puzzling over a move to ponder.
              depth   time  score   variation (1)
starting thread 1
starting thread 2
starting thread 3
Black(1): Rg6+ [pondering]
              time surplus   0.00  time limit 1:00 (+0.00) (1:00)
              depth   time  score   variation (1)
                8->   0.03 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
                9     0.08 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
                9->   0.09 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
                                    (s=2)
               10     0.19 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               10->   0.20 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               11     0.44 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               11->   0.45 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               12     1.28 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               12->   1.33 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               13     3.29 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               13->   3.35 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               14     9.77 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               14->   9.98 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               15    34.77 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               15->  35.37 -Mat03   2. Qg3 Rxg3+ 3. Kf2 Rg2+ 4. Kf1 Qh1#
               16    45.12    1/4?  2. Qg3     (12.5Mnps)
BTW pretty quick hardware for just 4 cores. what processor???