I am working on mini shogi, for incoming UEC Cup this November 23. It would be interesting if you can join.Evert wrote:I've added some special king-safety code for drop variants (having Shogi in mind, but the code is general).
First of all it calculates a shelter score based on the squares surrounding the king that are protected/occupied by friendly pieces. This already helps a lot, but the real improvement seems to come from counting pieces that are "in hand" as attacking the king's position (after all, they can just drop in there). The new version solidly defeats the old version, and play looks much more coordinated.
So far no idea how it measures up against other engines though...
I do something similar to what you do. In the eval I identify all unprotected squares empty or not. If opponent has on-hand then surely the empty unprotected squares are penalized. The penalty is increased when the opponent has an on-hand piece that when dropped to the said square is able to check my king. Contact check is very dangerous here, as the board is small, escape squares are low. I added a SEE applied to captures at the moment and there is improvement. Next will be to apply SEE on drop and promote moves. LMR also helps, I have not tried yet the futility stuff, probably will not work as this game is not decided by material but by initiative and king attack. Other rules, you lose if you check perpetually the opponent. The other rule is Black/Gote will win if 4-times the position appears on the board or 3 repeats, both on-hand and on-board pieces should be the same.