4 ms·
If anyone’s interested, I figured out a way to compute the exact odds for Betfair’s online Exchange Hi Lo card game [1] in polynomial time and space. Overview
by jpcooper 6y ago
If anyone’s interested, I figured out a way to compute the exact odds for Betfair’s online Exchange Hi Lo card game [1] in polynomial time and space.
Overview at [2], algorithm and explanation of the underlying maths at [3].
I’m quite sure that this isn’t a breakthrough. Anyone making money on the game has probably also figured this out. In any case, I didn’t come across any other resources on this online.
I’m trying to figure out how best to automate the betting right now. Computing the exact odds is one thing, but given the odds, I am still not sure how to execute lay bets over all separate outcomes so as to ensure a positive expected return. This is because bets over separate outcomes are matched separately.
[1] https://games.betfair.com/exchange-hi-lo/standard https://games.betfair.com/exchange-hi-lo/standard
[2] https://github.com/jpcooper/betfair-exchange-hi-lo-odds https://github.com/jpcooper/betfair-exchange-hi-lo-odds
[3] https://github.com/jpcooper/betfair-exchange-hi-lo-odds/blob/master/c/prob.c https://github.com/jpcooper/betfair-exchange-hi-lo-odds/blob...
- lbotos 6y agoThanks for sharing! I assume you've been banned for this activity? If so, how do you think others are doing it with computers but you were banned? Also currently I'm in the UK and your link doesn't seem to work but this does: https://games.betfair.com/exchange-hi-lo/turbo/ https://games.betfair.com/exchange-hi-lo/turbo/ Not sure if it's
- jpcooper 6y agoThanks. Around the time when I first figured out the algorithm, Betfair independently approached me about possibly working with them, and then banned me when I mentioned the algorithm. I’m not really sure whether it was the algorithm, or whether they just ban anyone who applies for a job. They wouldn’t give me any information. I published this code while still thinking I was banned, and later found out that I wasn’t in fact banned anymore. I’m currently looking for a job, and figure that I’ll get more money mentioning this as a project than I will make from creating an automated system. I’m still giving it a shot. As I said, I am quite sure that anyone making money has this algorithm as well. In that case, you’re competing on latency. I am not completely sure though, as I cannot see all trades as they happen and compare them with my odds. I can only see a subset. I will never know what the requirements of getting banned are. Maybe the API access for Hi Lo is just a front, and it’s just Betfair laying bets. I don’t see any incentive for them to allow others to lay a game for which exact odds can be computed. Thanks for the tip on the link. There are actually two versions: standard and turbo. I will update.
- jonahx 6y agoWho is matching your bets? Other recreational players that don't understand the true odds? I'm assuming not BF?
- jpcooper 6y agoRight now no one. Betfair only takes a commission on money that changes hands. As fair as I understand, they are not openly laying or backing bets. Backing is the simplest way of making a bet which ensures positive expected return. That is, if you can get the bet matched. I tried my hand at making some back bets by hand using the terminal programme I made illustrated in [2], and no bets were matched. This is because the only people making and matching bets with positive expected return are the ones laying, and they are laying at odds which ensure a negative expected return for the backer. Now the problem is to figure out how to, given the exact odds for each outcome, successfully lay all outcomes. This involves ensuring the correct amount of money is matched for each outcome.
- jonahx 6y ago> I tried my hand at making some back bets by hand using the terminal programme I made illustrated in [2], and no bets were matched. > Now the problem is to figure out how to, given the exact odds for each outcome, successfully lay all outcomes. This involves ensuring the correct amount of money is matched for each outcome. I must be still missing something... If no one is matching bets, why would figuring out how to "successfully lay all outcomes" change that? At some point don't you need a "sucker", no matter how many outcomes you lay?
- jpcooper 6y agoIf I backed the odds which people were laying at, then my bets would match, but I would be losing money in the long run and I would be a sucker. As far as I understand, there are plenty of suckers in the game, but they are mostly backing and not laying. No one is laying at odds which would leave them out of pocket in the long run. I could lay a specific outcome at favorable odds for that outcome alone, but laying makes sense only if you can lay the right amount of money for _all_ outcomes. This is the job of a traditional bookmaker. He sets and updates his odds such that he can match exactly the right amount of money for each outcome such that he makes a profit no matter the outcome. Given that I have the exact odds for the game, I would like to understand how this balancing is done on a Betfair exchange game in an efficient way.
- kevinwang 6y agoah, neat! I love stuff like this. This reminds me of a recent problem in Facebook's annual coding contest (hacker cup), where the insight is similarly to notice that you only need to characterize states by #s instead of by the specific set of players: https://www.facebook.com/codingcompetitions/hacker-cup/2020/round-2/problems/B https://www.facebook.com/codingcompetitions/hacker-cup/2020/...
- jpcooper 6y agoThat looks like a nice question, although it looks like I've lost, as I can't figure out what the input represents. Any tips?
- kevinwang 6y agoexample input: 6 2 1.0 3 1.0 4 1.0 3 0.5 5 0.678 9 0.87 First line means there will be 6 test cases. Each of the following 6 lines contains one test case (each test case represents one ping-pong tournament, and each test case is independent of the others). So the first line means there's a tournament with N=2 players, and P=1.0, which means that in any matchup, the higher-ranked player has a 100% chance of defeating the lower-ranked player. The fourth line means there's a tournament with N=5 players, and P=0.678, which means in any matchup, the higher-ranked player has a 67.8% chance of defeating the lower-ranked player.
- jpcooper 6y agoEverything makes sense now. Thanks.