That's pretty much what we do (except for the queen, which has very low mobility scores) in Stockfish. The penalties for zero mobility are quite big, but the bonus for an extra available move slowly drops off as the mobility of the piece increases. This table summarizes our middle game mobility evaluation bonuses:jdart wrote:You could try tapering off or even removing the bonus for above-average mobility while keeping penalties for low mobility - if you are not doing that already.
Code: Select all
Mobility 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 >=15
--------------------------------------------------------------------------------------------
Knight -0.19 -0.13 -0.06 0.00 0.06 0.13 0.16 0.19 0.19
Bishop -0.13 -0.06 0.02 0.09 0.16 0.23 0.29 0.33 0.36 0.37 0.38 0.39 0.40 0.40 0.41 0.41
Rook -0.10 -0.07 -0.04 -0.01 0.02 0.05 0.07 0.10 0.12 0.13 0.14 0.14 0.15 0.15 0.16 0.16
Queen -0.05 -0.04 -0.03 -0.02 -0.01 0.01 0.02 0.03 0.04 0.05 0.06 0.08 0.08 0.09 0.09 0.10
Now to the question of why such high mobility scores work: I don't know, and honestly I wasn't even aware that our mobility scores were unreasonably high (I'm not a chess player). If they are, here's a possible explanation of why these high bonuses work so well in practice:
Except in positions with a single long, completely forced line, the quality of the last few moves of a long PV usually isn't high. The position at the end of the PV will never appear on the board. When the program has an advantage in mobility at the position at the and of the PV, however, it probably also has an advantage in mobility at most positions close to the end position in the search tree. This means that in the last few nodes along the PV, where the PV moves are probably not good, the program will probably have many reasonable alternative moves and the opponent considerably fewer. High mobility scores therefore steers the search towards areas of the tree where there is a good chance to find unexpected resources for the program, and not for the opponent.
Maximizing the chance of pleasant surprises towards the end of the PV while minimizing the chance of unpleasant surprises seems like a good idea, in general.