Hi,
I expect you get a "position startpos moves e2e4..." etc. from lichess with every new position. If you replay it afterwards with a "position fen" you don't have the positions that happened before the current position. If that is the case there might be a bug in your repetition detection, which will be executed in lichess, but not with the position fen.
Ronald
Bug in my engine
Moderators: hgm, Rebel, chrisw
-
- Posts: 160
- Joined: Tue Jan 23, 2018 10:18 am
- Location: Rotterdam
- Full name: Ronald Friederich
-
- Posts: 32
- Joined: Sun May 05, 2019 11:24 pm
- Full name: Steven Griffin
Re: Bug in my engine
Hi Ronald,
I've thought about that, but I paste the fen from before the repetition started so the threefold repetition should still work the same. Also, when I try it in winboard, I paste the full game and still can't reproduce the problem.
I've thought about that, but I paste the fen from before the repetition started so the threefold repetition should still work the same. Also, when I try it in winboard, I paste the full game and still can't reproduce the problem.
-
- Posts: 4605
- Joined: Wed Oct 01, 2008 6:33 am
- Location: Regensburg, Germany
- Full name: Guenther Simon
Re: Bug in my engine
Steven, I could reproduce a few full test games with that bug yesterday and will post a link to it in a few minutes here.JimmyRustles wrote: ↑Sat Dec 21, 2019 11:54 am Hi Ronald,
I've thought about that, but I paste the fen from before the repetition started so the threefold repetition should still work the same. Also, when I try it in winboard, I paste the full game and still can't reproduce the problem.
The main post will be in the BanksiaGUI thread in the general forum, because it also refers to a bug in the current Beta.
I will also add the logs for download at my RWBC site.
@Ronald, I had already yesterday attached a post, which had the full move history, not only a FEN and still I got the bug behaviour
on my machine.
-
- Posts: 4605
- Joined: Wed Oct 01, 2008 6:33 am
- Location: Regensburg, Germany
- Full name: Guenther Simon
Re: Bug in my engine
http://talkchess.com/forum3/viewtopic.p ... 07#p823107Guenther wrote: ↑Sat Dec 21, 2019 12:31 pm
Steven, I could reproduce a few full test games with that bug yesterday and will post a link to it in a few minutes here.
The main post will be in the BanksiaGUI thread in the general forum, because it also refers to a bug in the current Beta.
I will also add the logs for download at my RWBC site.
-
- Posts: 32
- Joined: Sun May 05, 2019 11:24 pm
- Full name: Steven Griffin
Re: Bug in my engine
Thanks a lot for doing the tests with Raven, Guenther. I suspect it's a problem with the TT and mate scores. I'm going to try not using the TT when the TT score is mate and see if it fixes the bug. If it works, it shouldn't affect playing strength much, I don't think.
-
- Posts: 160
- Joined: Tue Jan 23, 2018 10:18 am
- Location: Rotterdam
- Full name: Ronald Friederich
Re: Bug in my engine
I took a quick look at the function isThreefold() and I saw that a true is returned after numrepeats >= 3. A threefold repetition is reached after 2 repetitions of a position however. It will probably not be the cause of the bug you are trying to solve, but I think it's not correct.
-
- Posts: 32
- Joined: Sun May 05, 2019 11:24 pm
- Full name: Steven Griffin
Re: Bug in my engine
Thanks Ronald. The numrepeats variable should probably be called numoccurences. It counts the number of occurences of the position in the stack, not the number of repeats. So 3 occurences is equal to 2 repetitions which is why it's >= 3 and not 2.
-
- Posts: 32
- Joined: Sun May 05, 2019 11:24 pm
- Full name: Steven Griffin
Re: Bug in my engine
Hi Guenther, I'm pretty sure I've fixed the bug now. I just tried it in 40 lichess games and the bug didn't happen in any of them.Guenther wrote: ↑Sat Dec 21, 2019 1:18 pmhttp://talkchess.com/forum3/viewtopic.p ... 07#p823107Guenther wrote: ↑Sat Dec 21, 2019 12:31 pm
Steven, I could reproduce a few full test games with that bug yesterday and will post a link to it in a few minutes here.
The main post will be in the BanksiaGUI thread in the general forum, because it also refers to a bug in the current Beta.
I will also add the logs for download at my RWBC site.
Would you be able to try it with a couple of positions where it had the bug before and see if it's working now please?
I've compiled a version of Raven with the bug fix that you can use to test it, it's here: https://github.com/sgriffin53/raven/tree/master/temp
Thanks again for all the testing you've done. Hopefully this should fix the bug.
-
- Posts: 4605
- Joined: Wed Oct 01, 2008 6:33 am
- Location: Regensburg, Germany
- Full name: Guenther Simon
Re: Bug in my engine
I checked a few positions and the buggy behaviour seems corrected.JimmyRustles wrote: ↑Sun Dec 22, 2019 4:57 amHi Guenther, I'm pretty sure I've fixed the bug now. I just tried it in 40 lichess games and the bug didn't happen in any of them.Guenther wrote: ↑Sat Dec 21, 2019 1:18 pmhttp://talkchess.com/forum3/viewtopic.p ... 07#p823107Guenther wrote: ↑Sat Dec 21, 2019 12:31 pm
Steven, I could reproduce a few full test games with that bug yesterday and will post a link to it in a few minutes here.
The main post will be in the BanksiaGUI thread in the general forum, because it also refers to a bug in the current Beta.
I will also add the logs for download at my RWBC site.
Would you be able to try it with a couple of positions where it had the bug before and see if it's working now please?
I've compiled a version of Raven with the bug fix that you can use to test it, it's here: https://github.com/sgriffin53/raven/tree/master/temp
Thanks again for all the testing you've done. Hopefully this should fix the bug.
To be sure I will play some test games too, but probably after xmas.
I see that your Lichess rating in bullet received some nice +50 already :)
-
- Posts: 32
- Joined: Sun May 05, 2019 11:24 pm
- Full name: Steven Griffin
Re: Bug in my engine
Great. Thanks a lot. I'm so glad to have this bug finally fixed.Guenther wrote: ↑Sun Dec 22, 2019 10:37 amI checked a few positions and the buggy behaviour seems corrected.JimmyRustles wrote: ↑Sun Dec 22, 2019 4:57 amHi Guenther, I'm pretty sure I've fixed the bug now. I just tried it in 40 lichess games and the bug didn't happen in any of them.Guenther wrote: ↑Sat Dec 21, 2019 1:18 pmhttp://talkchess.com/forum3/viewtopic.p ... 07#p823107Guenther wrote: ↑Sat Dec 21, 2019 12:31 pm
Steven, I could reproduce a few full test games with that bug yesterday and will post a link to it in a few minutes here.
The main post will be in the BanksiaGUI thread in the general forum, because it also refers to a bug in the current Beta.
I will also add the logs for download at my RWBC site.
Would you be able to try it with a couple of positions where it had the bug before and see if it's working now please?
I've compiled a version of Raven with the bug fix that you can use to test it, it's here: https://github.com/sgriffin53/raven/tree/master/temp
Thanks again for all the testing you've done. Hopefully this should fix the bug.
To be sure I will play some test games too, but probably after xmas.
I see that your Lichess rating in bullet received some nice +50 already