A daily fantasy sports algorithm does two jobs in sequence. It projects how many fantasy points each player will score, then it searches for the highest-scoring lineup that fits the salary cap and roster rules. The best versions add a third job: simulating the contest itself thousands of times, so the lineup is built for the field you are facing and not just for a spreadsheet average. That third job is what WarriorSim™ does at StatWarrior, and it is included in a flat $29 per month with every other feature.
This guide walks through each stage in plain terms, with the academic research behind it, so you know what to ask of any DFS tool and how to use one well.
TL;DR
- A DFS algorithm projects player points from game logs, matchup and injury data, then picks the best lineup under the salary cap and position rules.
- The lineup step is a well-studied math problem called integer programming, and it finds the best lineup for a given set of projections.
- Cash games and tournaments need different objectives: steady median points for one, ceiling, correlation and uniqueness for the other.
- Simulating a contest thousands of times shows how a lineup performs across many outcomes, not just one average.
- StatWarrior includes projections, the optimizer, WarriorSim™ and every sport for $29 per month, with no extra tiers.
Table of Contents
- What a daily fantasy sports algorithm actually does
- The data behind the projections
- From projections to a legal lineup: the salary-cap puzzle
- Why contest type changes what "best lineup" means
- Simulation: testing a lineup against thousands of outcomes
- How to check a projection model before you trust it
- Adapting the approach to each sport and format
- What an algorithm can and cannot do for you
- Get the full stack for one flat price
- FAQ
- Sources
What a daily fantasy sports algorithm actually does
Strip away the marketing and a DFS algorithm answers one question: given the salaries, positions and scoring rules on a site like DraftKings or FanDuel, which set of players should you roster?
That breaks into two parts:
- Projection. Estimate each player's fantasy points for tonight's or Sunday's game.
- Optimization. Choose the combination of players that maximizes the projected total without breaking the rules.
A 2023 paper on optimal lineup creation for daily fantasy football describes the pipeline as four sequential stages: data collection, neural-network projection, and then lineup generation with mixed-integer linear programming. Different tools swap in different models, but nearly every serious optimizer follows this shape.
The quality of the final lineup depends on both halves. A perfect optimizer fed weak projections returns a perfectly built weak lineup. Great projections fed into a sloppy lineup builder leave points on the table through salary left unused or illegal roster combinations.
The data behind the projections
Projections are a prediction problem. Researchers have approached it with ordinary regression and with modern machine learning, and the inputs are remarkably consistent.
A Stanford project on predicting optimal game-day fantasy football teams used career averages, current-game information such as home or away, and recent player and opponent history. It also found that injuries change opportunity: when wide receivers are absent, other receivers can see more targets, and defensive injuries can improve the opposing offense's outlook.
A Yale paper on a daily fantasy basketball picker is a good picture of the features a basketball model uses:
- Rolling averages over the previous 1, 5 and 10 games
- Opponent indicators
- Home or away status
- Days since the player's previous game
The model produced two outputs, not one: expected fantasy points and a residual standard deviation, which is a measure of how far a player's results typically swing from the projection. That second number matters a great deal later, when we get to tournaments.
A 2024 study in the International Journal of Data Science and Analytics took the idea further. It modeled 203 NBA players using standard and advanced data from the 2011-12 through 2020-21 seasons and evaluated 14 machine-learning models and meta-models. The takeaway for players: no single formula is magic. The gains come from good data, sensible features and careful comparison of models.
What this means when you use a tool: you want projections that update for injuries and lineup news, reflect the matchup, and show a floor and ceiling alongside the average. StatWarrior's DFS projections and ownership page is built around exactly that, with floor and ceiling for each player.

From projections to a legal lineup: the salary-cap puzzle
Once every player has a projected score, building the lineup becomes a constraint problem. You want the highest total, but you have a salary cap, a fixed number of roster slots and position rules.
The same 2023 paper gives a clean example from DraftKings football. The lineup has a $50,000 cap and nine slots: one QB, two RBs, three WRs, one TE, one defense and one flex spot that can be an RB, WR or TE. The algorithm assigns each player a yes-or-no variable (in or out) and maximizes projected points subject to the cap and position counts.
This is a close cousin of the classic knapsack problem: you have a bag with a weight limit (the cap) and items with values (projected points). Mathematicians solve it with integer programming, which does not guess. For a given set of projections, it finds the best legal lineup, which is why a good optimizer beats picking by hand and checking the total on a calculator.
Two practical points follow:
- The optimizer is only as good as its inputs. If you override a projection because you know a player is questionable, the optimizer re-solves instantly around your view.
- Rules differ by site and sport. Cap sizes, flex slots and scoring formulas change between DraftKings and FanDuel, and between football, basketball and hockey. A useful tool encodes each format correctly so you never submit an illegal lineup. StatWarrior's DFS lineup optimizer covers both sites, and there are sport-specific builders such as the NFL lineup optimizer and the MLB DFS optimizer.
If a term in this section is unfamiliar, the DFS glossary defines the common ones.
Why contest type changes what "best lineup" means
The highest-projected lineup is not automatically the right lineup. The objective depends on what you are entering.
Cash games: maximize the middle
In head-to-heads and double-ups, you need to beat roughly half the field. The goal is a high, stable floor, so you lean on players with reliable roles and a narrow range of outcomes. Projected median points is the right target.
Tournaments: build for the top
In large tournaments (GPPs), only the top finishers get paid meaningfully. A lineup that is merely good wins nothing. You need a lineup that can reach a very high score and that differs from what thousands of other entrants submit, since a shared winning lineup splits the prize.
This is where correlation comes in. A quarterback and his top receiver tend to score together: when one has a big game, the other usually does too. Stacking them raises the odds of a very high team total. A Columbia University paper on playing fantasy sports strategically models this with a stacking copula, a statistical tool that captures the strong positive link between a QB and his main WR. Using 2016-17 season data, it estimated the stacking probability at 0.35 for top-heavy contests, 0.25 for quintuple-ups and 0.20 for double-ups, and noted that top-heavy contests reward high-variance teams, which is why stacking is more common there.
The paper frames portfolio construction as maximizing expected reward while modeling both the opponents' choices and the contest's real payoff structure. In plain terms: the best tournament lineup depends on who else you are playing against and how the prizes are split, not only on your own players.
What this means for your workflow
- For cash games, sort by projected median and keep risk low.
- For tournaments, look at ceiling and projected ownership, and build around correlated players.
- If you enter many lineups, diversify them so they do not all rise or fall on the same player.
Simulation: testing a lineup against thousands of outcomes
Projections are averages, but games are not played on averages. A running back projected for 18 points might score 6 or 35. A simulation addresses this by playing the slate out many times, drawing each player's score from a realistic range and keeping track of correlations, then checking how each lineup finishes in the simulated contest.
That is the idea behind WarriorSim™, which models contests thousands of times to identify strong player combinations based on real-game scenarios. Instead of asking only which lineup has the highest average, you ask which lineup finishes high most often given the type of contest and the likely field. The DFS simulator page shows how contest sims and field modeling fit into lineup building. Our approach rests on contest simulations and field modeling to give projections that are more accurate and more actionable than a traditional optimizer alone.
Simulation also explains why optimizers have settings like exposure limits and randomness. Both exist to spread your lineups across plausible outcomes rather than stacking them all on one scenario.
For live and game-level views, WarriorCast simulates NBA, NFL and NHL games, which helps when you want to understand how a single game might unfold before you lock players in.

How to check a projection model before you trust it
Whether you build your own model or choose a tool, the same habit applies: evaluate on slates the model has not seen.
- Hold out data. Train or tune on earlier slates, then judge the results on later ones. The Yale and Springer studies both evaluate on games outside their training data, and you should do the same.
- Compare projections with results. Look at the gap between projected and actual points over many games, not just a few memorable hits.
- Look at the spread, not only the average. A model that gives a residual standard deviation, as the Yale one did, tells you how much a projection can miss by.
- Watch for tuning to one slate. If a setting only works on a single date, it has fit the past rather than learned something general.
StatWarrior publishes daily pages that put projections side by side with results, such as the NBA DFS picks for Nov 10, 2026 and the NFL DFS picks for Nov 8, 2026. The DFS statistics page collects projection accuracy by sport, so you can read how projections have tracked outcomes in the sport you play.
Adapting the approach to each sport and format
The two-stage pipeline stays the same across sports. What changes are the inputs and the constraints.
| Sport | Key projection inputs | Typical lineup consideration |
|---|---|---|
| NFL | Targets, snaps, matchup, injuries to teammates | QB-WR stacks, defense choice, flex slot |
| NBA | Minutes, usage, pace, rest days, injuries | Late news, salary efficiency by position |
| MLB | Confirmed batting orders, pitcher matchups | Same-team batting stacks |
| NHL | Line combinations, power-play time | Line stacks, goalie choice |
| PGA | Course fit, recent form | Six golfers, cut-making risk |
The general principle comes straight from the research: build projections from the factors that drive opportunity in that sport, then enforce that site's roster rules exactly. Football leans on matchup and injury-driven opportunity, as the Stanford work found. Basketball leans on recent form and rest, as the Yale features show.
StatWarrior covers NFL, NBA, NHL, MLB, PGA, MMA, NASCAR, WNBA, soccer, F1 and League of Legends under one subscription, with dedicated builders such as the NASCAR DFS optimizer, the soccer DFS optimizer and the LoL DFS optimizer. If you also use projections for props, the player prop analytics and sports betting analytics pages apply the same data-first approach to odds.
What an algorithm can and cannot do for you
An algorithm gives you a disciplined, repeatable process and removes arithmetic mistakes. In the 2024 NBA study, the optimizer's lineups in a real contest placed in the top 18.4% among 11,764 users, and profitable lineups reached the top 23.5%. That shows what a well-built model can do against a large field of human players.
It does not remove the variance built into sports. Even the best lineup depends on real games, and outcomes will swing from slate to slate. Treat DFS as entertainment with a data edge, set a budget you can afford to lose, and keep entries consistent with it. StatWarrior's responsible play page lays out how to keep your play healthy. If gambling stops being fun or starts to cause problems, the National Problem Gambling Helpline at 1-800-GAMBLER is available in the US.
Get the full stack for one flat price
Most DFS tools split projections, optimizers and simulations across tiers. At StatWarrior, every subscriber gets everything: projections, the lineup optimizer, WarriorSim™, WarriorCast™, props analysis and every sport, for $29 per month. There is no feature gating and there are no add-on plans, so the whole workflow described above sits in one place.

If you want to see the process end to end, start with the DFS simulator and the lineup optimizer, or sign up at statwarrior.com.
FAQ
What is a daily fantasy sports algorithm?
It is a set of models and math that projects each player's fantasy points and then selects the best lineup under the salary cap and position rules. Many also simulate contests to see how lineups finish across many possible outcomes.
What data do DFS projections use?
Common inputs are career averages, recent game logs, home or away status, opponent history, rest days and injuries to teammates and opponents. Research from Stanford and Yale uses these kinds of factors.
Do I need different lineups for cash games and tournaments?
Yes. Cash games reward a high, stable floor, so median projection is the goal. Tournaments reward ceiling and differentiation, so correlated stacks and lower-owned players matter more.
Can an algorithm guarantee a profit?
No tool can promise profit, because sports results vary. A published NBA study showed an optimizer finishing in the top 18.4% of a real contest field, which shows the value of a data-driven process. Play with a budget you are comfortable with.
What does StatWarrior include for $29 per month?
Every feature for every sport: projections, the lineup optimizer, WarriorSim™ contest simulations, WarriorCast™ game simulations, daily picks, and betting and props analytics. There are no extra tiers.
Sources
- Method and Validation for Optimal Lineup Creation for Daily Fantasy Football (arXiv)
- Predicting Optimal Game Day Fantasy Football Teams (Stanford)
- Daily Fantasy Basketball Picker (Yale)
- An innovative method for accurate NBA player performance forecasting and line-up optimization (Springer)
- How to Play Fantasy Sports Strategically (and Win) (Columbia University)
