rajrakeshdr / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

Quiescent doesn't find fork. #278

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Loading the attached game in revision 811 (current trunk)
2. Let PyChess beta3 have white
3. Don't give it too much time

What is the expected output? What do you see instead?
PyChess plays O-O-O and quickly suffers from Nxf2 - a fork on the rooks

Please use labels and text to provide additional information.
In the log we see, that PyChess guesses black to respond with Qf2 - "moves
were: O-O-O Qxf2 98"
If PyChess get a lot of time, it plays the same as other engines, Rb1 or Bc1.

I've tried to change "searching = False" to "depth = 0" in search.py in

timecheck_counter -= 1
if timecheck_counter == 0:
    if time() > endtime:
        searching = False
    timecheck_counter = TIMECHECK_FREQ

to ensure quiescent search is activated. However it doesn't seem to make a
change. Only by adding more time - and thereby letting PyChess do another
alphabeta - a reasonable move is found.

Original issue reported on code.google.com by lobais on 30 Dec 2007 at 1:47

GoogleCodeExporter commented 9 years ago

Original comment by lobais on 30 Dec 2007 at 2:25

Attachments:

GoogleCodeExporter commented 9 years ago
Maybe if you give pychess too little time, it will do only 1 depth search, and 
Nxf2
and Qf2 loses only 1 pawn. Quiescent has nothing to do with this, as white will 
not
recapture nothing in the next move.

Original comment by gbtami on 31 Dec 2007 at 12:21

GoogleCodeExporter commented 9 years ago
Better say, white _can't_ recapture on f2.

Original comment by gbtami on 31 Dec 2007 at 12:23

GoogleCodeExporter commented 9 years ago
Oops, that's right of cource :S

I'm still thinking though, if we shouldn't allow PyChess to do quiescent 
search, even
though it is out of time?

Also I'm thinking that it might be interesting to have a function to give the
position an interest score, which the search function would use to add/remove a 
depth
point.
This way positions in check or with forks could be searched further.

Original comment by lobais on 1 Jan 2008 at 6:37

GoogleCodeExporter commented 9 years ago
We can enable quiescent when it's out of time, but only if some percent 
(f.e.10%) of
all game time is remainig.

As i know, better engines all use some kind of interest/danger score to add some
extra search depth.

Original comment by gbtami on 1 Jan 2008 at 7:15