TalkChess.com
Hosted by Your Move Chess & Games

Author Message
Don Dailey

Joined: 29 Apr 2008
Posts: 4312

Post subject: Re: Mobility eval    Posted: Tue May 01, 2012 4:03 pm

Don wrote:
 hgm wrote: What is the current consensus on mobility evaluation? I have seen that some programs just count legal moves (weighted by piece type), others count only moves to squares not controlled by enemy Pawns, while still others only count forward moves of some pieces. Is there a way that is considered 'best'? From my piece-value measurements I know that forward moves on a piece are typically worth twice as much as backwards or sideway moves, so weighting them differently could make sense. (Only counting forward moves seems a bit extreme, though.) An alternative, which on average would achieve the same, would be to weigth by target square. If squares on central ranks are weighted more, this favors forward mobility, as pieces usually can only be safely kept on your own half of the board. (White and black weighting of the same square can of course be made different.) I also wondered if there is a rationale for excluding only squares controlled by Pawns, as opposed to excluding squares controlled by any enemy piece of lower value. I guess mobility can also be looked upon as 'board control', and attacking a square with a Rook, even if it is protected by a Knight, still increases your control over that square (it prevents the opponent from entering it with a Queen, and it would allow you to enter it with a minor). Squares controlled by enemy Pawns can never be entered by your pieces, however, no matter how often you attack them. But attacking such squares could still prevent the opponent from entering them with a higher piece. So they might deserve to carry some (small) weigth. I was planning to implement this by taking counts of each piece type that could reach a square (as a sort of material index of the material that reaches it), so that I can use a lookup table to translate that material to score, so that I can basically use any weighting scheme without requiring any additional computational effort.

Mobility is critically important to a modern chess program. Komodo basically does this:

1. gets a count of squares a piece can move to
2. do not count empty squares attacked by enemy pawns.

The count is used to index into a table which is "zero adjusted" so that a piece with low mobility is negative, "typical" mobility is zero and good mobility is positive. The table is non-linear so that having some mobility is more important than having a lot. In other words if one bishop is highly mobile and the other has little mobility it is much more important to help the bishop with low mobility.

I think we also count a point for mobility to own non-pawn pieces (which is sort of like a defense bonus) and of course attacks to the enemy pieces except his pawns if they are defended by a pawn. Not 100% sure of the exact details of this.

Komodo also computes mobility for the knights using the same rules.

There is another kind of mobility that we call "range" (which Komodo does not use but some of my previous programs used.) It is basically the total mobility if only pawns were on the board. It is a reasonable substitute for mobility because pawns tend to be a lot more permanent and pieces are usually transitory. So a bishop of g2 would not be penalized for the knight on f3 for instance with this kind of mobility. Some programs use BOTH kinds of mobility. Range can be calculated fast if you precompute it in the pawn structure hash - it would require only 2 tables which would have to be stored in the pawn hash record, one for diagonals and one for orthogonals and possibly one for knights.

P.S. Larry considers forward mobility important but we have not done much work on that with Komodo so I cannot offer an opinion.
_________________
"Your superior intellect is no match for our puny weapons." -Kang and Kodos
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
Subject Author Date/Time
H.G.Muller Tue May 01, 2012 11:44 am
Lucas Braesch Tue May 01, 2012 2:22 pm
Don Dailey Tue May 01, 2012 3:59 pm
Re: Mobility eval Don Dailey Tue May 01, 2012 4:03 pm
Michel Van den Bergh Tue May 01, 2012 4:32 pm
H.G.Muller Tue May 01, 2012 8:18 pm
H.G.Muller Tue May 01, 2012 8:35 pm
Chris Whittington Wed May 02, 2012 8:48 pm
Don Dailey Wed May 02, 2012 9:14 pm
Chris Whittington Thu May 03, 2012 8:27 am
Ferdinand Mosca Thu May 03, 2012 10:27 am
Pawel Koziol Fri May 04, 2012 12:11 pm
Mincho Georgiev Tue May 01, 2012 4:36 pm
Don Dailey Tue May 01, 2012 4:45 pm
Vincent Diepeveen Tue May 01, 2012 5:31 pm
Don Dailey Tue May 01, 2012 5:33 pm
Vincent Diepeveen Thu May 03, 2012 9:16 am
Dan Honeycutt Fri May 04, 2012 6:58 pm
Ferdinand Mosca Thu May 03, 2012 9:40 am

 Jump to: Select a forum Computer Chess Club Forums----------------Computer Chess Club: General TopicsComputer Chess Club: Tournaments and MatchesComputer Chess Club: Programming and Technical DiscussionsComputer Chess Club: Engine Origins Other Forums----------------Chess Thinkers ForumForum Help and Suggestions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum