internal_glicko

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RATING_SCALE_PARAMETER = 173.7178
	RATING_BASE_R          = 1500
	RATING_BASE_RD         = 350
	RATING_BASE_SIGMA      = 0.06
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MatchResult

type MatchResult float64
const (
	MATCH_RESULT_WIN  MatchResult = 1.0
	MATCH_RESULT_DRAW MatchResult = 0.5
	MATCH_RESULT_LOSS MatchResult = 0.0
)

func MatchResultFromScore

func MatchResultFromScore(score1 float64, score2 float64) MatchResult

type Player

type Player struct {
	// contains filtered or unexported fields
}

func NewDefaultPlayer

func NewDefaultPlayer() *Player

func NewPlayer

func NewPlayer(pre *Rating) *Player

func (*Player) Rating

func (player *Player) Rating() *Rating

type Rating

type Rating struct {
	// contains filtered or unexported fields
}

func NewDefaultRating

func NewDefaultRating() *Rating

func NewRating

func NewRating(r float64, rd float64, sigma float64) *Rating

func (Rating) ConfidenceInterval

func (rating Rating) ConfidenceInterval() (float64, float64)

func (Rating) R

func (rating Rating) R() float64

func (Rating) Rd

func (rating Rating) Rd() float64

func (Rating) Sigma

func (rating Rating) Sigma() float64

func (*Rating) Touch

func (rating *Rating) Touch()

func (*Rating) Update

func (rating *Rating) Update(mu float64, phi float64, sigma float64)

type RatingPeriod

type RatingPeriod struct {
	// contains filtered or unexported fields
}

func NewRatingPeriod

func NewRatingPeriod() *RatingPeriod

func (*RatingPeriod) AddMatch1Player

func (period *RatingPeriod) AddMatch1Player(player1 *Player, player2 *Player, score MatchResult)

func (*RatingPeriod) AddMatch2Player

func (period *RatingPeriod) AddMatch2Player(player1 *Player, player2 *Player, score MatchResult)

func (*RatingPeriod) AddPlayer

func (period *RatingPeriod) AddPlayer(player *Player)

func (*RatingPeriod) Calculate

func (period *RatingPeriod) Calculate()

Jump to

Keyboard shortcuts

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