runner

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BotConfigs = map[pb.BotRequest_BotCode]struct {
	baseFindability     float64
	longWordFindability float64
	parallelFindability float64
	isCel               bool
}{
	pb.BotRequest_LEVEL1_CEL_BOT: {/* contains filtered or unexported fields */},
	pb.BotRequest_LEVEL2_CEL_BOT: {/* contains filtered or unexported fields */},
	pb.BotRequest_LEVEL3_CEL_BOT: {/* contains filtered or unexported fields */},
	pb.BotRequest_LEVEL4_CEL_BOT: {/* contains filtered or unexported fields */},

	pb.BotRequest_LEVEL1_PROBABILISTIC: {/* contains filtered or unexported fields */},
	pb.BotRequest_LEVEL2_PROBABILISTIC: {/* contains filtered or unexported fields */},
	pb.BotRequest_LEVEL3_PROBABILISTIC: {/* contains filtered or unexported fields */},
	pb.BotRequest_LEVEL4_PROBABILISTIC: {/* contains filtered or unexported fields */},
	pb.BotRequest_LEVEL5_PROBABILISTIC: {/* contains filtered or unexported fields */},
}

Note: because of the nature of this algorithm, the lower these numbers, the more time the bot will take to find its move.

Functions

func GenerateMoves

func GenerateMoves(g *game.Game, aiplayer player.AIPlayer, gen movegen.MoveGenerator,
	cfg *config.Config, numPlays int) []*move.Move

func NewAIGameRules

func NewAIGameRules(cfg *config.Config, boardLayoutName string,
	lexiconName string, letterDistributionName string) (*game.GameRules, error)

Types

type AIGameRunner

type AIGameRunner struct {
	runner.GameRunner
	// contains filtered or unexported fields
}

Game with an AI player available for move generation.

func NewAIGameRunner

func NewAIGameRunner(conf *config.Config, opts *runner.GameOptions, players []*pb.PlayerInfo, botType pb.BotRequest_BotCode) (*AIGameRunner, error)

func NewAIGameRunnerFromGame

func NewAIGameRunnerFromGame(g *game.Game, conf *config.Config, botType pb.BotRequest_BotCode) (*AIGameRunner, error)

func (*AIGameRunner) AIPlayer

func (g *AIGameRunner) AIPlayer() player.AIPlayer

func (*AIGameRunner) AssignEquity

func (g *AIGameRunner) AssignEquity(plays []*move.Move, oppRack *alphabet.Rack)

func (*AIGameRunner) GenerateMoves

func (g *AIGameRunner) GenerateMoves(numPlays int) []*move.Move

func (*AIGameRunner) MoveGenerator

func (g *AIGameRunner) MoveGenerator() movegen.MoveGenerator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL