Next: Defining move filters, Up: Move filters
GNU Backgammon uses a technique called move filters in order to prune the complete list of legal moves when analyzing checker play decisions. Move filters can be considered a generalization of the search space used in earlier versions of GNU Backgammon.
A move filter for a given ply, say, 2-ply, consists of four parameters for each sub ply:
A move filter for a given ply, say, 2-ply, consists of four parameters for each sub ply:
whether to analyze at all at this sub ply, the number of moves always accepted at the given level, the number of extra moves to add, the threshold for adding extra moves. For example, for 2-ply checker play decisions there are two move filters: one for pruning at 0-ply, and another for pruning at 1-ply. The predefined setting Normal has: accept 0 moves and add up to 8 moves within 0.16 at 0-ply, and no pruning at 1-ply.
Consider the opening position where 4-2 has been rolled:
Example of move filter settings
[[movefilterex.png]]
GNU Backgammon starts by finding all possible moves and evaluate those at 0-ply:
1. | Cubeful | 0-ply | 8/4 6/4 | Eq.:+0.189 |
|
2. | Cubeful | 0-ply | 24/20 13/11 | Eq.:+0.046 | (-0.143)
|
3. | Cubeful | 0-ply | 13/11 13/9 | Eq.:+0.044 | (-0.145)
|
4. | Cubeful | 0-ply | 24/22 13/9 | Eq.:+0.034 | (-0.155)
|
5. | Cubeful | 0-ply | 24/22 24/20 | Eq.:-0.006 | (-0.194)
|
6. | Cubeful | 0-ply | 24/18 | Eq.:-0.009 | (-0.198)
|
7. | Cubeful | 0-ply | 24/20 6/4 | Eq.:-0.019 | (-0.208)
|
8. | Cubeful | 0-ply | 13/9 6/4 | Eq.:-0.024 | (-0.213)
|
9. | Cubeful | 0-ply | 13/7 | Eq.:-0.052 | (-0.241)
|
10. | Cubeful | 0-ply | 24/20 8/6 | Eq.:-0.053 | (-0.242)
|
According to the move filter the first 0 moves are accepted. The equity of the best move is +0.189, and according to the move filter we add up to 8 extra moves if they're within 0.160, that is, if they have equity higher than 0.029. Moves 5 through 18 all have equity lower that, so the move list after pruning at 0-ply consists of moves 1 through 4. According to the move filter we do not perform any pruning at 1-ply, so moves 1 through 4 are submitted for evaluation at 2-ply;
1. | Cubeful | 2-ply | 8/4 6/4 | Eq.:+0.180 |
|
2. | Cubeful | 2-ply | 24/20 13/11 | Eq.:+0.052 | (-0.127)
|
3. | Cubeful | 2-ply | 13/11 13/9 | Eq.:+0.043 | (-0.137)
|
4. | Cubeful | 2-ply | 24/22 13/9 | Eq.:+0.035 | (-0.145)
|
5. | Cubeful | 0-ply | 24/22 24/20 | Eq.:-0.006 | (-0.185)
|
6. | Cubeful | 0-ply | 24/18 | Eq.:-0.009 | (-0.189)
|
7. | Cubeful | 0-ply | 24/20 6/4 | Eq.:-0.019 | (-0.199)
|
8. | Cubeful | 0-ply | 13/9 6/4 | Eq.:-0.024 | (-0.203)
|
9. | Cubeful | 0-ply | 13/7 | Eq.:-0.052 | (-0.232)
|
10. | Cubeful | 0-ply | 24/20 8/6 | Eq.:-0.053 | (-0.232)
|
If we instead request a 4-ply checker play decision, GNU Backgammon will use the move filters defined for 4-ply:
Ply | Accept moves | Extra moves | Threshold for extra moves
|
0 | 0 | 8 | 0.160
|
1 | no pruning |
| |
2 | 0 | 2 | 0.040
|
3 | no pruning |
|
The 4-ply move filter is identical to the 2-ply for pruning at 0-ply, so after 0-ply we have the same three moves as above. Since there is no pruning at 1-ply these three moves are evaluated at 2-ply as above. There is no pruning at 3-ply.
At 4-ply we do not accept any moves, but add up to two moves if there within 0.040 from the best move. Since the second best move is -0.138 worse than the best move, we do not accept any moves to be evaluated at 4-ply. Hence GNU Backgammon will actually not evaluate any moves on 4-ply.
The predefined move filters all have accept 0 moves, in order to facilitate fast decisions and analysis, i.e., no need to waste much time over obvious moves.
For post-mortem analysis it may be worthwhile to ensure that GNU Backgammon analyzes at least two moves at the specified ply. To do this, specify accept 2 moves in the move filters you use for analysis. However, do note that GNU Backgammon will force evaluation at the specified ply if the actual move made is doubtful. This ensures that all errors and blunders are evaluated at the same level.