Shame

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Shame

Post by Henk »

hgm wrote:
Henk wrote:With TTable it uses 1 minute. But I extract PV from TTable so now I can see more moves of the solution instead of only the best move.
Doesn't that make you suspect something is badly wrong with the engine? Fairy-Max, which does not even have proper move sorting, solves this in 2.37 sec, with TT.

Code: Select all

dep	score	nodes	time	(not shown:  tbhits	knps	seldep)
 14	+79.96 	3.11M  	0:03.71	e4f6 g7f6 a3f8 g8f8 c1h6 f8g8 e1e8
 13	+79.96 	2.46M  	0:03.23	e4f6 g7f6 a3f8 g8f8 c1h6 f8g8 e1e8
 12	+79.96 	2.14M  	0:02.98	e4f6 g7f6 a3f8 g8f8 c1h6 f8g8 e1e8
 11	+79.96 	1.79M  	0:02.64	e4f6 g7f6 a3f8 g8f8 c1h6 f8g8 e1e8
 10	+79.96 	1.67M  	0:02.51	e4f6 g7f6 a3f8 g8f8 c1h6 f8g8 e1e8
  9	+79.96 	1.61M  	0:02.43	e4f6 g7f6 a3f8 g8f8 c1h6 f8g8 e1e8
  8	+79.96 	1.57M  	0:02.40	e4f6 g7f6 a3f8 g8f8 c1h6 f8g8 e1e8
  7	+79.96 	1.55M  	0:02.37	e4f6 g7f6 a3f8 g8f8 c1h6 f8g8 e1e8
  7	 -2.11 	1.49M  	0:02.28	e4d2 c8e6 e1e5 d5c6 a3d3 b8d7 e5g5
  7	 -2.17 	1.21M  	0:01.87	e4g5 c8d7 e1e5 d5d6 a3d6 c7d6 e5e4
  6	 -2.02 	876812	0:01.37	e4g5 c8d7 e1e5 d5d6 a3d6 c7d6
  6	 -2.06 	513016	0:00.81	a3d3 b8c6 e4d6 c6e5 e1e5 d5d6
  5	 -1.87 	57349  	0:00.09	a3d3 f7f5 e4g5 b8c6 c1f4
  4	 -2.04 	11392  	0:00.01	a3d3 f7f5 e4g5 b8c6
  3	 -2.04 	2626    	0:00.00	a3d3 f7f5 e4g5
  2	 -2.03 	587      	0:00.00	a3d3 b8c6
  2	 -2.14 	226      	0:00.00	c1f4 d4d3
  2	 -2.23 	182      	0:00.00	c1d2 d4d3
  2	 -2.39 	149      	0:00.00	c1g5 d4d3
  1	 -1.67 	123      	0:00.00	c1g5
No only if I have seen results of other engines. How fast is the processor you are running Fairy-max ? Actually I was glad it found a solution.
User avatar
Steve Maughan
Posts: 1221
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: Shame

Post by Steve Maughan »

hgm wrote:...something is badly wrong with the engine...
+1

There is a fundamental bug / problem with your engine.

Steve
http://www.chessprogramming.net - Maverick Chess Engine
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Shame

Post by hgm »

Henk wrote:No only if I have seen results of other engines. How fast is the processor you are running Fairy-max ? Actually I was glad it found a solution.
2.4GHz i3, using 192MB hash.

Note micro-Max 1.6 found it in 8.6 sec on the same machine. It does have no TT, no move sorting at all, and no check extension, no PV. It does have recapture extension instead of a QS, however, which is why it finds it already at 6 ply rather than 9 ply. (PxN, KxQ and BxK/RxK benefit from the extension.)

Code: Select all

 97	+79.96 	37.8M  	0:08.60	e4f6
  5	 -2.04 	3.91M  	0:00.95	a3a4
  4	 -2.19 	580524	0:00.14	e4c5
  3	 -1.89 	10332  	0:00.00	c1f4
  2	 -1.98 	713      	0:00.00	c1f4
  1	 -1.83 	67        	0:00.00	c1f4
  0	 -1.98 	1          	0:00.00	a8a8
Last edited by hgm on Tue Apr 07, 2015 5:12 pm, edited 1 time in total.
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: Shame

Post by Henk »

hgm wrote:
Henk wrote:No only if I have seen results of other engines. How fast is the processor you are running Fairy-max ? Actually I was glad it found a solution.
2.4GHz i3, using 192MB hash.

Note micro-Max 1.6 found it in 8.6 sec on the same machine. It does have no TT, no move sorting at all, and no check extension. It does have recapture extension in stead of a QS, however, which is why it finds it already at 6 ply rather than 7.

Code: Select all

 97	+79.96 	37.8M  	0:08.60	e4f6
  5	 -2.04 	3.91M  	0:00.95	a3a4
  4	 -2.19 	580524	0:00.14	e4c5
  3	 -1.89 	10332  	0:00.00	c1f4
  2	 -1.98 	713      	0:00.00	c1f4
  1	 -1.83 	67        	0:00.00	c1f4
  0	 -1.98 	1          	0:00.00	a8a8
Might be move ordering is not important for this problem because there are two sacrifices. I also did disable null move pruning. I only know my move generator is slow.

By the way I still don't trust my TTable implementation. I also don't use Zobrist keys.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Shame

Post by hgm »

Could be. micro-Max 1.6 also has no null move, nor LMR. I was lying though about the move sorting: it does do IID, and puts the best move in front. But like you say, when the solution starts with sacrifices, which pay off only after you see the mate, this might not be helpful at all.
Daniel Anulliero
Posts: 759
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: Shame

Post by Daniel Anulliero »

hgm wrote:
Henk wrote:No only if I have seen results of other engines. How fast is the processor you are running Fairy-max ? Actually I was glad it found a solution.
2.4GHz i3, using 192MB hash.

Note micro-Max 1.6 found it in 8.6 sec on the same machine. It does have no TT, no move sorting at all, and no check extension, no PV. It does have recapture extension instead of a QS, however, which is why it finds it already at 6 ply rather than 9 ply. (PxN, KxQ and BxK/RxK benefit from the extension.)

Code: Select all

 97	+79.96 	37.8M  	0:08.60	e4f6
  5	 -2.04 	3.91M  	0:00.95	a3a4
  4	 -2.19 	580524	0:00.14	e4c5
  3	 -1.89 	10332  	0:00.00	c1f4
  2	 -1.98 	713      	0:00.00	c1f4
  1	 -1.83 	67        	0:00.00	c1f4
  0	 -1.98 	1          	0:00.00	a8a8
The last version of ISA give :

Code: Select all

depth  score     time         nodes     PV
1     -1.84     0.00          293 f2g1
2     -2.33     0.00         1192 f2g1 d4d3
3     -2.21     0.02        14062 a3d3 f7f5 e4g3
4     -2.55     0.05        31576 a3d3 f7f5 e4g3 b8c6
5     -2.13     0.17       122316 a3d3 b8c6 f2g1 c8g4 c1e3
6     -2.26     0.66       483385 e4c5 c8d7 e1e5 d5c4 c5d7 b8d7
7     -1.00     1.73      1105349 e4f6 g7f6 e1e8 g8g7 e8h8 b6c5 h8d8 d5d8 a3c5
8     -1.00     3.00      1334833 e4f6
9     +999.93   3.85       951160 e4f6 g7f6 a3f8 g8f8 c1h6 f8g8 e1e8
3.85 seconds and depth 9 ... :?
not bad ... not bad but some work again ..
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Shame

Post by Evert »

Sjaak:

Code: Select all

#[Chess] 0w (f)>setboard rnb3kr/ppp2ppp/1b6/3q4/3pN3/Q4N2/PPP2KPP/R1B1R3 w - - 0 1
 8r n b       k r 
 7p p p     p p p 
 6  b             
 5      q         
 4      p N       
 3Q         N     
 2P P P     K P P 
 1R   B   R       *
  a b c d e f g h 
#[Chess] 0w (f)>go
  2.    0.13         625  -2.22   1. Kg3    Nc6   
  3.    0.13         697  -2.06   1. Kg3!
  3.    0.14        1000  -1.93   1. Kg3    Nc6    2. Bf4   
  4.    0.18        5955  -2.10   1. Kg3    Bf5    2. Qe7    Nc6   
  5.    0.20        9358  -1.90   1. Nc5!
  5.    0.21       11583  -1.97   1. Nc5    Nd7    2. Re8    Nf8    3.  b4    Qc4   
  6.    0.21       12088  -1.85   1. Nc5!
  6.    0.23       15143  -1.65   1. Qe7!
  6.    0.25       19611  -1.25   1. Qe7!
  6.    0.30       29270  +159.93   1. Nf6!
  6.    0.34       39598  +159.93   1. Nf6     gxf6  2. Qf8    Kxf8   3. Bh6    Kg8   
Jazz:

Code: Select all

#0w>setboard rnb3kr/ppp2ppp/1b6/3q4/3pN3/Q4N2/PPP2KPP/R1B1R3 w - - 0 1
 8♜ ♞ ♝       ♚ ♜ 
 7♟ ♟ ♟     ♟ ♟ ♟ 
 6  ♝             
 5      ♛         
 4      ♟ ♞       
 3♛         ♞     
 2♟ ♟ ♟     ♚ ♟ ♟ 
 1♜   ♝   ♜       
  a b c d e f g h 
#0w (f)>go
  1 -201     0       444    1. Kg1  
  2  15994     1      1738 1. Nf6 gxf6 2. Qf8 Kxf8 3. Bh6 Kg8 
Not sure why they're both omitting the last move though...
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Shame

Post by hgm »

Interesting that you can see this at a nominal depth of 2 ply. Is this because you search checks in the first 3 ply of QS? Or do you re-enter QS after the Kg8 evasion, and does Re8# count again as a first ply?

Fruit already sees it at 1-ply ?! :shock:
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Shame

Post by Evert »

hgm wrote:Interesting that you can see this at a nominal depth of 2 ply. Is this because you search checks in the first 3 ply of QS? Or do you re-enter QS after the Kg8 evasion, and does Re8# count again as a first ply?

Fruit already sees it at 1-ply ?! :shock:
I suspect it's the single reply out of check etension: if there is only one legal move out of check the search is extended. This is on top of the normal evasion extension.
I must have some limit on there to modulate search eplosion, but Idon't remember off the top of my head what it is. I'll check when I'm back at my computer.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Shame

Post by Evert »

Evert wrote:
hgm wrote:Interesting that you can see this at a nominal depth of 2 ply. Is this because you search checks in the first 3 ply of QS? Or do you re-enter QS after the Kg8 evasion, and does Re8# count again as a first ply?

Fruit already sees it at 1-ply ?! :shock:
I suspect it's the single reply out of check etension: if there is only one legal move out of check the search is extended. This is on top of the normal evasion extension.
This is indeed what causes the mate to be found so quickly. If I remove the single-reply out of check extension the mate isn't found until a nominal depth of 6.
I must have some limit on there to modulate search eplosion, but Idon't remember off the top of my head what it is. I'll check when I'm back at my computer.
The limit is on captures: if the only evasion is a capture, I only extend the search if the capture in fact looks good, the logic behind this being that the horizon may be hiding the refutation. I'm not sure this is entirely sound though.
If I remove the restriction and always extend if there is only one move out of check, I get a mate score immediately.

I don't actually do checking moves in the quiescence search, but I do return mate scores from the quiescence search if all moves leading up to it have been checks (in which case I can trust the mate scores since I always search all evasions). I'm pretty sure this is completely useless in terms of playing strength, but it looks nice on this type of positions.