I made a small investigation in orden to fast my makemove and unmakemoves routines. In my engine, this routines have switch statements that examines the moved pieced and the captured pieces if it exits. My statements are sorted following standard enumeration: no_piece, pawn, knight, bishop, root, queen and king.
What I did is examine four thousand chess games (that I think should be enough) counting how many times a piece is moved, so I can use that information to change the orden in which the switch statement examines pieces.
This where may findings:
Code: Select all
Numbers of time a pieze is moved: Piece For all the game Only for opening + middle game ROOK 38.937 24.322 PAWN 31.243 22.267 QUEEN 23.606 20.855 BISHOP 25.865 18.095 KNIGHT 20.810 16.609 KING 25.587 8.554 Numbers of captures Piece Captures PAWN 10.640 KINGHT 5.165 BISHOP 4.777 ROOK 3.382 QUEEN 2.133 KING 0
For my surprise, my engines scored 15 Elo points worse for that little change. This makes me things that maybe is not the same the moves stadistics doing in a game, than stadistics doing in the search over all games. Any opinions here?
I post this findings for it somebody find they usefull.