Yes, I do provide weights based on the relative value of the pieces. I can see I could easily add the rules you suggest. It would be interesting if the new AI would beat the old one reliably.
By the way, unless you mean something else, my algo already considers control - in the form of total number of moves available to each player.
I’m held back by the horrible user interface code and all the other projects I’m commited to. Also I try out each possible move by making a deep copy of the whole board which is really crazy.
Castling will be so simple to add, it wouldn’t require any changes to the AI logic…