Page 1 of 1
Positional Scoring - In eval or in makemove?
Posted:
27 Feb 2008, 04:21
by Jake Keel
Just wondering what other people do? Do you add up piece-position scores in eval, or do you keep track of scores in makemove and unmakemove like for material? Does keeping track on the fly increase speed by much?
The reason I ask is because I switched over to keeping track on the fly and am finding it difficult to use more complicated ways of scoring positions i.e. different scores for the same piece and square based on the king position, progression of the game, etc.
Thanks,
Jake
Re: Positional Scoring - In eval or in makemove?
Posted:
27 Feb 2008, 12:30
by Pedro Castro
On web page of Rebel, Ed, he said that he has always material + pieces-squares at any time, for it he updated pieces-squares on the functions makemove and unmake.
If the program has to do this I guess it's a matter of design.
For example, in my case it is important to know the material, I take many decisions based on the material, as lazy eval, null move, prunning, but I do not have such a need to know at all times the value of this material along with pieces-squares, I am not quite sure that this will help at least in my program.
Rebel and Prodeo used pieces-squares for the order of moves, perhaps this is why this form of update.
Re: Positional Scoring - In eval or in makemove?
Posted:
27 Feb 2008, 13:33
by H.G.Muller
Simple terms, depending on only a single feature, (like material or piece-square points) are best updated differentially (i.e. in make/unmake). Complicated terms (depending on the position or presence of more than one piece) are better evaluated in each evalation call, as there would be too many moves that would change them, and it would take too much work to calculate the change for differential update to be competative.
But that doesn't mean that you cannot update simple components of such complex terms differentially. E.g. if the value of your bishops depends on the number of pawns, you could keep track of the number of pawns differentially. Similarly, if your passed-pawn detection needs to know the backward-most pawn in every file, you could update that information differentially. (By checking the from square and capture square of every move against the position of the backward-most pawn in the corresponding file, and making the necessary changes in the from-file and to-file table entries if they match.)
Re: Positional Scoring - In eval or in makemove?
Posted:
27 Feb 2008, 16:42
by Jake Keel
Thanks for the replies guys. Well I've decided I definitely want to update piece-square points differentially, but I'm having trouble keeping the scoring to a "simple term" like you said. For strong piece-square scoring don't people use different scoring tables for castled kings, endgame etc.?
Re: Positional Scoring - In eval or in makemove?
Posted:
29 Feb 2008, 13:23
by Pedro Castro
Yes.
You can use one or two tables by piece, I do not think you need more. You can use one for the opening and middlegame and the other to the endgame.
The piece that need mandatory 2 tables is the king until the endgame the king must be in the first row if possible and at the endgame the king must go towards the middle of the board.