A bug yes but where?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Daniel Anulliero
Posts: 759
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

A bug yes but where?

Post by Daniel Anulliero »

Hi all
My chess engine ISA is current in developpement
It has only alpha beta + PVS + quiesce , hashtables and eval with materiel , pst , passed , doubled ,isolated pawns , square rule , and rule for winning KBB vs K and KBN vs K.

I use this kind of position to see if hashtables work :
FEN "4k3/8/4pPp1/3pP1P1/2pP4/2P3K1/8/8 w - - 0 1"

Here is the list of moves by ISA :

Code: Select all

1. Kf4 {(g3f4) +7.65/28 12} Kf7 2. Ke3 {(f4e3) +7.95/27 10} Ke8 
3. Kf4{(e3f4) +10.84/27 10} Kf7 4. Ke3 {(f4e3) +7.65/24 10} Ke8 5. Kd2 {(e3d2)+7.95/24 10} Kf7
6. Kc2 {(d2c2) +12.76/27 10} Kf8 7. Kd2 {(c2d2) +17.78/2710} Kf7 8. Kc1 {(d2c1) +8.96/24 10} Ke8 
9. Kb2 {(c1b2) +17.78/24 10} Kd710. Kc2 {(b2c2) +7.95/19 10} Ke8 11. Kb1 {(c2b1) +12.76/25 10} Kd7
12. Kb2{(b1b2) +7.50/18 10} Ke8 13. Ka3 {(b2a3) +17.78/23 10} Kd7 14. Kb4 {(a3b4)+8.96/18 10} Ke8 
15. Kc5 {(b4c5) +M9/20 1} Kd7 16. Kb5 {(c5b5) +10.84/1910} Ke8 17. Kc6 {(b5c6) +M9/20 2} Kd8 
18. Kd6 {(c6d6) +M7/16 1} Ke8 19.Kxe6 {(d6e6) +M6/14 0} Kf8 20. f7 {(f6f7) +M5/12 0} Kg7 
21. Ke7 (e6e7)+M4/10 0} Kh8 {(g7h8) -M4/9 0} 22. Kf6 {(e7f6) +M3/8 0} Kh7 23. e6 {(e5e6)+M2/6 0} Kh8 
24. f8=Q+ {(f7f8) +M1/4 0} Kh7 25. Qg7# {(f8g7) +M0/2 0} 1-0

It find the winning way but I've noticed two stranges king take back :


7. Kd2 {(c2d2) +17.78/2710}
and
10. Kc2 {(b2c2) +7.95/19 10}
with a severe drop of the eval

Do you think it's a bug in search?hashtables?eval?
Bests
Dany
Isa download :
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: A bug yes but where?

Post by stegemma »

Daniel Anulliero wrote:Hi all
My chess engine ISA is current in developpement
[...]
Do you think it's a bug in search?hashtables?eval?
Bests
Dany
Maybe a bug in the search has broken the hashtable causing a bad eval? ;)
Daniel Anulliero
Posts: 759
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: A bug yes but where?

Post by Daniel Anulliero »

ah ah
good but not so useful :wink:
Isa download :
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: A bug yes but where?

Post by cdani »

You can try to disable or reduce the hash and view if it plays this.
It's also possible a bug where it selects a line and discards other possibilities without analyzing them. May be excessive cuts. It's really difficult to say.
Daniel Anulliero
Posts: 759
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: A bug yes but where?

Post by Daniel Anulliero »

I suspect some bad value saved in the hashtable because the big jumps of the eval +17 and +7
Isa download :
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: A bug yes but where?

Post by stegemma »

Daniel Anulliero wrote:ah ah
good but not so useful :wink:
It could be almost anything but even it could be related to the horizon effect. Maybe you quiescence search has some problem, so that a certain level it won't works has expected.

We can suppose anything but onyl debugging and then debugging and then debugging you can find the bug.