a ball will fall. trade on where it lands.

426 points•mday404•2 days ago•147 comments•
a ball will fall. trade on where it lands.

I made this game! Some technical details:

The entire drop of the ball is simulated server-side, then streamed to each client as server-sent events with a small buffer. Every drop is deterministic from its starting position, so rounds can be replayed exactly for later analysis, but tiny variations in starting position can change the ultimate outcome.

There's some AI traders to keep the market moving, but they drop out in any round that has more than five people. They operate using a naive set of rules that I wrote for them, so they're not too hard to beat -- it's when the market is full of real people that it gets tricky.

Curious to get feedback on anything you would change, and especially whether the mechanics were clear right away or not.

147 comments

charlieyu12 days ago
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
johnnyenn2 days ago
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.
catlifeonmars2 days ago
> The drop is pre-simulated over SSE anyway

Trying to understand this phrase but its meaning escapes me

novia2 days ago
this was because of a bot added to the game, it was easier
eateriinc1 day ago
Infinite money glitch if there was real money involved
vova_hn22 days ago
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.
cvoss2 days ago
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.

cannonpalms2 days ago
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?
marcosdumay2 days ago
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...

novia2 days ago
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
sebastos2 days ago
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.
catlifeonmars2 days ago
I read this as “trading is easy until the quants get involved”. So basically just like a real market.
imeanwhatdoikno2 days ago
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

mday4042 days ago
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.
aniceperson2 days ago
its is missing trading fees indeed.
spolitry2 days ago
Market maker bid/ask spread is the trading fee.

The gains here come from dumb money and high latency tarders.

logicallee1 day ago
Cool! Thanks for sharing. How many points did you get to using that strategy, and how long did it take?
beaker521 day ago
`fast_trades_jev` here. It's really fun watching the arms race unfold in real time:

`yuzu-on-head` is probably running the market manipulation, hedging both sides and has recently started increasing their earnings by doing so mid-game. `foob` is still fighting and recently adopted a hedging strategy in line with `yuzu`s, but isn't in on the mid-game runs yet (and probably can't be, because `yuzu` is the one timing them).

beaker521 day ago
`yuzu-on-head`s manipulation has been closed off/shut down. The entire leaderboard is changing.
beaker52about 23 hours ago
yuzu is back with the manipulation
codergautam1 day ago
Dipping my toes into trying to make a profitable bot. I’m curious, how are you all getting very low latency? Due to Cloudflare the best latency I’m able to get is from a VPS in Seattle but even that is ~21ms round trip.
beaker52about 23 hours ago
I'll let you know when I find out!
beaker521 day ago
`foob` is currently about 2-4x more profitable than the next nearest player.
geoffschmidt2 days ago
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.

SecuredMarvin2 days ago
As you said, Opus did solve for the floating start points competently. I suggested collecting these over 600 games to solve the Mersenne Twister, but the web server restarted. So we tried using the bits from the Twister as an oracle for the start points, but then another deployment forced the start points onto a much coarser grid, and the Twister was also used to scramble the bid answers, so it was no longer solvable. I've never had this much (4h) fun with a click-game. (#20, precogbot)
mday4042 days ago
Thanks for playing, it was cool to watch your strategy through log analysis. Mind if I DM you about it when I'm doing a writeup?
kitsu2 days ago
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.
suzukivenom2 days ago
bouncemarket: bought Right x52 at avg 0.19, landed Right, +42.21 in one round https://bouncemarket.minhanhday.com/r/FYv-qiLU
tantalor2 days ago
This guy bounces

Read the full thread on Hacker News →

Related stories