configs

package
v0.2.0-beta.7 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecisionNode

type DecisionNode struct {
	AverageProb  float64    `json:"average_prob"`
	ConfInterval [2]float64 `json:"conf_interval"`
	NumSamples   int        `json:"num_samples"`
	// Name of the feature (nil if the node is a leaf node).
	FeatureName *string `json:"feature_name"`
	// Child node if the feature is false (nil if the node is a leaf node).
	Negative *DecisionNode `json:"negative"`
	// Child node if the feature is true (nil if the node is a leaf node).
	Positive *DecisionNode `json:"positive"`
}

DecisionNode represents a node of a decision tree for danger estimation.

func GetDangerTree

func GetDangerTree() (*DecisionNode, error)

type GameStats

type GameStats struct {
	NumHoras             int                     `json:"numHoras"`
	NumTsumoHoras        int                     `json:"numTsumoHoras"`
	NumTurnsDistribution []float64               `json:"numTurnsDistribution"`
	RyukyokuRatio        float64                 `json:"ryukyokuRatio"`
	AverageHoraPoints    float64                 `json:"averageHoraPoints"`
	KoHoraPointsFreqs    map[string]int          `json:"koHoraPointsFreqs"`
	OyaHoraPointsFreqs   map[string]int          `json:"oyaHoraPointsFreqs"`
	YamitenStats         map[string]*YamitenStat `json:"yamitenStats"`
	RyukyokuTenpaiStat   *RyukyokuTenpaiStat     `json:"ryukyokuTenpaiStat"`
	LightGameStats
}

func GetStats

func GetStats() (*GameStats, error)

type LightGameStats

type LightGameStats struct {
	WinProbsMap map[string]map[string]float64 `json:"winProbsMap,omitempty"`
}

type RyukyokuTenpaiStat

type RyukyokuTenpaiStat struct {
	Total                  int            `json:"total"`
	Tenpai                 int            `json:"tenpai"`
	Noten                  int            `json:"noten"`
	TenpaiTurnDistribution map[string]int `json:"tenpaiTurnDistribution"`
}

type YamitenStat

type YamitenStat struct {
	Total  int `json:"total"`
	Tenpai int `json:"tenpai"`
}