Giter Site home page Giter Site logo

iditarod_pool's Introduction

Dan's Iditarod Betting Pool!

Welcome

Welcome to the Github repo for Dan's Iditarod Betting Pool! In the interest of full disclosure, and since there's some serious cash on the line here, I figured I'd make the musher assignment process totally transparent for this betting pool. In this repo, you'll find a Ruby script iditarod.rb which is the exact script used to assign mushers to betters. The list of mushers, subdivided into regular mushers and rookie mushers (who have not raced before), is included as well in the form of racers.yaml. The betters.yaml file and a sample output.yaml file have been replaced with dummy versions to protect the privacy of those whose last names are in the real files.

Rationale

My friends and I had an Iditarod betting pool in high school, but we did it draft pick style. The draft pick order was random, but the person who got first pick got to pick Lance Mackey, winner of the 2007-2010 Iditarod races, and it was totally unfair and lame (although he didn't end up winning!). I decided that in the future, the fairest way to distribute mushers would be to randomly assign them.

The iditarod.rb script randomly divvies up the non-rookie mushers to the betters, and then divvies the rookies in reverse order so that betters towards the end of the list, who may have received one fewer musher than the betters at the beginning of the list, will get rookies first and thus possibly balance out the distribution. This should prevent any one better from having more than one musher than the person with the least number of mushers assigned.

Auditing

It would be pretty easy for me to fake the output and stack the odds however I wanted! That's why I've included the ability for you to audit results if you're so inclined. Line 3 of iditarod.rb contains a declaration of the variable random_seed which is used to seed the random-number-generator which is then used to shuffle the musher array, rookie array, and better array before the mushers get divvied. When the script is run multiple times for the same random seed, the results are always the same.

On the day of the divvying, we'll randomly choose a seed and I'll update the file here. I will post the real betters.yaml file to the Facebook group and you can run the script yourself to ensure that your results match mine. Running the script is simple. Download the iditarod.rb file, the racers.yaml file, and the betters.yaml file (the last one coming from the Facebook group). Ensure that the random seed in iditarod.rb is set to the final proper value. Then cd to the directory with these files in it in your terminal of choice and run ruby iditarod.rb. Then simply open the output.yaml file that gets created and compare it to the one I'll publish. You'll find that it's exactly the same.

Fin.

The pool's over and everything worked great!

iditarod_pool's People

Contributors

daturkel avatar

Stargazers

 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.