Skip to content

Cam1G/DartsPredictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DartsPredictor

DartsPredictor is a Java project that scrapes darts games into a CSV file and calculate ELOs using this data. This allows you to pick any two players in the data to calculate a prediction in to who would win their next game.

Table of Contents

Data Collection

Web Scraping

Match data and player names are scraped using JSoup. This is done by going through every event of that year and then scraping every match.

Scraping can be limited to certain years to limit the data size which I have done to allow the players ELOs be more sensitive to if a player is currently in good or bad form.

CSV Generation

Then this data is parsed and only the players names the winner and the prize money for that tournament are written into a CSV.

Once a CSV has been written once it can be read as many times as needed to avoid parsing multiple times which can be slow so faster predictions can be made.

Player History

Each player gets added to a dictionary and ELO is tracked between matches, this keeps track of the ELOs across the data.

Rating System

Inital Rating

All players begin with a configurable rating. I added this feature in case I wanted the top players to be seeded before the calculations. In the end I kept the same value for everyone to maintain consistency.

Expected Outcome

The expected outcome of a game is calculated using the ELO formula based on the difference between the ratings of the two players.

Rating Updates

After each match, the winner gains Elo points and the loser loses the same amount. The number of points exchanged depends on the players’ current ratings. If a lower rated player beats a higher rated player, they gain more points than the higher rated player would have gained by winning.

The amount of ELO gained or lost is decided by a K factor. I have made K larger making growth larger for tournaments with higher prize pools to make players who play in higher stakes have more accurate ELO.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages