Okay, let me walk you through how I went about tackling this whole “optimal lineup MLB” thing. It wasn’t some grand plan, more like stumbling around until something started to make sense.
So, I got into daily fantasy baseball a while back. At first, I was just picking guys I knew, players I liked, maybe checking who was hot. Seemed easy enough. Well, turns out, my gut feelings weren’t exactly translating into wins. Especially trying to fit everyone under that salary cap – always felt like I was leaving good players out or spending too much somewhere.

I needed a better way. Just staring at the player list wasn’t cutting it. It’s a real puzzle, right? You got your pitchers, catchers, infielders, outfielders… nine spots to fill, a budget limit, and hundreds of players. Doing it purely by hand felt like guesswork, and I was usually wrong.
Getting Started with Something More Solid
My first real attempt to get organized involved spreadsheets. Yeah, good old spreadsheets. I started pulling down player lists, their salaries for the day, and crucially, some projection data. Finding decent projections was a whole other battle, but let’s assume I found some numbers I trusted.
So, I’d dump all this into a sheet. Then I’d try sorting players by projected points, or points per dollar. It helped a bit. I could filter by position, see who the ‘value’ plays might be. But honestly? It was still a massive headache. Trying to manually piece together a full lineup that fit the rules (1 P, 1 C, 1 1B, 1 2B, 1 3B, 1 SS, 3 OF) and stayed under the salary cap… it took forever. And I was never sure if I’d actually found the best possible combo.
Trying Out Optimization
Then I heard about using solver tools. Some spreadsheets have them built-in, like an add-on. The idea is you tell the computer the rules and what you want to maximize (total projected points), and it figures out the best combination of players for you. Sounded like magic, honestly.
Here’s kinda how I approached it:
- Gathered the Data: This was still step one. Player names, positions, salaries, projected points. Gotta have the raw materials. Consistency was key; making sure the data was clean.
- Set Up the Rules (Constraints): This was the tricky part initially. I had to tell the solver things like:
- Total salary must be less than or equal to the cap (e.g., $50,000).
- Exactly 1 Pitcher.
- Exactly 1 Catcher.
- Exactly 1 First Baseman.
- Exactly 1 Second Baseman.
- Exactly 1 Third Baseman.
- Exactly 1 Shortstop.
- Exactly 3 Outfielders.
- Make sure each player chosen is represented by a 1 (meaning ‘chosen’) and others are 0.
- Define the Goal (Objective): This was simple: Maximize the sum of projected points for the chosen players (the ones marked with a 1).
- Hit the ‘Solve’ Button: This was the moment of truth. After setting everything up, I’d run the solver. It would churn for a bit… sometimes a few seconds, sometimes longer if I had tons of players.
The Results and Reality Check
And boom! Out popped a lineup. A mathematically optimal lineup based on the projections and constraints I fed it. It felt pretty cool the first few times. Like I had cracked some code.
But here’s the thing: it wasn’t a silver bullet. Far from it. Projections are just that – projections. Educated guesses. Baseball is unpredictable. Sometimes the ‘optimal’ lineup would totally stink because the projections were wrong, or a pitcher got shelled unexpectedly, or a key player got scratched last minute.

I also found that sometimes the solver would spit out weird lineups. Maybe stacking too many players from one team, or using players I just didn’t feel good about based on matchups or recent performance. It lacked the ‘human touch’, the intuition you get from actually watching games.
Where I Landed
So, did I ditch the optimizer? Nope. But I stopped treating its output as gospel. It became a tool, a very useful starting point.
My process now looks more like this: I run the optimizer to get a baseline optimal lineup and maybe a few variations. Then, I review it. Does it make sense from a baseball perspective? Are there any players I strongly disagree with? Are there late-breaking news items (injuries, weather, lineup changes) that the optimizer didn’t know about? I make manual swaps based on my own research and gut feeling. It’s a blend – using the tool to handle the heavy lifting of sifting through combinations under the cap, and using my brain to refine it.
It’s been a journey, lots of trial and error. Building that initial spreadsheet, figuring out the solver settings, constantly tweaking data sources. It definitely saves time compared to pure manual picking, and it forces a data-driven approach. But yeah, thinking it guarantees wins? That’s not how it worked out for me. It helps, but you still gotta know baseball.