Unreliable mate scores

Discussion of chess software programming and technical issues.

Moderator: Ras

metax
Posts: 344
Joined: Wed Sep 23, 2009 5:56 pm
Location: Germany

Unreliable mate scores

Post by metax »

I have a problem with unreliable mate scores. This is not really fatal, but somehow annoying. Until now I ignored it, but the following output is really strange. Take a look yourself:

[d]5k2/8/8/8/8/2P5/8/3K4 w - - 0 1

Code: Select all

FEN: 5k2/8/8/8/8/2P5/8/3K4 w - - 0 1 

ChessMind:
  1/1	00:00	           0	0	+1,61	c3c4
  2/2	00:00	          93	0	+1,45	c3c4 Kf8e7
  3/7	00:00	         215	1.000	+1,63	c3c4 Kf8e7 c4c5
  4/9	00:00	         478	3.000	+1,55	c3c4 Kf8e7 c4c5 Ke7e6
  5/10	00:00	         996	7.000	+1,51	c3c4 Kf8e7 Kd1c2 Ke7d6 Kc2c3
  6/10	00:00	       2.759	21.000	+1,51	c3c4 Kf8e7 Kd1c2 Ke7d6 Kc2c3 Kd6c5
  6/12	00:00	       2.759	21.000	+1,59	Kd1e2 Kf8e7 Ke2d3 Ke7d6 Kd3d4 Kd6e7
  7/14	00:00	       5.193	41.000	+1,77	Kd1e2 Kf8e7 Ke2d3 Ke7d6 Kd3d4 Kd6e7 c3c4
  8/16	00:00	       9.782	68.000	+1,77	Kd1e2 Kf8e7 Ke2d3 Ke7d6 Kd3d4 Kd6e7 c3c4 Ke7e6
  9/17	00:00	      14.284	100.000	+1,85	Kd1e2 Kf8e7 Ke2d3 Ke7d6 Kd3d4 Kd6e7 c3c4 Ke7d6 c4c5+ Kd6c6
 10/19	00:00	      24.021	153.000	+1,93	Kd1e2 Kf8e7 Ke2d3 Ke7d6 Kd3d4 Kd6e7 c3c4 Ke7d6 c4c5+ Kd6c6 Kd4c4
 11/20	00:00	      36.132	191.000	+1,93	Kd1e2 Kf8e7 Ke2d3 Ke7d6 Kd3d4 Kd6c6 c3c4 Kc6d6
 12/23	00:00	      51.411	252.000	+1,95	Kd1e2 Kf8e7 Ke2d3 Ke7d6 Kd3d4 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7 Kb5c5 Kc7b7 Kc5d6 Kb7b6 c3c4 Kb6b7 c4c5 Kb7c8 Kd6c6 Kc8d8 Kc6b7 Kd8e7 c5c6 Ke7f6 c6c7 Kf6g5 c7c8D Kg5f6

Well, it takes really long to find the winning move because it hasn't got an evaluation for KPK endgames and has to rely on its search which also sees the promotion late... but that's not the topic here. The problem is the mate score which is really strange. I saw other mate scores in other positions which were wrong by about 3-4 ply (1-2 moves) and were found after playing the move on the board.
Any idea where unreliable mate scores could come from?
zamar
Posts: 613
Joined: Sun Jan 18, 2009 7:03 am

Re: Unreliable mate scores

Post by zamar »

Any idea where unreliable mate scores could come from?
One possibility:
You are pruning moves when bestValue < value_mated_in(PLY_MAX)
Joona Kiiski
metax
Posts: 344
Joined: Wed Sep 23, 2009 5:56 pm
Location: Germany

Re: Unreliable mate scores

Post by metax »

zamar wrote:One possibility:
You are pruning moves when bestValue < value_mated_in(PLY_MAX)
Never. I do not even reduce if bestValue < ValueMatedIn(MAX_PLY).
metax
Posts: 344
Joined: Wed Sep 23, 2009 5:56 pm
Location: Germany

Re: Unreliable mate scores

Post by metax »

The mate score does not disappear if I play 1.Kc2 on the board:

Code: Select all

FEN: 5k2/8/8/8/8/2P5/2K5/8 b - - 0 1 

ChessMind:
  1/5	00:00	           0	0	+1,35	Kf8e7
  2/6	00:00	         100	0	+1,51	Kf8e7 c3c4
  3/6	00:00	         254	2.000	+1,43	Kf8e7 c3c4 Ke7d6
  4/7	00:00	         491	3.000	+1,51	Kf8e7 c3c4 Ke7d6 Kc2c3
  5/9	00:00	         973	7.000	+1,59	Kf8e7 Kc2d3 Ke7d6 Kd3d4 Kd6e7
  6/11	00:00	       1.911	13.000	+1,77	Kf8e7 Kc2d3 Ke7d6 Kd3d4 Kd6e7 c3c4
  7/15	00:00	       3.458	24.000	+1,77	Kf8e7 Kc2d3 Ke7d6 Kd3d4 Kd6e7 c3c4 Ke7e6
  8/16	00:00	       8.443	59.000	+1,85	Kf8e7 Kc2d3 Ke7d6 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 Kc7d7 Kc5b6 Kd7e6 c3c4 Ke6d7 c4c5 Kd7c8 Kb6c6
I'll try playing 1...Ke7 on the board and look if the mate score disappears then.
metax
Posts: 344
Joined: Wed Sep 23, 2009 5:56 pm
Location: Germany

Re: Unreliable mate scores

Post by metax »

OK, the mate score does not disappear after playing 1.Kc2 Ke7, but, as usually with the unreliable mate scores in my engine, the number of moves drops.

Code: Select all

FEN: 8/4k3/8/8/8/2P5/2K5/8 w - - 0 1 

ChessMind:
  1/5	00:00	           0	0	+1,51	c3c4
  2/5	00:00	         143	1.000	+1,43	c3c4 Ke7d6
  3/6	00:00	         319	2.000	+1,51	c3c4 Ke7d6 Kc2c3
  4/8	00:00	         735	6.000	+1,51	c3c4 Ke7d6 Kc2c3 Kd6c5
  4/8	00:00	         735	6.000	+1,59	Kc2d3 Ke7d6 Kd3d4 Kd6e7
  5/9	00:00	       1.677	15.000	+1,77	Kc2d3 Ke7d6 Kd3d4 Kd6e7 c3c4
  6/11	00:00	       2.867	26.000	+1,77	Kc2d3 Ke7d6 Kd3d4 Kd6e7 c3c4 Ke7e6
  7/14	00:00	       4.593	41.000	+1,85	Kc2d3 Ke7d6 Kd3d4 Kd6e7 c3c4 Ke7d6 c4c5+ Kd6c6
  8/17	00:00	       9.944	78.000	+1,93	Kc2d3 Ke7d6 Kd3d4 Kd6e7 c3c4 Ke7d6 c4c5+ Kd6c6 Kd4c4
  9/18	00:00	      18.287	129.000	+1,93	Kc2d3 Ke7d6 Kd3d4 Kd6e6 c3c4 Ke6d6
 10/19	00:00	      29.419	187.000	+2,11	Kc2d3 Ke7d6 Kd3d4 Kd6e6 c3c4 Ke6d6 c4c5+ Kd6c6 Kd4c4 Kc6d7 Kc4d5
 11/22	00:00	      43.657	253.000	+2,11	Kc2d3 Ke7d6 Kd3d4 Kd6e6 c3c4 Ke6d6 c4c5+ Kd6c6 Kd4c4 Kc6d7 Kc4d5 Kd7c7
 12/22	00:00	      66.663	326.000	+1,95	Kc2d3 Ke7d6 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 c3c4 Ke5d6 Kb4b5 Kd6e5 Kb5b6 Ke5f4 c4c5 Kf4g3 c5c6 Kg3h2 c6c7 Kh2g1 c7c8D Kg1f2 Kb6c5 Kf2g1
 21/46	00:07	   4.609.096	594.000	+60,05	Kc2b3 Ke7d6 Kb3b4 Kd6e5 c3c4 Ke5d6 Kb4b5 Kd6e5 c4c5 Ke5f4 c5c6 Kf4g3 c6c7 Kg3h2 c7c8D Kh2g1 Kb5c6 Kg1f2 Kc6d5 Kf2g1 Kd5e4
 22/48	00:32	  20.777.376	645.000	+60,05	Kc2b3 Ke7d6 Kb3b4 Kd6e5 c3c4 Ke5d6 Kb4b5 Kd6e5 c4c5 Ke5f4 c5c6 Kf4g3 c6c7 Kg3h2 c7c8D Kh2g3 Kb5c6 Kg3h2 Kc6d5 Kh2g1
 23/50	01:04	  38.359.872	592.000	+M49	Kc2b3 Ke7d6 Kb3b4 Kd6c6 Kb4c4 Kc6b6 Kc4d5 Kb6c7
 24/50	01:05	  38.564.017	592.000	+M49	Kc2b3
 25/50	01:07	  39.896.979	592.000	+M49	Kc2b3
 26/50	01:07	  40.173.449	593.000	+M49	Kc2b3
 27/50	01:08	  40.419.923	593.000	+M49	Kc2b3
 28/50	01:09	  41.211.300	596.000	+M49	Kc2b3
 29/50	01:14	  44.370.115	594.000	+M49	Kc2b3
 30/50	01:16	  45.205.110	596.000	+M49	Kc2b3
 31/50	01:16	  45.645.750	597.000	+M49	Kc2b3
 32/50	01:17	  46.378.152	598.000	+M49	Kc2b3
 33/50	01:19	  47.329.099	599.000	+M49	Kc2b3
 34/50	01:20	  48.212.792	599.000	+M49	Kc2b3
 35/50	01:22	  49.180.554	600.000	+M49	Kc2b3
 36/50	01:22	  49.422.512	600.000	+M49	Kc2b3
 37/50	05:42	 195.821.562	572.000	+M49	Kc2b3
 38/50	05:47	 199.006.195	573.000	+M49	Kc2b3
 39/50	10:08	 340.943.368	560.000	+M49	Kc2b3
 40/50	10:10	 342.460.917	561.000	+M49	Kc2b3
 41/50	11:52	 399.427.176	560.000	+M49	Kc2b3
 42/50	14:09	 476.880.412	561.000	+M49	Kc2b3
 43/50	14:10	 478.184.223	562.000	+M49	Kc2b3
User avatar
hgm
Posts: 28391
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Unreliable mate scores

Post by hgm »

I guess that with 'unreliabe' you actually mean 'nonsensical'. No way you could ever see a mate in 435...

I guess you will have to debug it the hard way. First approach the mate by plying the PV moves until you get the correct DTM. Then take the previous case, where you got a wrong one, and trace back where it came from. By following the PV to the hash hit, and then continuing from the node that filled the hash entry, etc, you should eventually be able to figure out what goes wrong.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Unreliable mate scores

Post by Sven »

metax wrote:Any idea where unreliable mate scores could come from?
I had such kind of problems when my mapping of mate scores at the time of writing to resp. reading from hash was wrong.

Sven
jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Re: Unreliable mate scores

Post by jwes »

Something simple you can try is save alpha,beta, and if the value came from the tt in your pv array.
Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 9:19 pm
Location: Oslo, Norway

Re: Unreliable mate scores

Post by Tord Romstad »

metax wrote:Any idea where unreliable mate scores could come from?
I don't know where they could come from, but I can describe a simple technique I use to debug such problems. Perhaps it will be useful to you as well.

Write a function that prints the contents of a transposition table entry (key, best move, search depth, value, value type, etc.) to the standard output, and add a new command to display the transposition table entry corresponding to the current board position to your XBoard/UCI code. You can now manually "browse the search tree" after a search is finished by making moves and inspecting the transposition table information for the resulting positions. With some luck, this will help you discover where the mate scores are coming from. While doing this, you may also want to add some extra information useful for debugging to your TT entries (and, of course, to the function that prints them).

Unfortunately, the position you give isn't the type that is best suited to this debugging technique. The extreme number of transpositions make the TT contents rather confusing. If you can find a middle game position where the same bug occurs, that's a better one to use for debugging.
User avatar
Desperado
Posts: 879
Joined: Mon Dec 15, 2008 11:45 am

Re: Unreliable mate scores

Post by Desperado »

Hello Luca,

of course i dont know too, where your strange values came from.

But long time ago i also had some simliar (maybe the same) problem.

There it is:

i recognized when storing the mate values to trans, i was
producing invalid scores somehow (outside the bounds).

Code: Select all

//--------valueToTrans------------------
//--------------------------------------

VAL_T valueToTrans(VAL_T value,PLY_T cdp)
	{
	       if (value < -matescore) value -= cdp; //ex: lbound=-32000 value=-31980 cdp = 30 -> ?? -32010
	  else if (value >  matescore) value += cdp; //ex: ubound=+32000 value=+31980 cdp = 30 -> ?? +32010
     return(value);
	}
Now there is a lot of room for bugs, having such scores...
depending of what is happening when you retrieve them.

hm, if that is not directly the problem, maybe it is a good place to
start, looking at what is going on.

helping avoiding such cases was at least for me, introducing _matePruning_.
Further this kind of pruning avoids that a mate in 7 becomes a mate in 7+x value...

good luck

Michael