Basic Lone King Mates?
Posted: 17 Mar 2006, 01:59
I'm trying to teach Monarch how to mate with KQ V K, KR v K, KBB v K and KBN v K. I thought this would be really quite straight-forward, however it would seem to be more complex than I imagined.
Let's take the KR v K case. I've evaluation the position as (assume White to move and a Rook up):
I would have thought that that would be enough for Monarch to mate with a rook but it has difficulty. The magnitude of the King_Near_Center array is +50 in the center and 15 at the edge and 0 at the corner. Using this evaluation the White king heads for the center and then the white rook moves 'randomly' and settles for a draw. What am I missing?
Thanks,
Steve
PS The function 'just' works for KQ v K
Let's take the KR v K case. I've evaluation the position as (assume White to move and a Rook up):
- Code: Select all
e = -King_Near_Center[Black_KingPosition];
e -= (Distance_Between_Kings * 4)
e += Value_Of_Piece[ROOK]
I would have thought that that would be enough for Monarch to mate with a rook but it has difficulty. The magnitude of the King_Near_Center array is +50 in the center and 15 at the edge and 0 at the corner. Using this evaluation the White king heads for the center and then the white rook moves 'randomly' and settles for a draw. What am I missing?
Thanks,
Steve
PS The function 'just' works for KQ v K