


The Department of Mathematics’ one-credit, student-initiated course teaches students how to play mathematically optimal Texas Hold ’em hands.
The summer before University of Maryland junior computer science major Oliver Andrews entered college, his mom pressed him to get a job. But money was no issue for Andrews—he played online poker full-time. When he showed his mom his earnings, about $25,000 over half a year, she told him to keep doing what he was doing.
For Andrews, poker is more science than art. For years, he self-studied poker theory—a mathematical framework for making optimal decisions at the table. Now, he shares math-based skills for poker success with his UMD peers through his student-initiated course (STIC), MATH299P: “Advanced Poker Theory.”
“Students leave with a fundamental understanding of poker, and they will definitely become better poker players. I promise that at the beginning of the course,” Andrews said. “I've already seen amazing progress.”
Andrews began studying poker theory in high school, shortly after he started playing. He wanted to gain an edge over his competitors. Always drawn to math, Andrews got hooked on poker theory the moment he learned about it.
“I became addicted. I was watching 12 hours a day of YouTube videos, learning theory and reading books,” Andrews said. “That got me obsessed.”
He decided to teach the course at UMD to test his mastery.
“If you can't explain something to someone who doesn't understand it, then you don't have true mastery over it,” Andrews said.
Andrews designed the class from scratch under the tutelage of his faculty advisor, Computer Science Professor William Gasarch. Gasarch pushed Andrews to ensure the course was founded on broadly applicable mathematical principles, rather than becoming a course strictly about playing poker.
Andrews is teaching MATH299P for the first time this semester. The class maxed out at 20 students, but the waitlist peaked at 25 people. Most students are math or computer science majors who come with a diverse range of poker experience. Some came with a rudimentary understanding of poker theory, while others had never played poker before.
The course meets once per week for 50 minutes. Andrews lectures for 35 minutes on topics related to game theory, combinatorics and probability. Then, students put what they learned into practice. For the final 15 minutes of class, Andrews sets up two tables for students to play online poker with play money, and he talks through everything that happened after each hand.
“As a math and economics major, I get to see both sides of what I study in a single hand. The math helps me think about probabilities and expected value. The economics comes in when I think about what my opponent has an incentive to do,” said Jeffrey Karpelson, a senior in the class. “I absolutely would recommend this class, especially to math majors. It’s a great application of a lot of the required math courses—and a great way to spend time on a Friday afternoon.”
Although the course focuses on Texas Hold ’em, “the concepts apply to basically every game that you play,” Andrews said. “Even if you’re just playing Settlers of Catan, which is a board game where you’re just rolling dice, you can calculate the expected value of building settlements here versus there.”
Takeaways from the poker class go beyond playing games, Andrews said. He pointed to quantitative trading competitions—financial challenges modeled after quantitative trading firm interviews and assessments. Quantitative traders use mathematical models, statistical analysis and computer algorithms to make trading decisions. Andrews won a quantitative trading competition in March hosted at Georgetown University, and his team placed second in a competition at Harvard University later that month. He credited the mathematical frameworks from poker theory for his success.
“Poker changed the way I approach life,” Andrews said.
After graduation, Andrews hopes to become a quantitative trader—perhaps at a hedge fund or proprietary trading firm—and received an offer to be a quantitative trading intern at a hedge fund this summer. He thinks his poker skills will be valuable in his future roles. He pointed to a firm called Susquehanna International Group, which hosts a yearly undergraduate poker tournament.
“They put a lot of weight on being good at poker,” Andrews said. “They take that really seriously.”
Beyond mastering the skills for his future career, Andrews has enjoyed his time at the front of the classroom.
“I love teaching,” he said. “My favorite part is when students come up to me on campus, and they’re like, ‘Yo, what's up, professor?’ It's just been really fun.”
Andrews enjoys seeing his impact on the students. Karpelson, for one, attests that he’s improved since taking the class—especially in his decision-making ability. Andrews plans to teach the course in future semesters—hopefully, he said, for a larger group of students.
“I truly love good poker games, so I don't like seeing people make mistakes. I want my students to be able to have some thought process behind everything they do,” Andrews said. “On their midterm exam, I had a free-response question to see how they approached poker hands, and I was really proud of how they solved that problem. Seeing their thought process evolve—that’s the most rewarding part.”


