<s>
A	O
transposition	B-General_Concept
table	I-General_Concept
is	O
a	O
cache	B-General_Concept
of	O
previously	O
seen	O
positions	O
,	O
and	O
associated	O
evaluations	O
,	O
in	O
a	O
game	O
tree	O
generated	O
by	O
a	O
computer	O
game	O
playing	O
program	O
.	O
</s>
<s>
Transposition	B-General_Concept
tables	I-General_Concept
are	O
primarily	O
useful	O
in	O
perfect-information	O
games	O
(	O
where	O
the	O
entire	O
state	O
of	O
the	O
game	O
is	O
known	O
to	O
all	O
players	O
at	O
all	O
times	O
)	O
.	O
</s>
<s>
The	O
usage	O
of	O
transposition	B-General_Concept
tables	I-General_Concept
is	O
essentially	O
memoization	O
applied	O
to	O
the	O
tree	O
search	O
and	O
is	O
a	O
form	O
of	O
dynamic	B-Algorithm
programming	I-Algorithm
.	O
</s>
<s>
Transposition	B-General_Concept
tables	I-General_Concept
are	O
typically	O
implemented	O
as	O
hash	B-Algorithm
tables	I-Algorithm
encoding	O
the	O
current	O
board	O
position	O
as	O
the	O
hash	O
index	O
.	O
</s>
<s>
Transposition	B-General_Concept
tables	I-General_Concept
may	O
therefore	O
consume	O
most	O
of	O
available	O
system	O
memory	O
and	O
are	O
usually	O
most	O
of	O
the	O
memory	O
footprint	O
of	O
game	O
playing	O
programs	O
.	O
</s>
<s>
Typically	O
,	O
these	O
programs	O
employ	O
strategies	O
resembling	O
depth-first	B-Algorithm
search	I-Algorithm
,	O
which	O
means	O
that	O
they	O
do	O
not	O
keep	O
track	O
of	O
all	O
the	O
positions	O
analyzed	O
so	O
far	O
.	O
</s>
<s>
In	O
chess	B-Application
,	O
for	O
example	O
,	O
the	O
sequence	O
of	O
moves	O
1	O
.	O
d4	O
Nf6	O
2	O
.	O
c4	O
g6	O
(	O
see	O
algebraic	O
chess	B-Application
notation	O
)	O
has	O
4	O
possible	O
transpositions	O
,	O
since	O
either	O
player	O
may	O
swap	O
their	O
move	O
order	O
.	O
</s>
<s>
To	O
avoid	O
this	O
problem	O
,	O
transposition	B-General_Concept
tables	I-General_Concept
are	O
used	O
.	O
</s>
<s>
Such	O
a	O
table	O
is	O
a	O
hash	B-Algorithm
table	I-Algorithm
of	O
each	O
of	O
the	O
positions	O
analyzed	O
so	O
far	O
up	O
to	O
a	O
certain	O
depth	O
.	O
</s>
<s>
If	O
not	O
,	O
the	O
value	O
is	O
computed	O
,	O
and	O
the	O
new	O
position	O
is	O
entered	O
into	O
the	O
hash	B-Algorithm
table	I-Algorithm
.	O
</s>
<s>
When	O
the	O
table	O
fills	O
up	O
,	O
less-used	O
positions	O
are	O
removed	O
to	O
make	O
room	O
for	O
new	O
ones	O
;	O
this	O
makes	O
the	O
transposition	B-General_Concept
table	I-General_Concept
a	O
kind	O
of	O
cache	B-General_Concept
.	O
</s>
<s>
The	O
computation	O
saved	O
by	O
a	O
transposition	B-General_Concept
table	I-General_Concept
lookup	O
is	O
not	O
just	O
the	O
evaluation	O
of	O
a	O
single	O
position	O
.	O
</s>
<s>
Thus	O
,	O
transposition	B-General_Concept
table	I-General_Concept
entries	O
for	O
nodes	O
at	O
a	O
shallower	O
depth	O
in	O
the	O
game	O
tree	O
are	O
more	O
valuable	O
(	O
since	O
the	O
size	O
of	O
the	O
subtree	O
rooted	O
at	O
such	O
a	O
node	O
is	O
larger	O
)	O
and	O
are	O
therefore	O
given	O
more	O
importance	O
when	O
the	O
table	O
fills	O
up	O
and	O
some	O
entries	O
must	O
be	O
discarded	O
.	O
</s>
<s>
The	O
hash	B-Algorithm
table	I-Algorithm
implementing	O
the	O
transposition	B-General_Concept
table	I-General_Concept
can	O
have	O
other	O
uses	O
than	O
finding	O
transpositions	O
.	O
</s>
<s>
In	O
alpha	B-Algorithm
–	I-Algorithm
beta	I-Algorithm
pruning	I-Algorithm
,	O
the	O
search	O
is	O
fastest	O
(	O
in	O
fact	O
,	O
optimal	O
)	O
when	O
the	O
child	O
of	O
a	O
node	O
corresponding	O
to	O
the	O
best	O
move	O
is	O
always	O
considered	O
first	O
.	O
</s>
<s>
Of	O
course	O
,	O
there	O
is	O
no	O
way	O
of	O
knowing	O
the	O
best	O
move	O
beforehand	O
,	O
but	O
when	O
iterative	B-Algorithm
deepening	I-Algorithm
is	O
used	O
,	O
the	O
move	O
that	O
was	O
found	O
to	O
be	O
the	O
best	O
in	O
a	O
shallower	O
search	O
is	O
a	O
good	O
approximation	O
.	O
</s>
<s>
For	O
storing	O
the	O
best	O
child	O
of	O
a	O
node	O
,	O
the	O
entry	O
corresponding	O
to	O
that	O
node	O
in	O
the	O
transposition	B-General_Concept
table	I-General_Concept
is	O
used	O
.	O
</s>
<s>
Use	O
of	O
a	O
transposition	B-General_Concept
table	I-General_Concept
can	O
lead	O
to	O
incorrect	O
results	O
if	O
the	O
graph-history	O
interaction	O
problem	O
is	O
not	O
studiously	O
avoided	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
chess	B-Application
a	O
player	O
may	O
not	O
castle	O
if	O
the	O
king	O
or	O
the	O
rook	O
to	O
be	O
castled	O
with	O
has	O
moved	O
during	O
the	O
course	O
of	O
the	O
game	O
.	O
</s>
<s>
A	O
common	O
solution	O
to	O
this	O
problem	O
is	O
to	O
add	O
the	O
castling	O
rights	O
as	O
part	O
of	O
the	O
Zobrist	B-Application
hashing	I-Application
key	O
.	O
</s>
<s>
A	O
solution	O
to	O
the	O
general	O
problem	O
is	O
to	O
store	O
history	O
information	O
in	O
each	O
node	O
of	O
the	O
transposition	B-General_Concept
table	I-General_Concept
,	O
but	O
this	O
is	O
inefficient	O
and	O
rarely	O
done	O
in	O
practice	O
.	O
</s>
<s>
A	O
transposition	B-General_Concept
table	I-General_Concept
is	O
a	O
cache	B-General_Concept
whose	O
maximum	O
size	O
is	O
limited	O
by	O
available	O
system	O
memory	O
,	O
and	O
it	O
may	O
overflow	O
at	O
any	O
time	O
.	O
</s>
<s>
Though	O
the	O
fraction	O
of	O
nodes	O
that	O
will	O
be	O
transpositions	O
is	O
small	O
,	O
the	O
game	O
tree	O
is	O
an	O
exponential	O
structure	O
,	O
so	O
caching	B-General_Concept
a	O
very	O
small	O
number	O
of	O
such	O
nodes	O
can	O
make	O
a	O
significant	O
difference	O
.	O
</s>
<s>
In	O
chess	B-Application
,	O
search	O
time	O
reductions	O
of	O
0-50	O
%	O
in	O
complex	O
middle	O
game	O
positions	O
and	O
up	O
to	O
a	O
factor	O
of	O
5	O
in	O
the	O
end	O
game	O
have	O
been	O
reported	O
.	O
</s>
<s>
Similar	O
techniques	O
can	O
be	O
used	O
to	O
cache	B-General_Concept
evaluations	O
of	O
certain	O
features	O
of	O
a	O
position	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
pawn	O
hash	B-Algorithm
table	I-Algorithm
can	O
be	O
used	O
to	O
store	O
an	O
evaluation	O
of	O
the	O
pawn	O
structures	O
in	O
a	O
position	O
.	O
</s>
<s>
Since	O
the	O
number	O
of	O
pawn	O
positions	O
examined	O
is	O
generally	O
much	O
smaller	O
than	O
the	O
total	O
number	O
of	O
positions	O
searched	O
,	O
the	O
pawn	O
hash	B-Algorithm
table	I-Algorithm
has	O
a	O
very	O
high	O
hit	O
rate	O
,	O
allowing	O
a	O
program	O
to	O
spend	O
more	O
time	O
on	O
sophisticated	O
pawn	O
evaluations	O
because	O
they	O
are	O
reused	O
many	O
times	O
.	O
</s>
<s>
Refutation	O
tables	O
were	O
sometimes	O
used	O
instead	O
of	O
transposition	B-General_Concept
tables	I-General_Concept
in	O
the	O
earlier	O
years	O
of	O
computer	B-Application
chess	I-Application
,	O
when	O
memory	O
was	O
more	O
limited	O
.	O
</s>
<s>
Some	O
modern	O
chess	B-Application
programs	O
use	O
refutation	O
tables	O
in	O
addition	O
to	O
transposition	B-General_Concept
tables	I-General_Concept
for	O
move	O
ordering	O
.	O
</s>
