apotapov / tafl

Android implementation of a Tafl game
Apache License 2.0
2 stars 0 forks source link

AI: AI doesn't recognize winning move #40

Closed ghost closed 10 years ago

ghost commented 10 years ago

Repro: 1) Play to board configuration below or to a point when King can obviously win. Result: Computer cannot see winning move within depth=4, and instead of blocking, it makes another move instead. In this scenario (see image below), when I press undo several times in a row, it still doesn't see it. At other times, in the past it will see it sometimes when I press Undo.

Frequency: This happens once about every two games I play. I see the computer sometimes ignore the obvious good move, and it may be the same bug. If so, then I notice about it 2-3 times per game.

image

apotapov commented 10 years ago

Is the king's location on 105? or is it on 61?

If it's on 61, it probably assumes that black piece at 98 will move and block it.

If it's on 105, then yeah, there's something wrong.

apotapov commented 10 years ago

i think i have this fixed as well. Added higher weight for near corner positions for the king.