Documentation ¶
Index ¶
- func CalcMaxRank(flagTroops []card.Troop, flagMorales []card.Morale, deckHandTroops *dht.Cache, ...) (rank int, prob float64)
- func HandAnalyze(deckHandTroops *dht.Cache, botix int) (ana map[card.Troop][]*combi.Analysis)
- func MoraleTroopsSum(flagTroops []card.Troop, flagMorales []card.Morale) (sum int)
- type Analysis
- type Deck
- func (deck *Deck) BotDrawNo(isFirst bool) (no int)
- func (deck *Deck) DeckTacNo() int
- func (deck *Deck) DeckTroopNo() int
- func (deck *Deck) DrawNos(drawFirst int) (nos [2]int)
- func (deck *Deck) Envs() []card.Env
- func (deck *Deck) Guiles() []card.Guile
- func (deck *Deck) MaxStrenghts() []int
- func (deck *Deck) Morales() []card.Morale
- func (deck *Deck) OppDrawNo(isFirst bool) (no int)
- func (deck *Deck) OppHandTacNo() int
- func (deck *Deck) OppHandTroopsNo() int
- func (deck *Deck) ScoutReturnTacPeek() card.Card
- func (deck *Deck) ScoutReturnTroopPeek() card.Card
- func (deck *Deck) Tacs() []card.Card
- func (deck *Deck) Troops() []card.Troop
- type TfAna
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcMaxRank ¶
func CalcMaxRank( flagTroops []card.Troop, flagMorales []card.Morale, deckHandTroops *dht.Cache, playix int, formationSize int, isFog bool, targetRank, targetHostStr, targetBattStr int, ) (rank int, prob float64)
CalcMaxRank calculate the maximum rank a play may reach on a flag.
func HandAnalyze ¶
HandAnalyze create a rank analysis of each troop on the hand. it assume no/ ignore enviroment cards, and targetSum = 0 this means can use Prob or Playables on combination Host
Types ¶
type Analysis ¶
type Analysis struct { Flagix int TargetRank int TargetSum int BotMaxRank int BotMaxSum int OppFormationSize int BotFormationSize int FormationSize int FlagValue int IsTargetMade bool IsLost bool IsWin bool IsNewFlag bool IsPlayable bool IsClaimed bool Claimer int IsFog bool IsLoosingGame bool RankAnas []*combi.Analysis Flag *game.Flag Playix int }
Analysis a analysis of the flag.
func NewAnalysis ¶
NewAnalysis create a flag analysis.
type Deck ¶
type Deck struct {
// contains filtered or unexported fields
}
Deck contain all information of unknown cards. That includes decks and the hand of the opponent. It also tracks cards returned to deck when scout is played.
func (*Deck) DeckTroopNo ¶
DeckTroopNo returns the current troop deck size.
func (*Deck) MaxStrenghts ¶
MaxStrenghts returns the 4 max strenghts a deck contain.
func (*Deck) OppHandTacNo ¶
OppHandTacNo the opponets number of hand tactic cards.
func (*Deck) OppHandTroopsNo ¶
OppHandTroopsNo the opponets number of hand troops cards.
func (*Deck) ScoutReturnTacPeek ¶
ScoutReturnTacPeek returns the next tactic card in the deck if it is known.
func (*Deck) ScoutReturnTroopPeek ¶
ScoutReturnTroopPeek returns the next troop in the deck if its known.
type TfAna ¶
type TfAna struct {
// contains filtered or unexported fields
}
TfAna tensor flow analysis
func NewTfAnalysis ¶
func NewTfAnalysis( playix int, flag *game.Flag, deckHandTroops *dht.Cache, flagix int) (tfa *TfAna)
NewTfAnalysis create a tensor flow flag analysis.
func (*TfAna) MachineFloats ¶
func (*TfAna) MachineFormat ¶
MachineFormat creates a tensor flow string.