Before he encountered stochastic processes in a classroom, Jeffrey Gu was investigating probability through video games. He would calculate the chances behind loot drops and rare item rewards. Years later, as a Waterloo Statistics student, he enrolled in STAT 333, “Stochastic Processes,” with Professor Steve Drekic, turning those early intuitions into a more sophisticated understanding. The concepts he mastered in that class culminated in the creation of a new gaming project: Blackjack Oracle, a free online tool that helps players make optimal decisions at the blackjack table.


We caught up with Jeffrey recently to talk about his new tool.

Q: What first sparked your interest in mathematics and probability?

Jeffrey: I was better than average at math from a young age, but the real spark was video games. A lot of games have probability-based item or loot drops, and that was my first real brush with probability. I remember working out the combinatorics behind drop rates myself, before I'd ever studied any of it formally.

How did STAT 333 influence your thinking?

Jeffrey: It was a requirement, but I quickly grew to like it. The course formalized a lot of the ideas I'd already been exploring on my own. It's discrete-time Markov chains and absorbing states that ended up directly powering this project. If I had to pick a favourite topic from the course, though, it would be Poisson processes and continuous-time Markov chains.

How did Blackjack become the focus of your project?

Jeffrey: I learned the game during a trip to Vegas, lost $100 in five minutes without winning a single hand, and walked away wanting to solve it with mathematics instead. While building the exhaustive search algorithm behind the project, I realized that what I was really constructing was a discrete-time Markov chain with absorbing states.

What is Blackjack Oracle?

Jeffrey: Blackjack Oracle is a free calculator that tells you the mathematically optimal move in any blackjack situation. After entering the visible cards and table rules, users can see the best play along with the exact expected value of each available option. The site also includes a simulator for practicing hands and a daily challenge for testing strategy.

What makes it different from other blackjack tools?

Jeffrey: Traditional strategy charts provide a single memorized answer based on a fixed set of rules and a full shoe. Blackjack Oracle computes the answer fresh each time, using the exact rules at the table and the cards already dealt. Rather than relying on simulations, it performs a full search of all possible outcomes, producing exact results and showing the expected value of every decision.

What was the biggest challenge in building it?

Jeffrey: The state space is enormous, with millions of possible game situations depending on the ruleset. Because the model performs an exact search, every one of those states has to be computed correctly and efficiently. Small coding issues could quietly break the math or severely hurt performance, so extensive testing and multiple rounds of optimization were essential.

What feedback has meant the most to you?

Jeffrey: Most users interact with the tool without thinking about the mathematics behind it. The feedback that meant the most came from Professor Drekic. He's one of the few people who can evaluate both the mathematics and the engineering, and hearing that he thought it was a genuinely nice application of the course material was especially meaningful.

What's next for Blackjack Oracle?

Jeffrey: At this point, the project is largely complete and in maintenance mode. But if users have ideas for features that would genuinely improve the experience, I'm happy to keep building.