/ game-development / The Expected Goals Model Behind My Match Simulation
game-development • • 6 min read

The Expected Goals Model Behind My Match Simulation

How team strength becomes chances and chances become goals in World 11. Building a probability model that produces believable scorelines and the occasional upset.

World 11 main menu with play, daily challenge, and mode options

The hardest part of World 11 was never the draft. It was the match. You spend a few minutes assembling a team you believe in, and then the game has to play fourteen of these matches and hand back scorelines you can accept as fair. If the simulation feels arbitrary, the whole draft is pointless, because there is no honest connection between the team you built and the result you got. The match model is the contract the rest of the game depends on, and I want to walk through how it works.

The short version is that it does not decide a winner. It decides chances, and then it decides whether each chance goes in, and the score is just what falls out of that. That two-step structure is the entire reason the scorelines feel like football instead of a coin flip weighted by rating.

Play World 11 in your browser, or read the post on how the whole game was built for the wider tour.

Why Not Just Compare Ratings

The naive way to simulate a match is to add up both teams, compare the totals, and let the stronger number win with some random wobble. I built that first, and it is terrible. It produces a world where the better team almost always wins by a margin proportional to the rating gap, and the scores cluster in a narrow, lifeless band. Worse, it kills the thing that makes a cup run thrilling, which is that a great team can still go out. If strength maps directly to result, there are no upsets, and a tournament without upsets is not a tournament. It is a ranking with extra steps.

Real football does not work like that, and the reason is goals are rare and noisy. A dominant side creates more chances, but each chance is its own gamble, and a low-scoring game leaves enormous room for the underdog. The whole feel of the sport lives in that gap between deserving to win and actually winning. So I stopped modeling the result and started modeling the thing that produces results, which is chances.

Step One, Strength Becomes Chances

The first half of the model turns the two teams into an expected number of chances each. This is where team strength enters, and it enters gently. A stronger team earns more expected chances than a weaker one, but the relationship is compressed, not linear. Doubling the rating gap does not double the chances. It nudges them. That compression is deliberate, because it is what keeps a slightly weaker side genuinely dangerous instead of doomed.

Both teams always get a real, nonzero share of the chances. The underdog is not reduced to defending for ninety minutes and hoping. They get their looks too, just fewer of them. That single decision, giving the weaker team a meaningful slice of the chances rather than a token one, is most of what makes the simulation feel alive. The favorite is favored. The favorite is not safe.

Step Two, Chances Become Goals

The second half is where the believable scorelines come from. Each chance a team earns is a separate roll against a finishing probability. Most chances do not become goals, exactly as in the real game, so a team that earns a healthy number of chances still usually ends up with a small, realistic number of goals. The expected goals from a team are its chances multiplied through that conversion, and the actual goals are what the rolls deliver on the night.

This is why the scores look like football. You get plenty of one-nil and two-one results, the occasional goalless deadlock, and now and then a blowout when a strong side's chances all land at once. The model never targets a final score. It rolls each chance honestly and lets the total emerge, which is exactly how it produces the spread of scorelines a fan recognizes without me hand-authoring a single one.

It is also where the upset lives. A favorite can earn twice the chances and still lose, because the underdog converted the two looks they got and the favorite spurned six. That is not a bug I tolerate. It is the feature I built the model around. The variance is concentrated in finishing, where football's real drama lives, so close games stay close and a great draft is rewarded on average without ever being guaranteed.

Tuning The Knobs

All of this is driven by data, so the conversion rate, the chance curve, and the weights that turn a roster into a strength number live in balance.json rather than in code. That matters because the model has a personality, and the personality is set by a handful of values. Push finishing up and the game becomes high-scoring and swingy. Pull it down and matches tighten into tense, low-scoring affairs where one goal decides everything. Steepen the strength-to-chances curve and favorites dominate. Flatten it and the tournament turns into a lottery.

I wanted a specific feel, which is favorites who usually deliver, underdogs who are always a threat, and a champion run that a strong team completes roughly a third of the time. Hitting that feel was a tuning exercise against those values, the same data-driven approach I wrote about in tuning balance by editing data instead of code. The model gives me the shape of football. The data decides where on that shape this particular game sits.

What The Model Buys

The payoff of doing it this way is that the match never lies about the draft. A better team really is more likely to win, because it earns more chances, but the win is never owed, because each chance is its own gamble. The player who built a brilliant side feels that brilliance in the long run and still feels their heart in their throat in every single match. That tension is the entire point of a draft roguelike, and the expected goals structure is what delivers it match after match.

It also stays cheap. The whole thing is a couple of expected values and a sequence of probability rolls, which means a full match resolves instantly and the simulation can run thousands of times for testing without breaking a sweat. A small, honest probability model bought me believable scorelines, real upsets, and a simulation I trust. That is a good trade for a few lines of math.

World 11 is the game riding on that model, and every one of its fourteen matches is decided this way. Build a side, watch the chances fall, and see whether your finishing holds up when the final arrives. Play it at games.kevingabeci.com/world-11.

Built by Kevin

Like this? You'll like what I'm building too.

Two ways to support and get more of this work.

Desktop App

HEARTH

A privacy-first Life OS for your desktop. Journal, tasks, and notes that stay on your machine. Coming soon, direct download from this site.

Read more
Digital Products

MY TOOLKITS

Receipts-first toolkits for shipping after hours, building Claude agents, publishing on Amazon, and more. The exact methods I used, not theory.

Browse on Whop

Need This Built?

Kevin builds products solo, from first version to live. If you want something like this made, work with him.