Dwango Media Village(DMV)

Delving into the Thought Process of Horse Racing Prediction AI "Mamba"

Hello, this is Takahashi from Dwango Media Village. Last year, DMV developed a horse racing prediction AI called “Mamba” and carried out two horse racing prediction AI projects.

The first project, from March to June 2018, was a live broadcast on Nico Nico titled “Artificial Intelligence Donation,” where we actually purchased betting tickets. The project collected donations for animal welfare organizations from users, and Dwango matched the amount for horse racing betting, with the profits also being donated. Over the three-month period, the return rate was 135%, and even including the test period, the return rate exceeded 100% over four months. AI Donation Project Results: Horse Racing Prediction AI “Mamba” achieved a return rate of 135.13% during its operation period, doubling the total donation amount to 1,074,090 yen.

The second project, from October to December 2018, was a web service called “Mamba 2nd Season,” where Mamba evaluated users’ bets and revealed its own bets a few minutes before the deadline. Over the approximately three-month period, the return rate was about 131.7%, achieving another great success. Horse Racing Prediction AI Project 2nd Season Results: Achieving Better Results than the First Season with AI “Mamba” recording an average return rate of 131.7%, and a total profit of about 7.3 million yen.

In this article, I will briefly explain how Mamba predicts horse racing, and then show how Mamba calculated its predictions for the 2018 Arima Kinen, which was also broadcasted live on Nico Nico.

The Challenge of Horse Racing Prediction Programs

Horse racing involves numerous unpredictable factors such as falls, injuries, disadvantages, and the horses’ motivation and physical condition. Additionally, since the race is often decided by mere centimeters after the horses run over 1 km at full speed, there is an inherent limit to improving prediction accuracy, and it cannot be perfect.

(Table 1) The single win hit rate and return rate for the horse predicted by Mamba to have the highest winning probability and the actual most popular horse
Mamba’s Top Predicted HorseMost Popular Horse
Single Win Hit Rate31.9%31.6%
Single Win Return Rate79.3%75.7%

In the test dataset (all races in central horse racing from July 2017 to June 2018), the single win hit rate for horses predicted by Mamba to have the highest winning probability was about 31.9%, and the return rate was 79.3% (Table 1).

During the same period, the hit rate for the most popular horse was about 31.6%, and the return rate was 75.7%. Therefore, by this metric, Mamba is 0.3 points more accurate than the most popular horse. With about 3500 races per year, this means Mamba predicted correctly about 10 more times than the most popular horse. While not an overwhelming difference, Mamba’s return rate was 3.6 points higher than continuously betting on the most popular horse, roughly aligning with the payout rate after deducting the single win ticket’s cut. The odds formed by numerous people using various data for excellent predictions are quite accurate and roughly reflect each ticket’s hit probability.

However, when the goal of horse racing AI is set to “making a profit” rather than “hitting the target,” the approach changes. Instead of randomly selecting the horse with the highest probability of winning, Mamba compares predicted probabilities with odds and purchases tickets with high expected value. By doing this, Mamba aims to achieve a positive long-term profit even with a lower hit rate. For now, the method used by Mamba to estimate the hit probability of each ticket remains undisclosed.

Setting the Expected Value Threshold

(表2)投資シミュレーション結果(芝・単勝)
単勝期待値1.0以上期待値1.1以上期待値1.2以上期待値1.3以上期待値1.4以上期待値1.5以上
全レース数167516751675167516751675
購入レース数156013481081867665504
購入点数43833066209014481021713
的中点数4502791591087540
購入金額44,142,500円25,721,600円14,254,300円8,274,200円5,174,700円3,119,900円
払戻金額41,764,650円25,558,820円14,608,360円10,008,790円6,924,570円3,601,680円
収支-2,377,850円-162,780円+354,060円+1,813,700円+1,749,870円+481,780円
回収率94.61%99.37%102.48%121.92%133.82%115.44%
(Figure 1) Relationship between Purchase Amount, Payout Amount, and Profit for Each Expected Value Threshold (Turf, Single Win)
Relationship between Purchase Amount, Payout Amount, and Profit for Each Expected Value Threshold (Turf, Single Win)

Table 2 and Figure 1 show a part of the investment simulation results for single win bets on all 1675 turf races in the test dataset for Mamba 2nd Season. The threshold was set in increments of 0.1, and all bets evaluated to be above each threshold were purchased.

For example, looking at the column with an expected value of 1.0 or higher in Table 2, there were 1560 races out of 1675 where at least one horse had an expected value of 1.0 or higher, and 4383 horses were eligible. The purchase amount for each bet was set so that the payout amount would be 100,000 yen based on the odds five minutes before the race. With 4386 bets and a total purchase amount of approximately 44.14 million yen, the purchase amount per bet was about 10,000 yen. This indicates that, on average, horses with odds around 10 times were being bet on in this group. Although there were 450 winning bets, the return rate did not reach 100%.

When betting on horses with an expected value of 1.0, the theoretical return rate should be 100%, but it often falls short. There are two possible reasons for this: first, there is an error in probability estimation, and second, the odds may fluctuate further after the purchase decision is made.

In this investment simulation, the purchase decision and purchase amount were determined based on the odds five minutes before the race, and payouts were assumed to be received at the final odds. This mirrors the actual environment of Mamba 2nd Season. Ideally, the total payout amount for 450 winning bets should be 45 million yen, but it was only 41.76 million yen. This implies that the odds decreased by about 7.3% after the purchase, so tickets with an expected value of exactly 1 five minutes before the race had their odds drop, resulting in an expected value below 1.

(Figure 2) Investment Simulation Results (Turf, Single Win)
Investment Simulation Results (Turf, Single Win)

In Mamba 2nd Season, the payout amount was set to 500,000 yen for trifecta bets and 100,000 yen for other bets. Figure 2 shows the histogram of payout amounts for bets other than trifecta that Mamba hit during the project. The average payout was 91,840 yen, and the median was 92,460 yen, indicating that the odds dropped by around 8% as predicted. Moreover, for place and wide bets, the expected value was calculated using the lower odds limit, and the purchase amount was rounded up (e.g., if the odds were 300 times, 400 yen would be purchased), so the odds drop just before the deadline is even more significant.

In simulations, it is necessary to replicate the real environment as closely as possible and to explore purchase rules that can generate sufficient profits even if the odds drop slightly.

Mamba’s Thought Process for Calculating Bets in the 2018 Arima Kinen

For the Arima Kinen held on December 23, 2018, the bet Mamba placed was a single 100 yen trifecta bet on 15-12-13. The reason for this is that all other bets did not meet the established purchase conditions. However, let’s examine the predicted probabilities for single win bets that Mamba did not place any bets on.

(表3)有馬記念の予測確率
馬名予測勝率(順番)オッズ(人気)予測期待値着順
1オジュウチョウサン2.76% (11)8.9 (3)0.24589
2クリンチャー3.54% (9)31.6 (11)1.117615
3モズカッチャン8.96% (3)9 (4)0.80608
4マカヒキ2.30% (12)42.3 (12)0.972710
5パフォーマプロミス5.09% (6)21.2 (7)1.079814
6サトノダイヤモンド4.26% (7)17.8 (6)0.75866
7サウンズオブアース0.00% (16)137.1 (14)0.002816
8ブラストワンピース8.72% (4)9.8 (5)0.85421
9リッジマン0.01% (14)111.6 (13)0.005312
10ミッキースワロー3.33% (10)28.7 (10)0.955111
11ミッキーロケット4.09% (8)22.2 (8)0.90744
12レイデオロ40.61% (1)2.2 (1)0.89342
13スマートレイアー0.00% (15)187.8 (16)0.018313
14キセキ10.91% (2)5.9 (2)0.64395
15シュヴァルグラン5.38% (5)24 (9)1.29183
16サクラアンプルール0.04% (13)141 (15)0.05237

Mamba predicted that the horse with the highest winning probability was number 12, レイデオロ, with a probability of 40.61%. Since the odds were 2.2 times, the expected value was approximately 0.89.

The horse with the second highest predicted winning probability was number 14, キセキ, which was the second favorite in the race. Mamba estimated its winning probability to be 10.91%, indicating that it would win approximately once in every nine races. The odds for キセキ were 5.9 times, leading Mamba to determine that the bet was not worthwhile.

A noteworthy point was the prediction for horse number 1, オジュウチョウサン, which had the third highest odds but was rated 11th by Mamba. オジュウチョウサン’s switch between hurdles and flat races posed a challenge, as there was limited historical data, making it difficult for Mamba to make accurate predictions. Nonetheless, considering past performances of horses transitioning to flat races, Mamba concluded that winning in this group would be challenging.

On the other hand, Mamba rated horse number 15, シュヴァルグラン, fifth despite its ninth-place odds. Given its consistent performance in many significant races, including a third place in the previous year’s Arima Kinen, Mamba found the ninth-place odds to be favorable. シュヴァルグラン had the highest single win expected value among the 16 horses. However, Mamba’s threshold for placing single win bets in the Arima Kinen was an expected value of 1.4 or higher, and シュヴァルグラン’s odds fell short by 2.1 times, resulting in no bet being placed.

Summary

This concludes the overview of Mamba. The method of calculating probabilities and purchasing bets with high expected values is not unique, but Mamba uses machine learning technology to estimate the probabilities of each bet more accurately than traditional methods.

As many of you who followed the AI Donation program are aware, Mamba tends to refrain from betting on major races like G1 races. My assessment is that Mamba currently lacks the predictive accuracy to outmaneuver the meticulous predictions made by many people for such significant races. As the accuracy of predictions by betters continues to improve, all bets will likely have odds that match their probabilities, leading Mamba to refrain from betting more frequently.

Appendix: Mamba 2nd Season Performance by Condition

Stats
Balance graph
Monthly balance
Balance by course
Balance by racetrack
Betting ticket type balance

Publish: 2019/01/16