Documentation ¶
Index ¶
- func ChooseNewRoot(root *node, state api.GameState) *node
- func CreateTree(b *bitboard.BitBoard, me string) *node
- func GetNextMove(board *bitboard.BitBoard, config MCTSConfig, me string) bitboard.Dir
- func MCTS(root *node, minSims, simLimit, depthLim int) bitboard.Dir
- func MCTSWorker(ctx context.Context, rand *rand.Rand, root *node, config MCTSConfig) rewards
- type Game
- type GameController
- type Hydra
- type HydraHead
- type MCTSConfig
- type SnakeMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChooseNewRoot ¶
func CreateTree ¶
func GetNextMove ¶
creates new workers each request, easier for now
func MCTSWorker ¶
func MCTSWorker(ctx context.Context, rand *rand.Rand, root *node, config MCTSConfig) rewards
Types ¶
type GameController ¶
type GameController struct {
// contains filtered or unexported fields
}
func CreateGameController ¶
func CreateGameController() *GameController
func (*GameController) EndGame ¶
func (gc *GameController) EndGame(state api.GameState)
func (*GameController) GetNextMove ¶
func (gc *GameController) GetNextMove(state api.GameState, config MCTSConfig) bitboard.Dir
func (*GameController) StartGame ¶
func (gc *GameController) StartGame(state api.GameState)
type MCTSConfig ¶
Click to show internal directories.
Click to hide internal directories.