Giter Site home page Giter Site logo

yelp-continuous-shots's Introduction

Yelp Continuous Shots

This is similar to Friday Shots, but happens continuously rather than on Fridays. Anyone can take a shot any time, and if they hit the bell they take the full pot right away. The program displays two things:

  1. How much it costs to take one shot.
  2. How much the shooter will win if they hit the bell.

Details

We track how many shots have been taken and how many of those have been hits. We use hits / shots as the probability of a hit. Note that this is overall, not per player.

Each shot costs probability_of_hit * pot. Part of the cost of each shot is added to pot. The rest of it is added to a "bank" that is used to replenish the pot after someone wins. We try to put enough money into the bank so that by the time someone wins a round there'll be $10 ready.

Rules?

  • If necessary we can create a queue.
  • Per-player hit probabilities?
    • Good: low-skill players won't feel discouraged about their perceived chances being below the overall probability.
    • Bad: good players could tank to get a low probability when the pot is low then pay little to shoot for a huge pot.

TODO

  • Handle serialization

  • Make it so that the program can quit at any time

  • We say that the user will win $POT, but then give them $POT + $COST. We should pay out and then put the cost back into the pot and bank.

  • Print out winners - dues for each user.

  • Computing the probability of not hitting the bell in N shots after each shot messes this up.

  • Use only a part of the bailout funds, not all of it.

  • Clean up the code.

Error Cases

  • If someone hits the bell before the bank has grown then the government bailout is used. After the bailout money is used, all future bailings (initial pots) are just $1. Once we make it possible to kill and restart the program, we could just alter the bailout funds available field (and agree to donate the money).

yelp-continuous-shots's People

Contributors

colinpollock avatar

Stargazers

 avatar

Watchers

 avatar  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.