Documentation
¶
Index ¶
- func ConstructTree(fileName string)
- func GetMaxNestedStructureCount(tree *ModelTree)
- func GetNodeWithMaxConfidence(gameChildNodes map[string]*GameStateNode, visitCount int) string
- func ReadFile(fileName string) []generator.GameMovesWithResult
- type ConfidenceNode
- type ConfidenceTree
- type GameStateNode
- type ModelTree
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructTree ¶
func ConstructTree(fileName string)
func GetMaxNestedStructureCount ¶
func GetMaxNestedStructureCount(tree *ModelTree)
func GetNodeWithMaxConfidence ¶
func GetNodeWithMaxConfidence(gameChildNodes map[string]*GameStateNode, visitCount int) string
Returns the id of the child node which have the most confidence
func ReadFile ¶
func ReadFile(fileName string) []generator.GameMovesWithResult
Types ¶
type ConfidenceNode ¶
type ConfidenceNode struct { Child map[string]*ConfidenceNode `json:"c"` SuitableId string `json:"s,omitempty"` }
func GetConfidenceNode ¶
func GetConfidenceNode() *ConfidenceNode
type ConfidenceTree ¶
type ConfidenceTree struct {
Root *ConfidenceNode
}
func GetConfidenceTree ¶
func GetConfidenceTree() *ConfidenceTree
func (*ConfidenceTree) ConstructConfidenceTree ¶
func (confTree *ConfidenceTree) ConstructConfidenceTree(modelTree *ModelTree)
Constructs the Confidence Tree by traversing over the Model Tree
type GameStateNode ¶
type GameStateNode struct { ChildNode map[string]*GameStateNode `json:"ch"` // inside map the key is the identifier for each node PlayerColor string `json:"clr"` SelectedCount int `json:"c"` WinCount int `json:"w"` DrawCount int `json:"d"` LoseCount int `json:"l"` }
func GetGameStateNode ¶
func GetGameStateNode(playClr string) *GameStateNode
func (*GameStateNode) IncDrawCount ¶
func (node *GameStateNode) IncDrawCount()
func (*GameStateNode) IncLoseCount ¶
func (node *GameStateNode) IncLoseCount()
func (*GameStateNode) IncSelectedCount ¶
func (node *GameStateNode) IncSelectedCount()
func (*GameStateNode) IncWinCount ¶
func (node *GameStateNode) IncWinCount()
type ModelTree ¶
type ModelTree struct {
Root *GameStateNode `json:"root"`
}
func GetSingletonTreeInstance ¶
func GetSingletonTreeInstance() *ModelTree
func GetTreeInstance ¶
func GetTreeInstance() *ModelTree
Click to show internal directories.
Click to hide internal directories.