iamLovingJerk / pychess

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

PyChess (0.7) does not mate #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When PyChess foresees a mate something strange happens: It doesn't mate.
When I look in its output, I see the following:

moves were: Qf2 Kb1 g1=Q#
move Qf2
usermove a1b1
moves were: f3 Ka1 g1=Q#
move f3
usermove b1a1
moves were: Rac8 Kb1 g1=Q#
move Rac8
usermove a1b1
moves were: a4 Ka1 g1=Q#
move a4
usermove b1a1
moves were: a3 Kb1 g1=Q#
move a3

which leads me to the conclusion that pychess is fine mating, but doesn't
mind doing some other stuff before that. "I can always win" it thinks.

Can we somehow make PyChess prefer easy wins?

Original issue reported on code.google.com by lobais on 19 Feb 2007 at 4:48

GoogleCodeExporter commented 9 years ago
The errors: PyChess used return MATE_VALUE instead of return -MATE_VALUE

Actually I changed it to return -MATE_VALUE+ply so that the shortest mates 
would be
most attractive.

Fixed in revision 394

Original comment by lobais on 19 Feb 2007 at 7:56