Author: Sune Fischer
Date: 17:04:17 05/05/04
Go up one level in this thread
On May 05, 2004 at 19:39:48, Dieter Buerssner wrote:
>>Why do you use special code for this endgame?
>
>Out of curiosity. Also, because Tord specifically asked for this. My normal code
>got a draw only from that maximum mate position in game in one minute (although
>it won your position). Game in 2 minutes, it won.
It's tougher, needed 45 moves in selfplay at 5 seconds without TBs.
Then I gave the defender TBs and it couldn't do it 5 seconds or 10 seconds.
Managed to do it in 1 minute, though still 10 moves away from optimal:
[Event "WinBoard"]
[Site "Local Event"]
[Result "1-0"]
[Date "05/06/04"]
[White "Frenzee 156.4"]
[Black "Frenzee 156.4TBs"]
[WhiteElo "2400"]
[BlackElo "2400"]
[PlyCount "89"]
[FEN "8/8/8/8/2r5/8/2k5/K6Q w - - 0 1"]
[TimeControl "0 1 0"]
{hash 58,ponder 0,egtbs 0,threads 1
[moves,time,score,depth/seldepth,mnps,tbhits/tbprobes,pv]}
1.Qg2+ Kc3 {00:00.81, 4.91, 8/18, 0.92, 0/0, 1.Qg2+ Kd3 2.Kb2 }
2.Qg7+ Kc2 {00:00.96, 4.92, 9/19, 1.11, 0/0, 2.Qg7+ }
3.Qg6+ Kc3 {00:00.96, 4.92, 9/23, 1.12, 0/0, 3.Qg6+ }
4.Kb1 Kd4 {00:00.94, 4.98, 10/21, 1.15, 0/0, 4.Kb1 Kd4 5.Qd6+ Ke3 6.Kb2
Ke4 7.Qe6+ Kd4 8.Qd7+ Ke5 9.Qb5+ }
5.Qd6+ Kc3 {00:00.92, 5.06, 10/20, 1.16, 0/0, 5.Qd6+ Ke3 6.Kb2 Ke4 7.Kb3
Rd4 8.Qe6+ Kf4 9.Kc2 Re4 10.Qd6+ Kg4 11.Kd3 }
6.Kc1 Rd4 {00:01.11, 5.07, 10/22, 1.18, 0/0, 6.Kc1 Rd4 7.Qf6 Kc4 8.Kc2
Kd5 9.Kc3 Re4 10.Kd3 }
7.Qf6 Kd3 {00:01.07, 5.12, 10/21, 1.13, 0/0, 7.Qf6 K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Kc6 }
42.Kd6 Kb6 {00:00.83, #4, 11/20, 1.29, 0/0, 42.Kd6 Kb6 43.Qb4+ Ka7
44.Kc6 }
43.Qb4+ Ka6 {00:00.18, #3, 10/ 0, 1.28, 0/0, 43.Qb4+ Ka7 44.Kc6 }
44.Kc6 Ka7 {00:00.00, #2, 8/ 0, 0.44, 0/0, 44.Kc6 Ka7 }
45.Qb7++ {White mates} 1-0
>>[FEN "8/4kr2/8/8/8/2Q5/2K5/8 w - - 0 1"]
>
>This is a bit easier, than the position I used. Out of more curiosity, I changed
>the formula again (just from my feeling).
>
> score = 600 + 5*DISTANCE(kl,r) - 20*EDGE_DIST(kl)
> - 10*CORNER_DIST(kl) - 15*DISTANCE(kl,kw);
> if (EDGE_DIST(kw) < 2) /* Keep winning K away from the edge */
> score += 8 * (EDGE_DIST(kw)-2);
> if (CORNER_DIST(kw) < 2) /* Keep winning K away from the corner */
> score += 8 * (CORNER_DIST(kw)-2);
>
>With this, a fixed search depth of 6 (+ normal extensions, also using normal
>null move R=2 as long as both pieces are on the board) was enough to win the
>maximum mate position I gave in an earlier post against TBs. The previous
>formula needed a search depth of 8. But it could also be noise, what I saw, and
>with other positions, other results will occure.
I don't use nullmove in pawnless positions, not sure if it matters. I guess it
only fails-high if you actually lose a piece.
>I won't doubt, that your general scoring of pawnless endgames is just as good
>(mine was not).
If it works in 99% of the cases then that's a good start.
The remaining problems are not urgent, perhaps I can leave them to TBs entirely
and claim it's a waste of time for a programmer to fiddle with :)
Actually there are positions where the code doesn't work, e.g. KRKN.
I think the right plan is to isolate the knight and capture it by hunting it to
a corner. I wonder how many engines has that knowledge? :)
-S.
>Regards,
>Dieter
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.