A Fantasy Lineup Is Just a Knapsack Problem

This is the second post in my series about rebuilding the daily fantasy lineup optimizer I first wrote in Excel back in 2012 (the origin story is here). Before I get into the clever parts, I want to start with the simplest and most important idea: a fantasy lineup is just a knapsack problem wearing a baseball cap. Once you see that, everything the optimizer does makes sense.

Diagram showing a fantasy lineup as a knapsack problem: salary cap as the bag, players as items with salary and projected points
Continue reading “A Fantasy Lineup Is Just a Knapsack Problem”

From Daily Fantasy to Fiverr to a Free Lineup Optimizer

Back in 2012 I got into daily fantasy baseball, and like a lot of people with an Operations Research degree and a little too much free time, I couldn’t just play. I had to model it. That turned into an Excel spreadsheet that picked my lineups for me, which a few years later turned into a small side business selling those spreadsheets on Fiverr, which then sat untouched in a folder for the better part of a decade. This summer I finally dragged it back out and rebuilt it as a free lineup optimizer that runs in your browser at mlb-lineup-optimizer.kindoflost.com. This is the story of how it got here, and the first post in a short series about the rebuild.

Timeline from 2012 daily fantasy to 2016 Fiverr tools to a 2026 free lineup optimizer
Continue reading “From Daily Fantasy to Fiverr to a Free Lineup Optimizer”

Building a Roth Conversion Optimizer: Lessons Learned

This is the third model I’ve pulled out of a spreadsheet and rebuilt as a web app, after the staff scheduler and the vehicle router. Going in, I assumed the optimization would be the hard part. It wasn’t. The solver finished in under a second every single time. The hard part was trusting what it told me — and the lessons that came out of that are the ones I keep coming back to.

Here’s what building a Roth conversion optimizer actually taught me. Not about Roth conversions — that’s a separate post — but about the craft of turning a twenty-year-old model into something other people can trust.

Roth conversion optimizer web app interface
Continue reading “Building a Roth Conversion Optimizer: Lessons Learned”

The Roth Conversion Math: A Linear Program

This is the “show your work” post in the series. If you came for the FIRE strategy you can happily skip it; if you want the Roth conversion optimization written out as an actual linear program — decision variables, constraints, objective — this is for you. It mirrors the Excel + OpenSolver model I described in part 2.

Continue reading “The Roth Conversion Math: A Linear Program”

Last Mile Route Optimization (Free Tool)

Ask any delivery operation where its money actually goes and the honest answer is almost always the same: the last mile. Trucks leave the depot full and efficient, and then it all unravels at the end — one driver zig-zagging across a neighborhood, doubling back for a stop they rolled past twenty minutes earlier, idling outside an address that doesn’t open until noon. Last mile route optimization is the work of squeezing that final leg down to the least driving, the fewest miles, and the most stops actually served. I spent two decades building optimization models for exactly this kind of problem, and I eventually turned one of them into a free tool. Here’s why the last mile is so stubborn, and how a solver beats a map every single time.

Continue reading “Last Mile Route Optimization (Free Tool)”