Inspiration

As the President of the Husky Poker Club, Udayan noticed how players would often tilt while playing poker online on PokerNow. This would lead to them losing a significant amount of money, and it just wasn't good for their mental health. Given the gravity of the situation, we decided to create Tilt.AI, an ML-based Chrome Extension that identifies if you're tilting or not, and in some cases, will even prevent you from gambling. This is all in the aims of creating a more responsible group of gamblers rather than trying to eradicate gambling.

What it does

In short, Tilt.AI uses data scraped from your PokerNow game to predict if you're tilting while playing poker. It records a portion of your screen, and using a decent chunk of computer vision and logic in the background, it grabs your data, processes it, and outputs the probability of you tilting using a Binary Classification model trained on over 1500 data points. We also have a paid version of the extension where we help the user further by shutting down the PokerNow window if we detect extensive tilting. This saves the user a very large amount of money in the long run.

How we built it

Our project is broken down into two parts: ML and Software.

ML (Udayan): My first step was to build a Logistic Regression model for Binary Classification of a player tilting. Using data sourced from online games on PokerNow at the Husky Poker Club, I built the Logistic Regression model on 5 features: "bet size variance", "number of hands consecutively lost", "VPIP (Voluntarily Put money In Pot)", "session duration", and "betting times". Using the Gradient Descent algorithm, I obtained the optimal values for w and b that when used in the Sigmoid Function would output the probability of the player tilting. Then, I used OpenCV and mss to build a screen-recorder that records your PokerNow tab and gathers live data. This data is now fed into the Binary Classification model to get a probability value that is displayed on the user's screen in the Extension.

Software (Ananya & Dixon): Our first step was to ask what Udayan envisioned for our project to be. We discussed on other poker tools like WGO and how we could translate ideas from those tools into our own. This led us into thinking about how we could maybe have some kind of overlay that takes in the scraped data from Udayan's model to turn into a visual representation or reflection of a user's "tilt." This then led us down a long bath of using html, css, and js to try and build a chrome extension that could output data in a digestible format. However, with some slight mentoring, we came across a way to improve our solution for creating a society of responsible gamblers through the use of a user-based system. The idea behind this is that user's would be able to sign up with a username and passcode that would let them potentially opt in for a subscription based service where users would actually be stopped from gambling if they become too "tilted." We thought this idea was plausible because it is similar to medicine; no one likes taking it but we still do. As such, we spent a majority of our time figuring out how to create a database of users and how we can use that user data to modify our extension through having a pop-up that stops you from gambling, to keeping track of "tilting" behavior.

Challenges we ran into

Udayan: I ran into a complicated logic challenge while trying to obtain the user's data live. Since PokerNow doesn't have an API to grab live data (this is extremely dangerous for an online poker website due to security issues), I had to implement it from scratch. It took me 3 whole 300-line Python files to finally arrive at a working screen grabber that grabbed multiple features from every single frame of the user's screen. I had to use significantly different logic each time and it came to a point where I was about to give up considering the difficulty of the second iteration I made.

Ananya: Building a chrome extension for the first time took a lot of videos to watch through and also experiencing new technologies like firebase and then deciding they were too complex and then having to shift our plans often really pushed back our time schedule. We also found that the lack of sleep did not make us more productive in creating our app.

Dixon: Not a lot of experience with linear regression, so I was unable to help Udayan as much as I would have wanted. Also had a lot of issues with trying to connect our google chrome extension to our flask locally hosted server due us not having experience in google chrome extension development. Learning how to connect SQL and python and then connecting all of that to JavaScript took a lot of time and was a headache for us. However, I am proud that we were at least able to get a functioning user database along with a functioning connection to the extension itself.

Accomplishments that we're proud of

-> Making the first successful PokerNow screen grabber since 2020! And ours doesn't require web sockets! -> Achieving a 95% accuracy for the Testing Data using the Binary Classification Model. -> Utilizing SQL to get a somewhat functional user and database system -> Creating a chrome extension that has all the framework needed to run -> Connecting multiple routes into a streamlined system

What we learned

Linear regression is a powerful tool. Dependencies are very important for managing the level of collaboration. Trying to learn web tools in a single day is very difficult.

What's next for Tilt.AI

Some things we thought about when thinking about the future of Tilt.AI was first and foremost collaboration with other gambling tools like WGO. WGO is a poker tool that assists users in playing poker. We can see our extension being able to partner with WGO to not only provide a strategical overview of the game, but also develop an emotional management side to the game, maybe even being able to connect to other online poker sites through WGO. Furthermore, we would want to see Tilt.AI become implemented in general through more and more online casinos as they are not harmful to them and only provide benefit to players at no cost for casinos. Another aspect we thought that this technology might grow is in other industries. What was proven here is that we can take certain actions of users within a risk management setting to output a confidence in their analysis of situations and thus risk management. This could potentially impact markets like the trade market in providing another reflective overview of trader behavior. Another thing we could see being added to Tilt.AI would be an additional long-term analytics system, similar to Apple Health where we can provide users with information on when they best play or even when they should maybe take the time to focus on things outside of gambling. We could even see a future where we implement something similar to Calm and have options for users to destress and calm themselves down. The final thing we can see with this technology in the future would be an obvious optimization of our model, potentially taking in more and more points of data to further output more and more accurate predictions of "tilt" in poker. Overall, we would have loved to connect our model to our extension which definitely lies in the future of developing this tool, but beyond that we can see even more applications to grow and expand responsible gambling.

Share this project:

Updates