Project

skillz

0.0
No commit activity in last 3 years
No release in over 3 years
A ruby library implementing a competitive ranking system based on trueskill and other similar systems. Built to address issues such as cheating, tournaments, team-play, matching, etc..
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Skillz

Skillz is a Competitive Ranking System based upon others such as TrueSkill among others.

Getting Started

Add this line to your application's Gemfile:

gem 'skillz'

And then execute:

$ bundle

Or install it yourself as:

$ gem install skillz

Usage

example

# create players where 30 is their average score
# 4 is the level of uncertainty of their skill
# and the last is how long its been since their last match
# skill_level defaults to 25, and uncertainty defaults to skill_level/3
# if no last played time is given it ignores it 

p1 = Skillz::Player.new(30, 4, Time.now - 4.days)
p2 = Skillz::Player.new(30, 4, Time.now - 20.days)
p3 = Skillz::Player.new
p4 = Skillz::Player.new

# create teams with the players you want in each, and their ranking
# as the second argument

team1 = Skillz::Team.new([p1, p2], 1)
team2 = Skillz::Team.new([p3, p4], 2)

Skillz::Match.score(Skillz::Team.new([p1, p2], 1), Skillz::Team.new([p2], 2))
# players are now update with their new skill_level and skill_uncertainty

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
  6. Feel satisfied.