I had planned to have a reasonably solid evaluation function in Maverick from “day 1”. It looks as if I’ll need to backtrack a little.
I had imagined I’d put all of the gubbins of the evaluation function (e.g. attack tables) in the “board” structure. However, the drawback to this approach is the need to store changes as moves are made and unmade on the board.
For example, if I generate all of the attack tables when I evaluate the position I’d subsequently like to use this information in my Late-Move-Reduction code. However, if I include the attack tables in the board structure I’ll need to store and retrieve it as part of the make / unmake process. This sounds expensive!
So what’s the solution?
What I intend to do is to have a “ply_data” array which stores information about the current position at any give ply. This is not unusual and Monarch has this structure. As an example, it enable us to see what move was played two moves ago. So I’ll move some of the information I was planning to store in the board structure, including the attack tables, over to this ply_data array.
This is a fundamental structural issue. It concerned me that as I push ahead with the evaluation I may need to make structural changes later when I put the search routines in place. So I’ve also decided to freeze the evaluation function in it’s curent basic state and create the search routines (i.e. make Maverick play chess). I have the structure of the evaluation function in place so (hopefully) I’ll be able to develop it quickly I have a basic search.