Had anyone tried EvalHashTable?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Re: Had anyone tried EvalHashTable?

Post by jwes »

What do you use for an index to the evaluation hash ? If it is based on the full position, why not use the position hash table ? If not, how do you ensure that the hashed evaluation is accurate for the current position ?
User avatar
pedrox
Posts: 1056
Joined: Fri Mar 10, 2006 6:07 am
Location: Basque Country (Spain)

Re: Had anyone tried EvalHashTable?

Post by pedrox »

The size of my function of evaluation is approximately 30-40k, the eval cahe gives a 20% of speed approximately.

This gain of speed is smaller when I combine it with lazy eval, in that case the eval cache gives a 6% of speed.

Pedro
Uri Blass
Posts: 10279
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Had anyone tried EvalHashTable?

Post by Uri Blass »

jwes wrote:What do you use for an index to the evaluation hash ? If it is based on the full position, why not use the position hash table ? If not, how do you ensure that the hashed evaluation is accurate for the current position ?
It is based on the full position but I do not store every position that I evaluate in the position hash table.

one of the targets of the position hash tables is to have better order of moves so
I store position in the position hash table only when I have a move that caused cutoff after it.

Another target is simply to prune moves.

movei today still does not do it when the last time that I tried it I had problems with it and it did not work for me.

I am going to try again but first I will try to fix things in the evaluation and not have anti-symmetric evaluation.

Uri
Peter Fendrich

Re: Had anyone tried EvalHashTable?

Post by Peter Fendrich »

Well, that is relative. Compared to Terra it is almost nothing. Just some basic rules and some preevaluated tables. Nothing about king safety and very little about king attack. The most common reason for loss is bad understanding of the king situation. The main part in my evaluation is for different endgame patterns. I don't use EGTB.
In the future I will do more about K safety/attack. Next release will also have my own system for endgame tables - more compact than bitbases.

Even then I don't think that evalhash will give any significant increased performance.

After that I plan to implement more pawn logic and at that time maybe a pawnhash could be useful. I currently don't use that either.
/Peter
Peter Fendrich

Re: Had anyone tried EvalHashTable?

Post by Peter Fendrich »

You don't want to store the same information in position hash and eval hash. At least not me. Increasing the positional hash with extra space for evaluation terms costs way to much.
/Peter
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: Had anyone tried EvalHashTable?

Post by diep »

ILikeChess wrote:Almost every engine has large eval function.So why not store eval score into small HashTable which I called EvalHashTable?

I do not think probe and store EvalHashTable will cost a lot of time, but EvalHash could avoid computering many many many boring codes.
diep stores evaluation both in an eval table but also in transpositiontable. The combination gives a nice 2 fold speedup for the program in lineair speed (that's excluding the profit you get from transpositiontable cutoffs which is a different thing in this context).

Basically that 2 fold speedup you must take with a bit of salt, because at bigger search depths with big loading factors it is different of course and it depends from position to position.

Say between 50% and 100% speedup is a safe bet.


Vincent