Click or drag to resize
Node Methods

The Node type exposes the following members.

Methods
  NameDescription
Public methodAddChild
Adds a new child Node to this Node.
Public methodEquals (Inherited from Object.)
Public methodExpandNode
Expands this Node by creating new child Node
Protected methodFinalize (Inherited from Object.)
Public methodgetBestChild
Finds the best child Node of this Node
Public methodGetBoard
Returns the Board object contained in this Node.
Public methodGetChildren
Returns the children of this Node.
Public methodGetHashCode (Inherited from Object.)
Public methodGetLastMove
Returns the lastMoveTuple of this Node
Public methodGetParent
Returns the parent of this Node.
Public methodGetScore
Returns the score of this Node.
Public methodGetType (Inherited from Object.)
Public methodGetVisits
Returns the number of times this Node has been visited.
Public methodgetWin
Returns the win status of this Node
Public methodgetWinChance
Returns the chance that this Node will lead to a win.
Public methodisLeaf
Checks to see if this is a leaf Node.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodsetLastMove
Sets the lastMoveTuple of this Node.
Public methodsetWin
Sets the win status of this Node
Public methodToString (Overrides ObjectToString.)
Public methodUCTSelectBest
Uses the UCT formula to select the most promising child Node to explore.
// UCT Formula
            uctVal = (child.GetScore() / (child.GetVisits() + EPSILON)) + Math.Sqrt(2) * Math.Sqrt((Math.Log(GetVisits() + 1)) / (child.GetVisits() + EPSILON)) + x + EPSILON;
Public methodupdateScore
Updates the score of this Node.
Public methodupdateStats
A method that updates the score and visitCount of this Node
Public methodupdateVisitCount
Updates the visitCount of this Node
Top
See Also