bot

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const InferencesSimLimit = 400

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 HasInfer

func HasInfer(botCode macondo.BotRequest_BotCode) bool

Types

type BotConfig

type BotConfig struct {
	config.Config
	PEGAdjustmentFile string
	LeavesFile        string
	MinSimPlies       int
}

type BotTurnPlayer

type BotTurnPlayer struct {
	aiturnplayer.AIStaticTurnPlayer
	// contains filtered or unexported fields
}

func NewBotTurnPlayer

func NewBotTurnPlayer(conf *BotConfig, opts *turnplayer.GameOptions,
	players []*pb.PlayerInfo, botType pb.BotRequest_BotCode) (*BotTurnPlayer, error)

func NewBotTurnPlayerFromGame

func NewBotTurnPlayerFromGame(g *game.Game, conf *BotConfig, botType pb.BotRequest_BotCode) (*BotTurnPlayer, error)

func (*BotTurnPlayer) BestPlay

func (p *BotTurnPlayer) BestPlay(ctx context.Context) (*move.Move, error)

func (*BotTurnPlayer) GenerateMoves

func (p *BotTurnPlayer) GenerateMoves(numPlays int) []*move.Move

func (*BotTurnPlayer) GetBotType

func (p *BotTurnPlayer) GetBotType() pb.BotRequest_BotCode

func (*BotTurnPlayer) SetBotType

func (p *BotTurnPlayer) SetBotType(b pb.BotRequest_BotCode)

func (*BotTurnPlayer) SetEquityCalculators

func (p *BotTurnPlayer) SetEquityCalculators(calcs []equity.EquityCalculator)

func (*BotTurnPlayer) SetMinSimPlies added in v0.6.0

func (p *BotTurnPlayer) SetMinSimPlies(t int)

func (*BotTurnPlayer) SetSimThreads

func (p *BotTurnPlayer) SetSimThreads(t int)

Jump to

Keyboard shortcuts

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