Sicheng Wang
Course-based2026

Quantitative Modeling

MATLAB Project: Card Game and Project Euler Problems

A MATLAB project using dynamic programming to value an optimal stopping card game.

MATLABdynamic programmingnumerical computingprobability

Context

A MATLAB Live Script project completed with Jiannan Tang and Ariel Yao, covering one medium card-game problem and three Project Euler problems.

Method

The project models the card game with dynamic programming, using the remaining black and red cards as the state and comparing the value of stopping against the expected value of drawing.

Reflection

The card-game problem changed when I stopped thinking about the deck as a sequence and treated it as a state table. With black cards and red cards as the two axes, the stopping rule became something I could compute and check. TODO: add the specific debugging issue from D2.

Status / Result

Completed as a course-based MATLAB project. The dynamic programming model estimates an expected gain of 2.624475548994 for the 26 black / 26 red card case.

Evidence / Links

PDF available