It's the end game. White is 3 pawns ahead, but black keeps threatening to take 1 of 2 pawns.. white shuffles it's king back and forth to save both pawns resulting in 3 fold rep. If white gave up one pawn he could win the game, but it's beyond the horizon.
Any way to remedy this ???
How do you fix this.
Moderators: hgm, Rebel, chrisw
-
- Posts: 2488
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: How do you fix this.
You should recognise repetitions in the search tree and e.g. score them with 0.
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net
-
- Posts: 199
- Joined: Sun Nov 03, 2013 9:32 am
Re: How do you fix this.
I do, and the program avoids it for a while but eventually fails.....
Maybe I should check the 3 fold code.
Hmm ?
Maybe I should check the 3 fold code.
Hmm ?
-
- Posts: 347
- Joined: Tue Nov 19, 2019 4:34 am
- Location: https://github.com/TerjeKir/weiss
- Full name: Terje Kirstihagen
Re: How do you fix this.
Did your engine give a score of 0 when it played the drawing move? The turns leading up to it?
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: How do you fix this.
Should go like this:
You should be at +3.00 (3 pawns ahead) plus whatever positional score you add in.
As you make moves without pushing a pawn, eventually you will run into the 50 move rule and draw. BUT, your program should realize that 3-fold or 50 move rule is 0.00, which is < 3.00. And also less than 2.00 (if you give up a pawn).
About the only way I could see your case happening is if your 3-fold rep code is broken. Or else your search sees the 3-fold rep but scores it incorrectly...
You should be at +3.00 (3 pawns ahead) plus whatever positional score you add in.
As you make moves without pushing a pawn, eventually you will run into the 50 move rule and draw. BUT, your program should realize that 3-fold or 50 move rule is 0.00, which is < 3.00. And also less than 2.00 (if you give up a pawn).
About the only way I could see your case happening is if your 3-fold rep code is broken. Or else your search sees the 3-fold rep but scores it incorrectly...
-
- Posts: 199
- Joined: Sun Nov 03, 2013 9:32 am
Re: How do you fix this.
Yep, it does return zero.....and I couldn't agree more with your reasoning ??
When I set up the position again and try to reproduce it.....guess what !! I can't yet. So there must be
a bug somewhere. Ahh well, gives me something to think about while the golf course is closed.
When I set up the position again and try to reproduce it.....guess what !! I can't yet. So there must be
a bug somewhere. Ahh well, gives me something to think about while the golf course is closed.
-
- Posts: 4319
- Joined: Tue Apr 03, 2012 4:28 pm
-
- Posts: 334
- Joined: Sat Feb 25, 2012 10:42 pm
- Location: Stockholm
Re: How do you fix this.
I think your problem could be that you maybe only look for 3-folds in the search path from your current position. You should look back in the history of previous moves until a pawn push, a capture or a castling has taken place since those are irreversible.
If this is the problem you might see a correct draw in the beginning but when you passes (have played) the position that Will repeat, the engine still thinks it can repeat 3 times ...
-
- Posts: 199
- Joined: Sun Nov 03, 2013 9:32 am
Re: How do you fix this.
Yes, you guessed it, I found a bug.
Or should I say a dumb logic mistake.
Or should I say a dumb logic mistake.