Coder Social home page Coder Social logo

openskill.kt's Introduction

Kotlin multiplatform implementation of this great library, that can be used with your model out of the box!

Getting started:

  • Add jitpack to you repositories: https://jitpack.io
  • Add as dependency com.github.brezinajn:openskill.kt:0.0.1

Usage:

// Your player class
data class Player(
    val mu: Double,
    val sigma: Double,
    //
)

// Your team class
data class Team(
    val players: List<Player>,
    // val score: Int, // optional
    //
)

// Initialization of the model for your classes
val model = BradleyTerryFull(
    sigmaGetter = Player::sigma,
    muGetter = Player::mu,
    playersGetter = Team::players,
    sigmaSetter = { player, sigma -> player.copy(sigma = sigma) },
    muSetter = { player, mu -> player.copy(mu = mu) },
    playersSetter = { team, players -> team.copy(players = players) },
    // rankGetter = { it.map(Team::score) }, // optional 
)

// Match result - sorted from the first place
val teams: List<Team>

// Match result with updated player ratings
val teamsWithUpdatedRatings = model(teams)

openskill.kt's People

Contributors

brezinajn avatar

Stargazers

Mikhail Sedov avatar tarsin avatar  avatar Michel Jung avatar Kaisei Yokoyama avatar Chris Comeaux avatar Mark Beznos avatar Paco avatar Vivek Joshy avatar Thomas G. avatar Blain Smith avatar Matronator avatar ‮Philihp Busby avatar

Watchers

James Cloos avatar  avatar

openskill.kt's Issues

Thurstone Typo

Looks like my poor spelling propagated here. It should be Thurstone Mosteller.

Publish release

Any thoughts on publishing a release of this? Even if it's just a no-warranty zero-dot release, if anything, it reserves the library namespace.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.