Mark Anthony Brown

Projects

Things I've built

Most of my projects start with a question I can't stop thinking about, or something in my day that annoys me enough to fix. The code for all of them is on GitHub.

PythonMonte CarloKelly CriterionGitHub Actions

Blackjack Monte Carlo: Strategy & Solvency Simulator

It started with a simple question: if you play perfect basic strategy, or count cards, how long does your money actually last? So I wrote a simulator that plays millions of hands and tracks the bankroll the way an actuary tracks an insurer's surplus. What's the expected return, and what are the odds of going broke before you see it?

  • Compares expected value, standard deviation and Sharpe ratio across 5 strategies, including a random baseline
  • Models bankroll solvency and risk of ruin when you size bets with the Kelly Criterion
  • Measures how much card counting actually helps, and plots random-walk paths to show the variance
  • Every assumption is configurable, and tests run in CI on GitHub Actions

# the core loop, more or less

for path in range(paths):

bank = bankroll

for r in range(rounds):

stake = max(unit, k * f_star * bank)

bank += stake * b if rng() < p else -stake

if bank < unit: ruined += 1; break

# f* = (b·p − q) / b

risk_of_ruin = ruined / paths

PythonFlaskHTMLCSS

Clothero: Virtual Closet Manager

I got tired of staring at my closet every morning, so I turned it into a database. Clothero is a full-stack Flask app that tracks what I own, what's clean, and what goes together.

Catalog

Sort items by type, color, material and category, then search them.

Outfit generator

Builds outfits by color, material, formality or favorites.

Laundry tracking

Knows what's dirty, so it only suggests things you can actually wear.

Item recovery

Deleted something by accident? Bring it back.

FlaskRaspberry PiCloudflare TunnelTailscale

This website

You're looking at it. It's self-hosted on a Raspberry Pi 3, the simulator runs in either your browser or in Python on the Pi, and the contact form lands straight in my inbox.