Next: , Up: Move filters


10.1.10.1 Introduction to 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:

  1. whether to analyze at all at this sub ply,
  2. the number of moves always accepted at the given level,
  3. the number of extra moves to add,
  4. the threshold for adding extra moves.

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.Cubeful0-ply8/4 6/4Eq.:+0.189
2.Cubeful0-ply24/20 13/11Eq.:+0.046(-0.143)
3.Cubeful0-ply13/11 13/9Eq.:+0.044(-0.145)
4.Cubeful0-ply24/22 13/9Eq.:+0.034(-0.155)
5.Cubeful0-ply24/22 24/20Eq.:-0.006(-0.194)
6.Cubeful0-ply24/18Eq.:-0.009(-0.198)
7.Cubeful0-ply24/20 6/4Eq.:-0.019(-0.208)
8.Cubeful0-ply13/9 6/4Eq.:-0.024(-0.213)
9.Cubeful0-ply13/7Eq.:-0.052(-0.241)
10.Cubeful0-ply24/20 8/6Eq.:-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.Cubeful2-ply8/4 6/4Eq.:+0.180
2.Cubeful2-ply24/20 13/11Eq.:+0.052(-0.127)
3.Cubeful2-ply13/11 13/9Eq.:+0.043(-0.137)
4.Cubeful2-ply24/22 13/9Eq.:+0.035(-0.145)
5.Cubeful0-ply24/22 24/20Eq.:-0.006(-0.185)
6.Cubeful0-ply24/18Eq.:-0.009(-0.189)
7.Cubeful0-ply24/20 6/4Eq.:-0.019(-0.199)
8.Cubeful0-ply13/9 6/4Eq.:-0.024(-0.203)
9.Cubeful0-ply13/7Eq.:-0.052(-0.232)
10.Cubeful0-ply24/20 8/6Eq.:-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:

PlyAccept movesExtra movesThreshold for extra moves
0080.160
1no pruning
2020.040
3no 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.