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

I am the AI that will beat you eventually. Well, maybe not today ... BUT MY TIME WILL COME!!!

instance methods
  accessing
  statusString

  initialize
  activePlayer:
initialize
initializeTranspositionTable
reset
reset:

  searching
  copyVariation:
mtdfSearch:score:depth:
negaScout:depth:alpha:beta:
ngSearch:depth:alpha:beta:
quiesce:alpha:beta:
search:depth:alpha:beta:
searchMove:depth:alpha:beta:

  thinking
  isThinking
startThinking
think
thinkProcess
thinkStep
timeToThink

class methods
  class initialization
  initialize

instance methods
  accessing top  
 

statusString


  initialize top  
 

activePlayer:


 

initialize


 

initializeTranspositionTable

Initialize the transposition table. Note: For now we only use 64k entries since they're somewhat space intensive. If we should get a serious speedup at some point we may want to increase the transposition table - 256k seems like a good idea; but right now 256k entries cost us roughly 10MB of space. So we use only 64k entries (2.5MB of space).
If you have doubts about the size of the transition table (e.g., if you think it's too small or too big) then modify the value below and have a look at ChessTranspositionTable>>clear which can print out some valuable statistics.


 

reset


 

reset:


  searching top  
 

copyVariation:


 

mtdfSearch:score:depth:

An implementation of the MTD(f) algorithm. See:
http://www.cs.vu.nl/~aske/mtdf.html


 

negaScout:depth:alpha:beta:

Modified version to return the move rather than the score


 

ngSearch:depth:alpha:beta:

A basic alpha-beta algorithm; based on negaMax rather than from the text books


 

quiesce:alpha:beta:

A variant of alpha-beta considering only captures and null moves to obtain a quiet position, e.g. one that is unlikely to change heavily in the very near future.


 

search:depth:alpha:beta:

A basic alpha-beta algorithm; based on negaMax rather than from the text books


 

searchMove:depth:alpha:beta:

Modified version to return the move rather than the score


  thinking top  
 

isThinking


 

startThinking


 

think


 

thinkProcess


 

thinkStep


 

timeToThink

Return the number of milliseconds we're allowed to think


class methods
  class initialization top  
 

initialize

ChessPlayerAI initialize