glicko

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: BSD-2-Clause Imports: 2 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Implements the Glicko Rating System described at http://www.glicko.net/glicko.html.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contest

type Contest struct {
	// 1 for win, 0 for loss, 0.5 for tie
	Outcome float64
	// Rating and Deviation of Opponent
	*Rank
}

Contest records a single contest outcome against an opponent and that oppenents rating and rating deviation at the time.

func NewContest

func NewContest(outcome, r, rd float64) *Contest

type Contests

type Contests []*Contest

A collection of results for a single player during rating period

type Rank

type Rank struct {
	R  float64
	RD float64
}

func UpdateRating

func UpdateRating(rank *Rank, cs Contests, options ...float64) (*Rank, error)

Returns updated rating and updated rating deviation based on the provided contest results. If len(options) == 0, default values for minRD, maxRD, t, and c are used. Otherwise, must provide minRD, maxRD, t, and c.

func (*Rank) ConfidenceInterval

func (r *Rank) ConfidenceInterval() (int, int)

func (*Rank) GHI

func (r *Rank) GHI() int

func (*Rank) GLO

func (r *Rank) GLO() int

Jump to

Keyboard shortcuts

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