Positional Scoring - In eval or in makemove?

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Positional Scoring - In eval or in makemove?

Postby Jake Keel » 27 Feb 2008, 04:21

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
Jake Keel
 
Posts: 4
Joined: 20 Feb 2008, 23:57

Re: Positional Scoring - In eval or in makemove?

Postby Pedro Castro » 27 Feb 2008, 12:30

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.
Best wishes,

Pedro Castro
User avatar
Pedro Castro
 
Posts: 180
Joined: 28 Jan 2005, 01:09
Location: Pays Basque (Spain)

Re: Positional Scoring - In eval or in makemove?

Postby H.G.Muller » 27 Feb 2008, 13:33

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.)
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Positional Scoring - In eval or in makemove?

Postby Jake Keel » 27 Feb 2008, 16:42

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.?
Jake Keel
 
Posts: 4
Joined: 20 Feb 2008, 23:57

Re: Positional Scoring - In eval or in makemove?

Postby Pedro Castro » 29 Feb 2008, 13:23

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.
Best wishes,

Pedro Castro
User avatar
Pedro Castro
 
Posts: 180
Joined: 28 Jan 2005, 01:09
Location: Pays Basque (Spain)


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 1 guest