Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How much advantage give hash table?

Author: leonid

Date: 16:06:25 09/12/99

Go up one level in this thread


On September 12, 1999 at 14:58:48, Bert van den Akker wrote:

>On September 12, 1999 at 06:43:49, leonid wrote:
>
>>On September 11, 1999 at 22:09:38, Bas Hamstra wrote:
>>
>>>HashTables are very important for movesorting. Best moves from previous searches
>>>are in the hashtable. That way you can very much improve the probability that
>>>you play the best move first, which is immensely important for the alpha-beta
>>>scheme. When you search to ply n with hashtables you have to examine less nodes
>>>than without, because of that.
>>>
>>>Estimates of how much less vary from 20% to 50%. In case of 50%, assuming using
>>>nullmove, yes that is almost a ply.
>>>
>>>
>>>Regards,
>>>Bas Hamstra.
>>
>>Your message, and the one above, is more that useful. This is just moves
>>ordering that still must be improved in my game and, after what I can see,
>>hash table help even in this aspect. When I tryed my engin against the best
>>one my "branching factor" was miserable. Now I work in improving it.
>>
>>With my respect,
>>Leonid.
>
>
>With my program I have done the following test on position:
>2r1r1k1/3p1p1p/p2Qp1p1/q1N2P2/Pn1B1P2/6P1/2P3bP/2KRR3 b - -
>
>to see what is the influence of
>Hash tables, Null move and History tables on the search time.
>All times are in seconds.
>
>
>
>
>D=Queen
>T=Rook
>L=Bishop
>P=Night
>
>With
>Hash table: 524288 entries
>Recursive Null move: R=2
>History table for move ordering: On
>
>
>
>
>Depth  	Score	Time_for_ply   	Time_PV	PV
>1	-223	0		0	Tc8-b8
>2	-196	0		0	Tc8-b8  Kc1-d2  e6xf5   Te1xe8+ Tb8xe8  Dd6xd7
>3	-192	2		2	g6xf5   Dd6xd7
>4	-154	4		1	g6xf5   Dd6-e5  f7-f6   De5xf6
>5	-195	13		8	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ c2-c4   Db4xc4+ Ka2-a3
>6	-289	9		1	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   Te1xe8+
>Tc8xe8  c2-c3
>7	-282	25		5	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   c2-c3
>Db4-c4+ Ka2-a3  d7-d6   Pc5-b7
>8	-277	115		18	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   c2-c3
>Db4-c4+ Ka2-a3  d7-d6   Pc5-b7
>
>total time		168
>
>
>With
>Hash table: Off
>Recursive Null move: R=2
>History table for move ordering: On
>
>
>Depth  	Score	Time_for_ply   	Time_PV	PV
>1	-223	0		0	Tc8-b8
>2	-196	0		0	Tc8-b8  Kc1-d2  e6xf5   Te1xe8+ Tb8xe8  Dd6xd7
>3	-192	3		2	g6xf5   Dd6xd7
>4	-154	3		0	g6xf5   Dd6-e5  f7-f6   De5xf6
>5	-195	18		11	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ c2-c4   Db4xc4+ Ka2-a3
>6	-289	34		6	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   Te1xe8+
>Tc8xe8  c2-c3
>7	-282	79		19	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   c2-c3
>Db4-c4+ Ka2-a3  d7-d6   Pc5-b7
>8	-277	324		76	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   c2-c3
>Db4-c4+ Ka2-a3  d7-d6   Pc5-b7
>
>total time	461
>
>
>
>With
>Hash table: 524288 entries
>Recursive Null move: Off
>History table for move ordering: On
>
>
>Depth  	Score	Time_for_ply   	Time_PV	PV
>1	-223	0		0	Tc8-b8
>2	-196	0		0	Tc8-b8  Kc1-d2  e6xf5   Te1xe8+ Tb8xe8  Dd6xd7
>3	-192	2		2	g6xf5   Dd6xd7
>4	-154	4		1	g6xf5   Dd6-e5  f7-f6   De5xf6
>5	-195	16		11	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ c2-c4   Db4xc4+ Ka2-a3
>6	-289	35		4	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   Te1xe8+
>Tc8xe8  c2-c3
>7	-282	145		26	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   c2-c3
>Db4-c4+ Ka2-a3  d7-d6   Pc5-b7
>8	-277	808		110	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   c2-c3
>Db4-c4+ Ka2-a3  d7-d6   Pc5-b7
>
>total time	1010
>
>
>
>
>With
>Hash table: 524288 entries
>Recursive Null move: R=2
>History table for move ordering: Off
>
>
>Depth  	Score	Time_for_ply   	Time_PV	PV
>1	-223	0		0	Tc8-b8
>2	-196	0		0	Tc8-b8  Kc1-d2  e6xf5   Te1xe8+ Tb8xe8  Dd6xd7
>3	-192	2		2	g6xf5   Dd6xd7
>4	-154	4		1	g6xf5   Dd6-e5  f7-f6   De5xf6
>5	-195	14		8	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ c2-c4   Db4xc4+ Ka2-a3
>6	-289	10		1	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   Te1xe8+
>Tc8xe8  c2-c3
>7	-282	29		5	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   c2-c3
>Db4-c4+ Ka2-a3  d7-d6   Pc5-b7
>8	-277	113		19	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   c2-c3
>Db4-c4+ Ka2-a3  d7-d6   Pc5-b7
>
>total time	172
>
>
>
>
>With
>Hash table: 2097152 entries
>Recursive Null move: R=2
>History table for move ordering: On
>
>
>
>Depth  	Score	Time_for_ply   	Time_PV	PV
>1	-223	0		0	Tc8-b8
>2	-196	0		0	Tc8-b8  Kc1-d2  e6xf5   Te1xe8+ Tb8xe8  Dd6xd7
>3	-192	2		1	g6xf5   Dd6xd7
>4	-154	3		0	g6xf5   Dd6-e5  f7-f6   De5xf6
>5	-195	14		8	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ c2-c4   Db4xc4+ Ka2-a3
>6	-289	9		1	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   Te1xe8+
>Tc8xe8  c2-c3
>7	-282	25		6	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   c2-c3
>Db4-c4+ Ka2-a3  d7-d6   Pc5-b7
>8	-277	109		18	Pb4-a2+ Kc1-b2  Da5-b4+ Kb2xa2  Lg2-d5+ Dd6xd5  e6xd5   c2-c3
>Db4-c4+ Ka2-a3  d7-d6   Pc5-b7
>
>total time	162
>
>
>
>Bert van den Akker

Very interesting but, to be sincere, I am a little bit lost in your figures.
Reason - my programming, and maybe my game, is very far from be usual. I am
able to compare only on the level of number of plys and the time. The one thing
I would like only confirme with you: Is this true that hash table can give
you in the most time consuming positions (beginning and middle game) advantage
up to 100% in speed. If this is true I feel me doubtful if hash table is so
useful. After all, make your game so swollen for so little is nothing. This
could only help for the game that is very close in speed with everybody else.
But if the hash tables are mainly for the moves ordering and this way is very
efficent, that could be reason for having it. Until now my move ordering was
very poor. This is something that make me loose speed against the best games
in around 9 ply.

Leonid.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.