Then I did another fast search using each internal node as root, to find the best move from the internal node.
The goal is to compute some statistics and see if there's any insight that can be used in move ordering and (even more importantly for me) prior probability estimation.
I created a bunch of filters, and kept statistics about moves that match each filter. For each of the filter below, "best" is the number of times a move matching the filter is the best move, "legal" is the number of times a move matching the filter is legal, and "scaled" is how frequent a move matching the filter turns out to be the best, scaled to uniform probability.
For example, scaled = 1 means a move matching the filter would have 1/30 the probability of being best, if there are 30 legal moves.
Some results:
1. captures and non-captures with positive, 0, and negative SEE -
Code: Select all
+SEE captures:
best: 38573 legal: 78130 scaled: 7.96696
=SEE captures:
best: 7132 legal: 25675 scaled: 8.39814
=SEE non-captures:
best: 51063 legal: 1857763 scaled: 0.770027
-SEE captures:
best: 1079 legal: 113573 scaled: 0.31697
-SEE non-captures:
best: 2153 legal: 769055 scaled: 0.0873344
2. Broken down by piece type:
Code: Select all
iece Types (+SEE):
K:
best: 3342 legal: 5823 scaled: 2.44043
Q:
best: 6819 legal: 14534 scaled: 9.4128
R:
best: 8469 legal: 15945 scaled: 9.71956
N:
best: 5181 legal: 12108 scaled: 9.64009
B:
best: 5641 legal: 12055 scaled: 9.92174
P:
best: 9121 legal: 17665 scaled: 11.8489
Piece Types (=SEE):
K:
best: 7664 legal: 266165 scaled: 0.490375
Q:
best: 8991 legal: 307500 scaled: 0.995242
R:
best: 11726 legal: 456309 scaled: 0.791842
N:
best: 9318 legal: 216618 scaled: 1.3492
B:
best: 8547 legal: 268396 scaled: 0.976824
P:
best: 11949 legal: 368450 scaled: 0.996478
Piece Types (-SEE):
K:
no match
Q:
best: 217 legal: 245682 scaled: 0.0301311
R:
best: 539 legal: 201789 scaled: 0.0789882
N:
best: 619 legal: 135626 scaled: 0.146236
B:
best: 446 legal: 178976 scaled: 0.0802111
P:
best: 1411 legal: 120555 scaled: 0.331534
When we go to =SEE, everything is pretty close to 1, except for kings, which is at 0.5.
For -SEE, it's basically never a good idea to sacrifice a queen, rook, or bishop. Knight sacrifices are slightly better. Pawn sacrifices are surprisingly high at 0.33, which is about 1/3 the probability of normal pawn moves.
3. Promotions:
Code: Select all
Queen promotions:
best: 502 legal: 1318 scaled: 8.36711
Under-promotions:
best: 30 legal: 3954 scaled: 0.166675
------------------------------------------------------------------------------------
I'll be generating more statistics. In particular, I want to see how game phase changes things.
I now have a system that's very easy to write filters for, and do and/or/xor with the filters. Any suggestions? What would you like to see?