Squeak Class Documentation category index | class index  
 
ChessTranspositionTable
  category: Morphic-Games-Chess
  superclass: Object
  subclasses:

The transposition table is a lookup cache for positions in a game that occur through transpositions in move. As an example, the same position is obtained by the moves:
1. e2-e4 Nb8-c6
2. d2-d4
and
1. d2-d4 Nb8-c6
2. e2-e4
An extremely large number of search branches can be cut off immediately by recognizing that the current position is just the transposition of another one. The transposition table is one of the techniques that actually make modern chess programs good enough to compete with or even beat humans.

instance methods
  initialize
  clear
initialize:
storeBoard:value:type:depth:stamp:

  lookup
  lookupBoard:

class methods
  instance creation
  new:

instance methods
  initialize top  
 

clear

Set the following to true for printing information about the fill rate and number of collisions. The transposition table should have *plenty* of free space (it should rarely exceed 30% fill rate) and *very* few collisions (those require us to evaluate positions repeatedly that we've evaluated before -- bad idea!)


 

initialize:

Initialize the receiver using 1<<nBits entries. See also ChessPlayerAI>>initializeTranspositionTable.


 

storeBoard:value:type:depth:stamp:


  lookup top  
 

lookupBoard:


class methods
  instance creation top  
 

new:

Answer an instance of this class with the number of indexable
variables specified by the argument, sizeRequested.