A funny bug :-)

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

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

A funny bug :-)

Post by Daniel Anulliero »

In this position (game Isa 1.6.0.185 versus FairyMax)
[d]8/5k1P/7K/4P3/5PP1/4r3/8/8 w - - 1 68


Isa played h7-h8 . FairyMay responded with Re3-h3+ and .. Isa didn't responded ...
Bug... hope It's reproducible...
Position replayed with log window now activated (It's better if I think ...)
In the log , Isa displayed "Illegal move " after Rh3+ ... strange ...
Run again in console mode ... aah understood what happened !
Isa played h7-h8 with under promotion to Knight and check to the Black king!
OOh , just forgot to send N,B,R or Q to the GUI lol
The GUI thought it was a Queen promotion by default .. aargh ..
Fixed now :wink:
Good night all !
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: A funny bug :-)

Post by hgm »

And the promotion to Knight would take Fairy-Max completely by surprise, as it does not consider under-promotions in search. That also makes it bungle a KBPK draw now and then:
[d]1b6/8/8/8/8/8/3k2Kp/8 w - - 0 1
Here it might play 1. Kf2 because after 1... h1=Q it would be stalemate. Of course most opponents then play 1... h8=R for an easy win!
Henk
Posts: 7210
Joined: Mon May 27, 2013 10:31 am

Re: A funny bug :-)

Post by Henk »

In my opinion most boring part is implementing all chess rules. Skipper does not even implement fifty moves rule. And three fold repetition also does not work right. Don't know if there are more special rules.
Daniel Anulliero
Posts: 759
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: A funny bug :-)

Post by Daniel Anulliero »

hgm wrote:And the promotion to Knight would take Fairy-Max completely by surprise, as it does not consider under-promotions in search. That also makes it bungle a KBPK draw now and then:
[d]1b6/8/8/8/8/8/3k2Kp/8 w - - 0 1
Here it might play 1. Kf2 because after 1... h1=Q it would be stalemate. Of course most opponents then play 1... h8=R for an easy win!
Aah ok lol then double bug in that game 😊
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: A funny bug :-)

Post by hgm »

Henk wrote:In my opinion most boring part is implementing all chess rules. Skipper does not even implement fifty moves rule. And three fold repetition also does not work right. Don't know if there are more special rules.
Implementing the 50-move rule usually only costs Elo. Repetitions are very important, though, at least at game level. Engines that are not aware of it have grave difficulty winning any game whatsoever. Fairy-Max only recognizes repetition of positions that occurred in the game. That is good enough to not be tricked into a repetition when it is winning. But it means it cannot plan for sacrificing to force a repetition.

In King Slayer repetitions are handled the same way as in Fairy-Max, by writing an exact, infinitely deep draw score for the position in the hash table. King Slayer also does this for tree positions, though. (And then replaces it by the score from the search when it returns from that node.) So it can plan for perpetuals.
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: A funny bug :-)

Post by stegemma »

hgm wrote:
Henk wrote:[...]Repetitions are very important, though, at least at game level. Engines that are not aware of it have grave difficulty winning any game whatsoever.[...]
Satana doesn't handle repetitions at all and it's nearest opponent Neurone collects points for this. The fact is that Neurone has an intelligent "Neuro-learning" that let him learn how to play against Satana and a dedicated function to search for repetitions in lose positions.
Author of Drago, Raffaela, Freccia, Satana, Sabrina.
http://www.linformatica.com
Daniel Anulliero
Posts: 759
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: A funny bug :-)

Post by Daniel Anulliero »

hgm wrote:Engines that are not aware of it have grave difficulty winning any game whatsoever. Fairy-Max only recognizes repetition of positions that occurred in the game. That is good enough to not be tricked into a repetition when it is winning. But it means it cannot plan for sacrificing to force a repetition.
Yes true ! Engines misses a lot of win without the rule !My engines have 3reps since the biginning (even my Bishop in QB4.5 chess engine 😊)
In Isa (and Jars and Yoda too) 3reps is implemented in the same way of TSCP (with hashcodes) and in the search too.
I think when you program a game , it's good to implement ALL rules even if it is boring lol
Tic tac toe have less rules to write :wink: ....
Daniel Anulliero
Posts: 759
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: A funny bug :-)

Post by Daniel Anulliero »

Daniel Anulliero wrote:
hgm wrote:Engines that are not aware of it have grave difficulty winning any game whatsoever. Fairy-Max only recognizes repetition of positions that occurred in the game. That is good enough to not be tricked into a repetition when it is winning. But it means it cannot plan for sacrificing to force a repetition.
Yes true ! Engines misses a lot of win without the rule !My engines have 3reps since the biginning (even my Bishop in QB4.5 chess engine 😊)
In Isa (and Jars and Yoda too) 3reps is implemented in the same way of TSCP (with hashcodes) and in the search too.
I think when you program a game , it's good to implement ALL the rules even if it is boring lol
Tic tac toe have less rules to write :wink: ....