GithubHelp home page GithubHelp logo

foosbot's Introduction

Foosbot

Foosbot is a Slack bot for recording foosball results and ranking players into a league. Players play pick-up games of first to 10, in any combination of 1v1 or 2v2 format and the bot will maintain a ranking order for the individual players.

Installation

Foosbot requires several python packages, which can be installed using pip install -r requirements.txt.

Then you need to create a config file called config.yaml in the location where you intend to run foosbot containing something like:

---
slacktoken: <API token generated from https://api.slack.com/web>
fooschan: <channel name where you want bot to run>
adminuser: <your slack username>
botuser: <a bot username set up in slack integrations>
firebaseurl: <the url of your firebase database>
firebaseuser: <your firebase username>
firebasesecret: <your firebase secret token>

Then just run ./foosbot.py

Usage

To use foosbot, just talk to it in the slack channel you specified in your config file, e.g:

@foosbot: help

Results are recorded by saying something like:

@foosbot: result @steve vs @john 10-6

And then you can request rankings:

@foosbot: rank

which once you've played enough games will return something like:

1. steve (3.4)
2. john (-3.4)

Ranking Model

Technically the ranking algorithm assumes that a foosball game is a series of Bernoulli trials, with a probability determined by the difference in skill between two players. Given a set of matches, it tries to find a set of skill ratings for all players involved which maximises the likelihood of the observed results. To make the minimisation fast this is done with Stochastic Gradient Descent implemented with Theano.

To increase the quality of the rankings, players are required to have played at least 3 games before they are ranked. Old players are removed after a grace period of 150 days.

foosbot's People

Contributors

adamaaaa avatar mmmoussa avatar

Watchers

 avatar  avatar

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.