Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Trouble with draw detection

Author: Will Singleton

Date: 10:20:10 03/21/04

Go up one level in this thread


On March 21, 2004 at 09:37:01, Andrew Wagner wrote:

>So Trueno just played this little game:
>
>[Event "ICC 15 0"]
>[Site "Internet Chess Club"]
>[Date "2004.03.21"]
>[Round "-"]
>[White "claudiogm04"]
>[Black "Trueno"]
>[Result "1/2-1/2"]
>[ICCResult "Game drawn by repetition"]
>[WhiteElo "1882"]
>[BlackElo "1815"]
>[Opening "French defense"]
>[ECO "C00"]
>[NIC "FR.01"]
>[Time "08:39:36"]
>[TimeControl "900+0"]
>
>1. e4 e6 2. Nf3 Nc6 3. d4 Nf6 4. Bg5 Be7 5. Nbd2 O-O 6. c3 d5 7. e5 Ne4 8.
>Nxe4 dxe4 9. Bxe7 Qxe7 10. Nd2 Qh4 11. g3 Qh6 12. Nxe4 Rd8 13. Bg2 Nxe5 14.
>Qe2 Nd7 15. O-O Nf6 16. Nc5 Nd5 17. c4 Nb6 18. Nxb7 Bxb7 19. Bxb7 Rab8 20.
>Bg2 Rxd4 21. b3 Rd2 22. Qe5 Rd6 23. c5 Nd7 24. Qc3 Qd2 25. Rfc1 Qxc3 26.
>Rxc3 Rd2 27. Bc6 Ne5 28. Bg2 Nd3 29. f4 Nb4 30. a3 Nd5 31. Bxd5 exd5 32. c6
>d4 33. Rcc1 Rxb3 34. Re1 Kf8 35. Red1 Rxa3 36. Rxd2 Rxa1+ 37. Kf2 Ra4 38. g4
>Ke7 39. Kf3 Kd6 40. Ke4 Kc5 41. Rc2+ Kd6 42. Rd2 Kc5 43. Rc2+ Kd6 44. Rd2
>Kc5 45. Rc2+ Kd6 {Game drawn by repetition} 1/2-1/2
>
>Very typical game vs. a human for Trueno. It keeps getting itself in trouble
>positionally, and then rescuing itself tactically. Anyway, it finally has a
>clear edge in this position: [d]8/p1p2ppp/2P5/2k5/r2pKPP1/8/2R4P/8 b - -
>...but refuses to play the obvious Rc4, choosing instead to happily repeat the
>position to a draw. So, I put in the whole game manually, took back the last
>Kd6, and had it do a search. Immediately, it saw Rc4. Then, I plugged in the
>above position cold, via a FEN, so it wouldn't know it was a repetition. It
>played Kd6, I responded Rd2, to see if it would repeat, and it played Kxc6,
>which is an acceptable move.
>
>Soooo, I'm thinking there must be a problem with retreiving drawn positions from
>the hash table? I'm wondering if this could be a similar phenomenon to what is
>described on Bruce Moreland's page
>http://www.seanet.com/~brucemo/topics/repetition.htm . At this point, all I've
>been doing is, for every move made, I store the hash of the old position along
>with the takeback information. Then, at the top of my search, quiesce, and eval,
>I check to see if the current hash key appears 2 or more times previously.
>
>Any suggestions?

This can be a difficult area.  But first, in the game above, there was a 3-time
rep after 44.Rd2.  I don't know if your program noticed this, but otoh, you
wouldn't want to claim the draw in that position anyway.  I'm surprised ICC
didn't call it, I think it's supposed to.

A general debugging aid for rep problems is to disable hashing.  You want to
make things as simple as possible.  In your example above, when you entered the
game moves manually and it played Rc4, that indicates that the hash is causing
problems.  (as does the second test you did.)  Try disabling hash, then playing
the game starting from move 39.

I can't tell from your description whether you store and test both the game
moves and the current search tree moves.  There are various ways to score a draw
depending on combinations of those instances, as Moreland's page describes.  Not
sure why you test for draw in the eval, the top of the main search should be
sufficient.



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.