Apr 19, 2007

[Bug] Fixed the winboard protocol problem

When using the winboard protocol along with the Winboard interface and Mediocre got mated the engine entered an infinite loop. This happened because Winboard sends the mating move to the engine while for example Arena does not, it simply states the result once the game is over.

So what happened was the mating move was played on the board and then Mediocre started searching, but since it had no legal moves at the root node (since it was mated) the searchRoot returned -INFINITY as evaluation which got caught by the window check and a research was made, and since the evaluation returned never changed from -INFINITY the loop never exited.

Some poor programming from my side of course. I changed it so the root moves are generated before the iterative deepening loop (since they never change in the current search) and if no legal moves are found an empty pv is returned and handled by the input loop.

Thanks to H.G. Muller for sending me some games that made it easy to locate the bug.

3 comments:

Jaco van Niekerk said...

So basically, your engine refused to be mated. :-)

(BTW, our engine still obliterates my engine without any exception!)

Jonatan Pettersson said...

Something like that. :)

Time to release a public version of your engine soon? It's always more fun to see the progress.

Jaco van Niekerk said...

It does not yet match my minimum criteria :) Once I have itterative deepening and time controls implemented, I'll release version 0.1b. No point in releasing earlier than that.