Horse Racing Gambling Machine

Making a bet can be confusing. Follow these simple steps to figure out how much to bet. Select a bet amount in the left column. Select a bet type in the right column. Select the horses to include in the wager. The total cost of the ticket will appear next to the words Ticket Cost. Martin Cothran of the Family Foundation said the Kentucky Constitution only allows three forms of gambling in the state: pari-mutuel horse racing, charitable gaming, and the Kentucky Lottery, so a.

Pull up a seat and start Playing! With hundreds of historical horse racing machines, you’re sure to find a favorite at Kentucky Downs. We will soon be offering 513 Exacta Systems terminals with a total of 61 unique game titles. With gambling components 2. Many people in the world bet horse races and want to earn money. For example, betting on the Kentucky Derby in 2017 totaled approximately $139.2 million 3. There are many betting systems in horse racing but basically called win bet which is guessing the winner horse in the race. One ad run deceptively suggests that politicians voted to ban 'Idaho horse racing' instead of just making the video gambling machines at the tracks illegal. The ad doesn't show the video gambling.

Gambling

Inspired by the story of BillBenter, a gambler whodeveloped a computer model that made him close to a billion dollars1betting on horse races in the Hong Kong Jockey Club (HKJC), I set out tosee if I could use machine learning to identify inefficiencies in horseracing wagering.

Data

The Hong Kong Jockey Club publishes all of the results for each race ontheir website. Icreated a script to scrape result cards from all of the historicalavailable races. After running the script I was left with a dataset of938 races spanning 14 months.

Result card from a HKJC race.

Feature Engineering

Horse racing betting machines

Going into this project, I had no industry knowledge about horse racing.Since not much information is provided with the race result cards, muchwork must be done in engineering and selecting features in order to givea model more predictive power. Listed below are the features being used.

Horse racing gambling machines for sale

Draw: Which gate the horse starts in. This is randomly assignedbefore the race. Horses starting closer to the inside of the track (draw1) generally perform slightly better.

Horse Race Bet Machine Gta San Andreas Location

Horse Win Percent: Horse’s win percent over the past 5 races.

Jockey Win Percent: Jockey’s win percent over the past 5 races.

Rock-ola horse race gambling machine

Trainer Win Percent: Trainer’s win percent over the past 5 races.

Actual Weight: How much weight the horse is carrying (jockey +equipment).

Declared Weight: Weight of the horse.

Days Since Last Race: How many days it has been since the horse haslast raced. A horse that had been injured in its last race may have notraced recently.

Mean Beyer Speed Figure: Originally introduced in Andrew Beyer’sPicking Winners2, the Beyer Speed Figure is system for rating ahorse’s performance in a race that is comparable across differenttracks, distances, and going (track conditions). This provides a way tocompare horses that have not raced under the same circumstances. Afterreading Beyer’s book, I implemented his rating system on my data. Forthis feature, I calculated the mean speed figure over the horse’s past 5race the race.

Last Figure: Speed figure of the last race the horse was in.

Best Figure at Distance: Best speed figure the horse has gotten atthe distance of the current race.

Best Figure at Going: Best speed figure the horse has gotten at thetrack conditions of the current race.

Best Figure at Track: Best speed figure the horse has gotten at thetrack of the current race.

Engineering more features may yield better results; Benter’s model3included many different types of features from many data sources.

Model

Before creating the model, it is important to understand the goal of themodel. In order to not lose money at the race track, one must have anadvantage over the gambling public. To do this we need a way ofproducing odds that are more accurate than public odds. For example,imagine the payout of horse is 5 to 1, and we have a model thatindicates the horse’s probability of winning is 0.2, or odds of 4 to 1.Assuming our model is faithful, we would have an edge in this case, aswe would be getting an expected return of $(0.2 * (5 + 1)) - 1 = 0.2$ or20%. How do we create such a model?

Let’s first assume the existence of a function $R$ that provides arating $R_h$ of a horse $h$, given input features $x_h in R^m$:

[R_h = R(x_h)]

Assuming a horse with a higher rating has a higher probability ofwinning, we can compute the estimated probability of horse $h$ winning,$hat{p}_h$, given the ratings of all of the horses in the race:

[hat{p}_h = frac{exp(R_h)}{sum_i exp(R_i)}]

Here we use the softmax function, as its outputs will always sum to 1,and maintain the same order as the input.

Now that we know how we’ll compute our probabilities, we must define ourrating function $R$. For this we will use a neural network that takes aninput vector of length $m$ (where $m$ is the number of features), andoutputs a single scalar value. The structure of this network consists oftwo Fully Connected layers, each followed by a ReLU,Batch Normalization and Dropout layer. Lastly, there is a finalfully connected layer to produce the single output.

Now we can visualize our model:

Training

We have defined our model, but how do we train it? For each race, let’scall the winning horse $w$. If we had a perfect model, the predictedprobability of $w$ winning should be 1, that is $hat{p}_w = 1$. We canencourage the model to approach this value by defining a loss functionI’ll call win-log-loss:

[L(hat{p}_w) = -log(hat{p}_w)]

Win-log-loss will approaches 0 as the win-probability of the winnerapproaches 1, and approaches $infty$ as the win-probability of thewinner approaches 0. Now by minimizing win-log-loss via stochasticgradient descent, we can optimize the predictive ability of our model.

It is important to mention that this method is different than a binaryclassification. Since the ratings for each horse in a race arecalculated using a shared rating network and then converted toprobabilities with softmax, we simultaneously reward a high rating fromthe winner while penalizing high ratings from the losers. This techniqueis similar to a Siamese NeuralNetwork, which isoften used for facial recognition.

Betting

Horse

Now that we have predicted win probabilities for each horse in the racewe must come up with a method of placing bets on horses. We can computeour own private odds for each horse using $1/hat{p} - 1$. Now wecould just bet on every horse whose odds exceed our private odds, butthis may lead to betting on horses with a very low chance of winning. Toprevent this, we will only bet on horses whose odds exceed our privateodds, and whose odds are less then a certain threshold, which wewill find the optimal value of over on our validation set.

Results

Rock-ola Horse Race Gambling Machine

We split the scraped race data chronologically into a training,validation, and test set, ensuring there would be no lookahead-bias. Wethen fit the horse-rating model to our training set, checking itsgeneralization to the validation set:

After fitting the model, we find the optimal betting threshold on thevalidation set, in this case odds of 4.9. We can now display oursimulated results of betting 10 dollars on each horse that our modelindicates. To compare, we also show the results of betting 10 dollarsevery race on the horse with the best odds, and one of the beststrategies there is, not betting at all.

Horse Racing Betting Machine Learning

We can see that always betting on the horse with the best odds is asure-fire way to lose all your money. While the model was profitableover both the training and validation sets, it is hard to say for surehow reliable it is because of the very low frequency of its betting.

Benter claimed that his era was a “Golden Age” for computer bettingsystems, where computer technology had only recently become affordableand powerful enough to implement such systems. Today, the betting markethas likely become much more efficient with large numbers of computerhandicappers and more detailed information available to the public.Nevertheless, developing a profitable model, especially with modernmachine learning methods, may be a feasible task.

Thank you for reading! For any questions regarding this post or others,feel free to reach out on twitter:@teddykoker.

  1. Kit Chellel, The Gambler Who Cracked the Horse-Racing Code,2018,https://www.bloomberg.com/news/features/2018-05-03/the-gambler-who-cracked-the-horse-racing-code. ↩

  2. Andrew Beyer, Picking Winners: A Horseplayer’s Guide (HoughtonMifflin Harcourt, 1994). ↩

  3. William Benter, “Computer Based Horse Race Handicapping andWagering Systems: A Report,” in Efficiency of Racetrack BettingMarkets (World Scientific, 2008), 183–98. ↩