Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlphaBeta ¶
func AlphaBeta(state *hex.State, timeToRun time.Duration, createTree bool, gridChan chan []uint32, patChan chan []int, resultChan chan [2][]int, getEstimatedValue func(s *Sample) float64, subtype string) (*hex.Action, *tree.Tree)
AlphaBeta runs search with AB pruning to select the next action to be taken. In addition to the selected action it returns the tree that was constructed during the last AB search (if wanted).
func GetEstimateFunction ¶
GetEstimateFunction returns a function that will be used for evaluating states
Types ¶
type NodeValue ¶
type NodeValue struct {
// contains filtered or unexported fields
}
NodeValue stores a hex state and its estimated value, obtained by negamax algorithm with AB pruning. comment is used for debugging purposes
func CreateAbNodeValue ¶
CreateAbNodeValue creates a new NodeValue with given state and its estimated value
func (NodeValue) MarshalJSON ¶
MarshalJSON implements Marshaler interface It returns NodeValue in JSON format
Click to show internal directories.
Click to hide internal directories.