Dieter Hemmers wrote:Hello,
I have written a small chess engine with 0x88-Board-Representation and alpha-Beta search-algorithm. What is the best way to implement an evaluation function? Is it better to examine the position at the root much more than the others or should I examine all positions the same way. How do most programs work?
Dieter
Dieter - congratulations on your program.
You will get many opinions.
Three choices appear:
1) pcsq with just material+pcsq at terminal nodes
This is very old - good for your first month. Test it and keep your testsuite
results.
2) terminal node evaluation with material+mobility+pawn_structure+
kingsafety
Compare this with #1
3) node evaluation at every node in the tree (Rebel method)
I experimented with this for a short while.
I now use #2 and am expanding my evaluation function. Although
it is bitboard-based, it is still a lot of programming to get all the
support bitboard tables, for example for passed pawn and square
of pawn setup - I still need to do those, plus a lot more pawn structure
logic -- which is fine since pawn structure is free - as I get 96% of
pawn structures pre-existing in hash table.
So enjoy your new program and I recommend #2.
Stuart