The idea is to look at the most common responses to moves. For example, when the move "exd4" happens, a common response is "Nxd4" or "Qxd4" or "Cxb4".
[d]r1bqkb1r/pppp1ppp/2n2n2/8/3pP3/2P2N2/PP3PPP/RNBQKB1R w KQkq - 0 5
My idea was to take this data from games played by humans, and use it for move ordering. Here's the implementation I went for:
The table that holds the data. the indexes are the previous move's source square, the previous move's target square, and the current move's target square.
Code: Select all
int table [64][64][64]
Code: Select all
int get_move_score(Move prevmove, Move move){
return commonMoveTable[get_move_source(prevmove)][get_move_target(prevmove)][get_move_target(move)];
}
Let me know any suggestions or comments. This is my first post here so let me know if there is some sort of etiquette I am not following also.
