Project Synopsis

AI-Powered Sports Betting Software

The problem

Currently sports betting is a volatile market where people bet with money with the goal of making more money in return. Sports betting is particularly volatile as there are many different factors that can go into determining outcomes. Our goal is for our software to help generate more informed betting options that are cash positive.

Project Overview

Right now sports betting is volatile and there is lots of data and variables that go into predicting the outcomes of a game. Sports data however is extensively recorded. Our goal is to develop software that is useable via web-page and mobile app that can collect that past data from the NBA (National Basketball Association). That data gets stored onto our local server and then the appropriate data is pulled from our local end and inputted into an AI to help generate more informed bets. We also plan to use sentiment analysis to look and see what experts are saying to help make our bets more accurate.

Design

Architecture

Our software is built primarily as a desktop application using React + vite powering our front end interfaces, while our mobile interfaces use Capacitor to help easily port our react based software to Android and IOS mobile formats. Our backend is powered by Springboot to manage any calls to our server and database, and the database we used to store all our data is MariaDB. Our backend stores lots of data from external sources that is pulled by our frontend interfaces using custom calls. Our frontend interfaces are able to pull, display, and use data stored to generate bets via Gemini using custom prompting. That data is then also stored in our database and able to be recalled by our frontend.

Figure 1: Diagram of abstract software architecture

                                                                                   


Data

Our project uses three main sources of data to generate bets. The data sources are past sports data on players, teams, and past games in the NBA season, a Machine Learning competent, and a sentiment analysis.

Figure 2: A simplified view of the Data Pipeline for bet generation

                                                                       


 

The first and largest source of data is player, game and team stats. Our software pulls this data from ESPN using the ESPN API to populate our database on our local server. This data is the backbone of our informed bet generation, as well as the majority of the information we display to the user.

Figure 3: Example Game Data   
Figure 4: Example Team Data

 

 

 

 

 

 

 

                                                                                                           

 

The second source of data we store comes from a machine learning github repo designed specifically with the NBA in mind. This provides crucial info such as the over-under, as well as data such as the win probability generated from the ML, which can be used to diversify the input-data given to our AI to formulate bets. All of this data is stored onto our local server’s database to be displayed to the user and is used in generating bets.

Example ML data
Figure 5: Example JSON showing ML generated data

                                                                                  

 

Finally the third source is a sentiment analysis where we scrape and filter for pregame articles from Covers.com using Jsoup. We then use Stanford CoreNLP to analyze each article and create a sentiment score between 1-4, (1 being less confident, 4 being more confident) for each team discussed in the article. That sentiment score is saved under the respective team’s next game data.

Figure 6: An example Sentiment Analysis JSON entry that we store

                                                                       

 

Our Project

Home Page

Figure 7: Home Page Screen

 

Users start at home screen and can view upcoming games, as well as  live games that are actively updated. Users can click view matchup to see a more detailed rundown on important information regarding a game as well as an AI generated matchup preview. Finally users can navigate to other pages using the navigation bar at top.

 

Figure 7a. Home Page Screen Live Game Feature

 

Figure 7b. View Matchup Screen

 

Account Pages

Figure 8. Sign-in / Sign-up Pages

 

A user can create an account, and login to their account. Only a user with an account can make use of AI features such as AI generated matchup summaries and bet generation. Users have a restriction on how many daily bets they can make.

Figure 8a. User Profile

 

My Bets Page

Figure 9: My Bets page

 

A user can look at bets they have saved. They can view all the information about the bet and optionally remove it.

Bet History Page

Figure 10: Bet History Page

 

A user can see their betting history. They can see all previous saved bets and whether they won or lost those bets. They can filter which bets they see and see statistics such as win percentage by different categories and overall. Bets winning or losing are recorded at the end of each day.

Search Page

Figure 11: Search Page

 

A user can search for any player or team in the NBA. The search bar has a suggestion feature as the user types to help the user find what they are looking for. Once searched detailed stats regarding the team or player are displayed, as well as the option to generate a bet for them. When a bet is generated, three options are presented from safe, normal, and risky. The user can save any number of them to their profile.

Figure 11a. Generated bet examples


Software Used

Software UsedPurpose
MariaDBDatabase software used to create tables and store all of our data
Springboot       Backend framework to manage calls to our server and database
ESPN API  API used to collect large amount of sports data including all player, team, and game stats
JSOUPLibrary used for scraping articles from the web
Stanford CoreNLPLibrary used for generating sentiment analysis
Gemini AIThe AI model we used to generate customed bets using data and custom prompting
React + ViteThe front end software we used to make our interfaces
CapacitorThe software used to port our front end to Android and IOS
NBA-Machine-Learning-Sports-Betting (NBA ML Git Repo)Machine Learning software we used to generate data such as win percentage chance and over-under