I've tried evaluating the king safety bu just looking whether it's castled, the nearby pawn structure and how squares around the king are attacked or defended but this doesn't seem to be enough as the human player sacrificed a rook and a knight to eventually get mate.
I believe I have a few options:
- Raise the scoring on the existing safety routines. The problem here is that this will make the other evaluations seem insignificant ie why bother getting a protected passed pawn if it can add another minor piece to it's impregnable castle fortress.
I then looked at gathering safety info while doing the search ie if the opponents queen is moved near our king then score that badly. If the queen is taken then score that well. Checks bad. Mates worse etc etc. I tried putting in what I thought was moderate evaluation scores but found these scores were upsetting the whole scoring system.
Currently thinking about just counting the number of checks or mates that are found in any given search. If it exceeds a certain number then use the king safety evaluation function.
PS I'm hoping that when I have a better king safety evaluation then I might break the 2000 ELO barrier. Other options I've thought about adding include null moves, fractional extensions, hash positions and lazy evaluations. Any idea which of these might give most bang for the buck (or most ELO for hours coding)?
