Glicko2 Implementation in Go (golang)
Go
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
goglicko.go
goglicko_bench_test.go
goglicko_test.go
rating.go
rating_test.go

README.md

Go-Glicko

A Glicko2 Implementation in Go (golang)

To install, all you should need is

go get github.com/Kashomon/goglicko

Usage

To install:

go get github.com/Kashomon/goglicko

To use GoGlicko:

import (
  github.com/Kashomon/goglicko
)

func Rate() {
  player := DefaultRating()

  opponents := []*Rating{
    NewRating(1400, 30, DefaultVol),
    NewRating(1550, 100, DefaultVol),
    NewRating(1700, 300, DefaultVol),
  }

  results := []Result{1, 0, 0}

  newRating := CalculateRating(p, o, res)
}

Speed

For the simple example above, the algorithm is quite quick:

Benchmarks:
  BenchmarkSimpleExample	 1000000	      1089 ns/op

So roughly 1μs/call. Thus, we can expect that 1,000,000 such ratings should take about a second.