An unofficial, read-only Hacker News reader. Join the beta →

Show HN: bouncemarket – a live prediction market game for a bouncing ball (opens external site)

304 points by mday404 7 hours ago | bouncemarket.minhanhday.com | 94 comments on HN

Comments (93)

  1. Hehe this is awesome!
    Replies (1)
    1. Agreed; throwing all my "free money" on one side, after guessing correctly several times in a row with small stakes had me literally shouting in excitement, just before losing it all :')

      I can see why people throw money at gambling, if its easy enough to do.

      Replies (1)
      1. Y'know, the more I think about it... a lot of the games that hook ya have this element of prediction. Even (especially?) stuff that's deterministic without true RNG. Even really fast-paced twitch games tend to push your reflexes to the point where you have to predict in advance. Sorta triggering that gambler's reflex. Pre-aiming hitscan weaps at corners and pre-firing projectiles where feet will land in many shooters feels like they trigger something similar.
        Replies (2)
        1. Yep, having that "I can see where this is going" moment is what pulls you in, especially when you get it right. And then for gambling, it's when you start to think "I can see where this is going better than other people can", that's when you see real opportunity to win your fortune. For games like Poker, that's rare but entirely possible, but for games like OP's it's borderline impossible - but that doesn't stop the brain thinking it.
        2. That’s an interesting thought.

          Whether pre-aiming has a downside or not seems to depend on map design? Like if there are multiple plausible corners, you have to pick one, so there’s a cost of not picking the other. Other games have simpler maps, if there’s only one plausible corner I guess there isn’t much cost to aiming at it.

          Of course, defining plausible corners relies on map knowledge. Actually I think that’s one of the reasons I quit playing online shooters didn’t want to put in the level of effort required to make those gambles fun. Random death is boring.

  2. Surprising fun and awesome! Love it.

    It was not immediately clear how the game was played but it came to me soon enough. I think one or two "trial/tutorial" rounds would go a long way to give me a proper shot at the leaderboard.

    I wasted my first 2-3 balls as I was looking at the UI trying to understand how to play.

    Replies (1)
    1. Thanks for the feedback! I'll work on some kind of tutorial to start the game
  3. bouncemarket: bought Right x52 at avg 0.19, landed Right, +42.21 in one round https://bouncemarket.minhanhday.com/r/FYv-qiLU
    Replies (1)
    1. This guy bounces
  4. This is kind of genius
  5. cool! up next: bouncemarketbot
    Replies (1)
    1. In hindsight I'm realizing I should have had a bot high scores and real player high scores since both require skill but in different ways
  6. This looks fun, but I imagine someone somewhere in a financial exchange company looking at this and thinking:

    "bouncing ball futures contracts, would be a thing to offer our sophisticated clients."

  7. Completely ignoring the ball and just buying cheap shares is a surprisingly efficient strategy. Often I'm able to get both kinds of share for cheap, so I win regardless of the outcome.
    Replies (4)
    1. its is missing trading fees indeed.
    2. Yeah feels like either the market is quite inefficient or there's a bug because just buying up sub-0.05 shares on both sides makes it too easy

      P.S. still genius idea. Might need some refining

      Replies (1)
      1. Just checked my logs -- the market maker is actually up slightly (around 46 points). Lots of people are profiting, but it's balanced by losses from other players. Around ~400 points move around per round at the moment.
    3. I would guess that the universe of players not being closed is a source of imbalance. There is a constant stream of new players who are granted 10 credits. Maybe they play for a bit and leave when they get disinterested, which is more likely than not going to occur when they have less than 10 credits.

      So if the money supply per capita is constantly increasing, holding a share in anything with a 50% chance of payout has a positive expected return. Diversifying by buying both shares makes your portfolio very resistant to fluctuation. The ideal strategy just rides the inflation on average.

      Replies (2)
      1. What you are describing is there, yes.

        But the GP's experience is due to a lack of good players with time to plan their bets. This is a well known feature of derivatives markets...

      2. If a new player never returns, their money disappears from the money supply with them. Unless you mean that the new player is sinking their 10 credits into shares before leaving?
    4. it was fun to buy low until someone added a bot to do that which makes the price instantly swing in the opposite direction by the time your click guess through
      Replies (2)
      1. I was frustrated by the same until I realized that if it’s that predictable I should be able to take advantage of it. I started getting more success with a buy high strategy, which because of the bot ends up as a buy low strategy by the time your click registers. The bot moves the market so much and so consistently that it ends up just behaving as a phase shift.
      2. I read this as “trading is easy until the quants get involved”. So basically just like a real market.
  8. So fun, and easy to profit, at least for a few minutes. Seems like if you played this professionally 40hrs a week full-time it would get tiring fast. Maybe there is a metaphor in there.
  9. I'd like to see how much the market maker is making/losing.
  10. Is there a way to sell shares before resolution?
    Replies (2)
    1. Buying a share on the opposite side is effectively selling a share.
    2. No, I thought about it but I wanted to keep the UI as simple as possible. Definitely would make the market more interesting in a future update!
  11. make it so that the important stuff is the height of the viewport above fold. i don't see the ball falling at the start
  12. Finally a useful application for predictive markets.
  13. It annoys me we can't put in limit orders, as with a touch screen the latency kills you as the price changes underneath you!

    ( Annoys is too strong a word, it's just a game! )

    Replies (1)
    1. Sounds like you may be interested in my new real-time neural interface, ball2brain.
  14. Do it with a camera and a real ball lol
  15. "AI Traders" - "naive set of rules". Definitive proof that if..else is AI now.

    Jokes aside, cool game. Introducing trading fees would be interesting to make it more realistic in terms of buying both sides.

  16. Love the concept. Great implementation
  17. are there keyboard short cut ?
    Replies (1)
    1. just added! left and right arrows
  18. It’s too hard to buy multiple shares. The price changes super fast so I’d like to have buy 5,10,100 shares buttons too. Or something like that.

    Super fun though. Love the idea and the execution.

  19. This is what I pretend my stock buying strategy is not underneath
  20. If it is an approximal simulation of Galton board[1] then wouldn't wagering on the side the ball starts on have a positive outcome over time?

    [1] https://en.wikipedia.org/wiki/Galton_board

    Replies (2)
    1. Wagering has a pricing element.
  21. Fun little game, but the drop needs to be slower so it is easier to bet. Odds jumping from 0.01 to 0.99 in like one tenth of a second makes it hard to play
    Replies (2)
    1. The drop is pre-simulated over SSE anyway, so adding a bit more delay between frames would fix this. Right now normal ping moves the odds before the click even hits the server.
      Replies (1)
      1. > The drop is pre-simulated over SSE anyway

        Trying to understand this phrase but its meaning escapes me

        Replies (1)
        1. The server calculates the balls’ motions and uses Server Sent Events to stream the results to the browser.
          Replies (1)
          1. Ah so like a replay! Is SSE a specific term of art or does any event generated on a web server sent to a client count regardless of technology? At the risk of sounding sarcastic (I’m not), why did you capitalize S, S, and E?
            Replies (2)
            1. It's a specific web tech: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent...

              But in colloquial usage I'd expect people probably do use that phrase referring to any system for events sent to clients by servers, such as long polling or websockets.

              Continue this thread (1 replies) →

            2. Continue this thread (1 replies) →

    2. this was because of a bot added to the game, it was easier
  22. another gambling website?
  23. Please add keyboard controls
    Replies (1)
    1. added! Reload the page to see
  24. I had a similar idea a few months ago https://hellojomp.com/mob-market/ but instead of a ball bouncing it was about the dynamics of webpage links turned into hawks and pigeons and random predictions regarding them i.e. will X spawn Y times in _ seconds.
  25. Hilarious and fun. Btw if I tap furiously on a button the page zoomed in every time the button ends up disabled.
    Replies (1)
    1. should be fixed now!
  26. Fun idea! The page shouldn’t zoom in when you tap rapidly - makes it impossible to play on iOS
    Replies (1)
    1. fixed!
  27. The latency on the button press is much too slow to actually make a decision about the price. It feels pretty random as to what price you’re gonna get
  28. A prediction market should allow us to sell
  29. Really cool!
  30. This is actually how the formula for options came about!
  31. That’s it I’m opening up a Kalshi account. Going to be rich.
  32. I wish people leaned into making prediction markets about pure random events like this. In theory they should be just as legal as sports betting in the sense of being considered "financial contracts", but no one has actually done the experiment (with real money not fake like here) as far as I'm aware.
    Replies (3)
    1. The CFTC disagrees (IANAL):

      > Gaming contracts are likely to be contrary to the public interest, the CFTC indicates, if they involve games of random chance, as trading in such contracts would not provide useful or meaningful information.

      https://www.congress.gov/crs-product/LSB11441

      Replies (1)
      1. Would be interesting to know/test where the line is. If a person gets to place the initial placement of the ball is that now slightly a game of skill? Maybe the 'chat' votes on it. There's already coin tosses in sports games sometimes (to determine who goes first and stuff like that) so some kind of mixing of pure randomness is allowed.

        There's also already weather contracts that are allowed which are very 'random'/a very chaotic system very hard to fully predict. A coin toss is technically fully determined/not random if one knew all the atoms and their momentum etc.

    2. Am I the only one going "this is just gambling! No!" Here?

      Used to be electro mechanical toy horse racing games for this purpose.

      Replies (1)
      1. > Am I the only one going "this is just gambling! No!" Here?

        That was my first reaction too, but I think that was their point: prediction markets are already being used as a loophole to allow sports betting in jurisdictions where it is supposed to be banned, and (according to them; I haven't checked this) the legal theory that justifies that would also justify 'prediction markets' on random outcomes, i.e. really blatantly just pure gambling. So it could serve as a kind of reductio of the sports betting loophole.

    3. Casinos definitely exist, lmao.
      Replies (1)
      1. The point would kind of be to make fun in almost a performance art way of the "sports are financial contracts" idea. Though as someone else commented I'm incorrect about this specific ruling.
        Replies (1)
        1. You can walk up to any craps or roulette table in a casino and participate in a legal prediction market for the random events happening on the table. That's not a performance art.
          Replies (1)
          1. Casinos aren't regulated by the CFTC, which is the whole point of the bit.
  33. Fun! Can you update it so double tapping the bet buttons doesn’t zoom in on mobile? Should be a one line CSS tweak.
    Replies (1)
    1. should be fixed now!
  34. I would prefer if it were a known 'fair' plinko machine that was being automated physically and you were live streaming that. It would make it a lot more interesting to me. That or a roulette wheel
  35. Nice! Claude was able to recreate the simulation pretty quickly- it might be worth adding a little randomness to the bounces.
    Replies (1)
    1. I'm curious, were you able to actually trade on the simulation's results?

      My assumption was that the data you get as a browser doesn't have sufficient resolution to reverse-engineer the simulation, since the simulation operates on full 64-bit floats and you only get 0.1px granularity in display, so you don't know where the ball "really" is to guess it super early.

      Replies (1)
      1. I made a bot with claude. Yes it does get to 100% accuracy before the ball lands. However most of the time the entire market jumps to 0.99 at this point. However you can usually get in slightly earlier before that point or the market sometimes dips so you can get the shares cheaper.

        Heres some results: calls 146/146 right · 146/181 rounds called · profit +98.80

        Sometimes the bot can't calculate where the ball will land in time so those rounds are skipped.

        Claude is now working on a new version to basically determine the seed for the random number generator used to set the ball's starting position. That way we can buy before anything even happens and get it right. However I'm not sure yet whether this is actually possible. I'll wait and see.

        Replies (1)
        1. Damnit theres a system update in 7 minutes... I'm assuming the dev may have seen my post above... This is my progress so far:

          RNG: collecting round 261/~624 · ~1h 28m left

          Looks like I may not ever be able to pinpoint the ball position before the round begins... Lets hope the dev isn't changing the RNG... he probably is though. I'll post another comment after the update and let you all know.

          Replies (1)
          1. Yep it looks like the dev has updated it so now I can't figure out the exact RNG being used for the ball starting position. I wonder if its because of my post.
  36. Could be expanded with futures, indexes, hedge funds, shares etc. to teach the general public about the financial topics. A user is first prompted to play a few rounds, and then has the ability to invest, to buy some shares etc. I think it could become the go to page to understand the financial markets. Just my thoughts what to make of this in future
  37. This is pure dopamine, fantastic. Now the question is whether it will replace my urge to be wolf of wall street or whether it will enflame it.
  38. There's a lag! The odds seem to be updating quicker than the ball animation for me, which makes it really hard to trade...
    Replies (1)
    1. I actually think the bots may have started trading on buffered frames...

      Streaming directly from server to client leads to jitter due to inconsistent frame delivery times, so the client actually holds a few frames "in the future". Given that the price seems to be almost clairvoyant at times, I think the most likely explanation is that someone is reading the buffered frames before the client is supposed to be displaying them haha

      Replies (1)
      1. It's deterministic physics. Knowing the ball's precise position and velocity at any 1 point in time should allow you to predict the end outcome. They don't give a formula for their physics engine, but it should be easily derivable from observing repeated runs.
        Replies (1)
        1. that's true towards the end, but it's harder than it sounds because you don't actually have the precise position and velocity -- you just have the position rounded to the nearest 0.1px.

          I ran the physics simulation and a 10^-12 px change in starting X position yields a different outcome more than 30% of the time, so knowing the ball's position to the nearest 0.1px only gives you a good guess, not an oracle

  39. cool game for time wasting
    Replies (1)
    1. You might like this game I made. It is intended to be watched more than played, but the boxs can be aimed before each round begins, allowing some degree of control.

      https://redrazors.pages.dev/

      Inspired by this video:

      https://redlib.catsarch.com/r/oddlysatisfying/comments/1ii6n...

  40. This is super cool! The rabbit hole goes a bit deeper than I first thought.

    Because anyone can tell Opus "go win bouncemarket.minhanhday.com" and with just those words get a pretty good bot, this is in practice a "battle of the bots".

    The only unknown is the fractional part of the start position of the ball, which is revealed gradually by the chaotic path of the ball, and a frontier model will quickly realize this and write an exact solver for it. This gives the optimal estimate at time t of the probability of each outcome given the information revealed so far.

    Of the bots running now, some seem to have an exact solver while others have a lower quality probabilistic solver. Some bots seem to only bet when there is enough information to be certain, others are willing to bet early when the market is mispricing the risk.

    The rate limit of 10 bets a second means that, past a certain point, a bigger bankroll doesn't help. It also means that bets are a scarce resource. You want to bet at the moments when the market maximally misprices the risk, but you don't know when those moments will be because that's a function of what other players do.

    To win, you need to do some combination of:

    1) Be the first to buy when a bounce reveals new information

    2) Be the first to buy when another player makes a non-optimal buy

    Both require low latency to the server to win. Only market orders are possible, so if you are not the first you might be severely punished, because if N bots all see an event at the same time, they will pile on (not seeing each other's buys due to the latency in market quotes) and move the market far past fair value, and the Nth bot may buy at a really bad (and unintended) price. Which could then produce a swing in the other direction, so I guess we should expect the market to oscillate. In practice these mispricings seem hard to exploit because they are large but short-lived and so difficult to harvest with market price orders.

    Since you asked for feedback, my advice would be:

    1) Allow orders other than market orders (eg, add a limit price to the API)

    2) Consider running some kind of an auction (once per frame or other time interval) rather than processing orders one at a time

    That would make it not be a winner-take-all game based on your distance from the server. On the other hand maybe in this case an orderly marketplace is uninteresting! In that case, if you do #1 but not #2 then you open up some new betting strategies, like trying to catch mispricings due to overcorrection.

    Replies (1)
    1. Actually the market was changing pretty rapidly and but yet, some of non-solver strategies are still "profitable". That is really quite an interesting dynamic over there. E.g 1-2 hours ago just buying shares for <0.1 was a profitable strategy, now it's losing (probably because of the solvers though). Now there's a trivial manual strategy: buy when the price is 0.99, just to follow the solver. The last one however can be trivially abused, if someone try to manipulate the price with new accounts, especially early in the game with higher uncertainty.
  41. make a reliability diagram for the last N for (end_time-0.2s), (end_time-0.4s)... to see if bots are calibrated

1 comment is not loaded here. Read them on Hacker News ↗.