Had anyone tried EvalHashTable?

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
jwes
Posts: 778
Joined: Sat Jul 01, 2006 5:11 am

Re: Had anyone tried EvalHashTable?

Post by jwes » Wed May 23, 2007 7:37 pm

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: 992
Joined: Fri Mar 10, 2006 5:07 am
Location: Basque Country (Spain)
Contact:

Re: Had anyone tried EvalHashTable?

Post by pedrox » Wed May 23, 2007 9:38 pm

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: 8594
Joined: Wed Mar 08, 2006 11:37 pm
Location: Tel-Aviv Israel

Re: Had anyone tried EvalHashTable?

Post by Uri Blass » Wed May 23, 2007 9:52 pm

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 » Wed May 23, 2007 9:56 pm

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 » Wed May 23, 2007 10:00 pm

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: 1780
Joined: Thu Mar 09, 2006 10:54 pm
Location: The Netherlands
Contact:

Re: Had anyone tried EvalHashTable?

Post by diep » Sat May 26, 2007 7:30 pm

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

Post Reply