Inside the FM27 match engine: how it actually works

AreaDice it scales
In possession shapeFirst Touch, and a team cohesion die
Passing styleDecisions, Composure
Build upTechnique, Vision
Chance creationAnticipation, Off the Ball
Out of possession shapeConcentration, Marking
Line of engagementWork Rate, Aggression
Pressing intensityAnticipation, Tackling
Pressing trapDecisions, Positioning

Using this part we can iterate back to the tactical understand / tactical effectiveness stuff, right? And put the training sessions in that most impact the dice that matter most for the match engine? And leave out some of the others presumably.
 
Using this part we can iterate back to the tactical understand / tactical effectiveness stuff, right? And put the training sessions in that most impact the dice that matter most for the match engine? And leave out some of the others presumably.
Yes. But I think it is also testable with the regular game engine tests. i.e. we change each area just before the match and see how that makes a different over thousands of simulated matches. I'm actually running a formal experiment to test that and will report when it comes back. It also serves as a validation of our understanding of the game engine code.
 
Hey there! Thanks for all your hard work. Apologies for all the questions, but I wanted to ask how roles work in the match engine. I noticed your studies focus on attributes, so I'm curious what part positional roles play. Do they change the weight of each attribute during a match? Are there synergies between roles, e.g. is an inside forward better with an inverted full-back or an overlapping full-back? Or does each player just do his own thing, with any synergy coming from their decisions happening to work together? What happens to attributes that are relevant to a role but not listed as key for it? And do roles mostly just influence what kind of decisions a player makes, like traits do?
 
Hey there! Thanks for all your hard work. Apologies for all the questions, but I wanted to ask how roles work in the match engine. I noticed your studies focus on attributes, so I'm curious what part positional roles play. Do they change the weight of each attribute during a match? Are there synergies between roles, e.g. is an inside forward better with an inverted full-back or an overlapping full-back? Or does each player just do his own thing, with any synergy coming from their decisions happening to work together? What happens to attributes that are relevant to a role but not listed as key for it? And do roles mostly just influence what kind of decisions a player makes, like traits do?
My AI agent and I have also been digging into the match engine, and we’ve looked into roles too. Here’s what we’ve found so far:

Broadly, the engine uses a role in two ways. First, it combines it with the player’s position, team instructions and individual instructions to build his working behaviour: where to move, how much risk to take, whether to favour dribbling, crossing, shooting, etc. Then, during play, some routines also check specific roles directly - for example, when deciding whether a defender moves inside or how attractive a playmaker is as a passing option. So a role is partly a behaviour preset, with additional rules that depend on the situation and teammates.

On your specific questions:
  • Attribute weights: we haven’t established a general system where choosing a role changes the match weights of its highlighted attributes. Roles can change which attributes become useful by changing the situations and actions a player gets involved in.
  • Unhighlighted attributes: they can still matter whenever the relevant action uses them. The highlighted list shouldn’t be read as an exclusive list of what the engine checks.
  • Synergy: there’s both complementary movement and explicit interaction. Inverting defenders consider teammates’ roles and occupied positions. Certain playmakers get specific treatment when teammates evaluate passes to them. Players aren’t just running independent scripts.
  • Inside forward + full-back: we haven’t established a universally better partner. An overlapping player can provide complementary width, but whether that helps more than an inverting player depends on the rest of the shape. We haven’t found a blanket bonus for that pairing.
  • Like traits? Partly: roles influence action preferences. But they also shape positioning and can affect teammates’ decisions, so their influence goes beyond the player’s own choices.
For me, a big part of this is how roles shape the team’s positioning. Well, some roles, anyway. :) In my testing, the “battle of shapes” - how your structure matches up against the opponent’s - has stood out more than individual team/player instruction tweaks (most of them didn't influence the results in any way; but changing roles did). It also partly explains why 5-2-2-1 is so good right now — because it does a great job to counter 3-2-5 attacking shapes. And in general it is pretty solid defensively.

And honestly, it makes me happy. :) I feel like the game is on the right track. It feels close to the problems real coaches solve by moving players around, rather than just shouting “shorter passing!” :) Terzić’s adjustment against Atlético is a great example: Dortmund switched from a narrow 3–2 build-up to a wider 4–1, making Atlético cover much greater distances to press.
 
This is amazing. Thanks!

Though I still have fundamental questions -
Is the score calculated/decided at the start of the game (assuming I change nothing during the game and, for instance, watch only key highlights) or the score is the result of all those dynamic calculations during the match? If dynamic calculations, how would it be posdible with such complexity and huge number of outcomes every second to ensure a realistic score (e.g. 2:1)? If the score is calculated at the start of the game, what are static parameters that define it and what are then the dynamic calculations for?… just visualization with some limitations to lead to the already calculated score?
 
Last edited:
My AI agent and I have also been digging into the match engine, and we’ve looked into roles too. Here’s what we’ve found so far:

Broadly, the engine uses a role in two ways. First, it combines it with the player’s position, team instructions and individual instructions to build his working behaviour: where to move, how much risk to take, whether to favour dribbling, crossing, shooting, etc. Then, during play, some routines also check specific roles directly - for example, when deciding whether a defender moves inside or how attractive a playmaker is as a passing option. So a role is partly a behaviour preset, with additional rules that depend on the situation and teammates.

On your specific questions:
  • Attribute weights: we haven’t established a general system where choosing a role changes the match weights of its highlighted attributes. Roles can change which attributes become useful by changing the situations and actions a player gets involved in.
  • Unhighlighted attributes: they can still matter whenever the relevant action uses them. The highlighted list shouldn’t be read as an exclusive list of what the engine checks.
  • Synergy: there’s both complementary movement and explicit interaction. Inverting defenders consider teammates’ roles and occupied positions. Certain playmakers get specific treatment when teammates evaluate passes to them. Players aren’t just running independent scripts.
  • Inside forward + full-back: we haven’t established a universally better partner. An overlapping player can provide complementary width, but whether that helps more than an inverting player depends on the rest of the shape. We haven’t found a blanket bonus for that pairing.
  • Like traits? Partly: roles influence action preferences. But they also shape positioning and can affect teammates’ decisions, so their influence goes beyond the player’s own choices.
For me, a big part of this is how roles shape the team’s positioning. Well, some roles, anyway. :) In my testing, the “battle of shapes” - how your structure matches up against the opponent’s - has stood out more than individual team/player instruction tweaks (most of them didn't influence the results in any way; but changing roles did). It also partly explains why 5-2-2-1 is so good right now — because it does a great job to counter 3-2-5 attacking shapes. And in general it is pretty solid defensively.

And honestly, it makes me happy. :) I feel like the game is on the right track. It feels close to the problems real coaches solve by moving players around, rather than just shouting “shorter passing!” :) Terzić’s adjustment against Atlético is a great example: Dortmund switched from a narrow 3–2 build-up to a wider 4–1, making Atlético cover much greater distances to press.
What absolute AI dribble, write it up yourself
 
Using this part we can iterate back to the tactical understand / tactical effectiveness stuff, right? And put the training sessions in that most impact the dice that matter most for the match engine? And leave out some of the others presumably.

It is confirmed. Based on your idea, I expected chance creation and pressing intensity to matter more than the others in terms of tactical understand / tactical effectiveness. This is simple because they affect the attributes that matter most. And it turns out it is true.

I've documented these here: Fm-Match-Lab/docs/studies/24-familiarity-areas.md at main · caiograco289/Fm-Match-Lab

Here are the actual results:

Expected points per game; t in brackets.

AreaGegenpress: lower to 20raise to 80Control Possession: lower to 20raise to 80
Chance creation−0.079 (−6.9)+0.021 (+1.9)−0.082 (−7.2)+0.011 (+1.0)
Pressing intensity−0.081 (−6.9)+0.019 (+1.7)−0.066 (−5.6)+0.005 (+0.4)
Out-of-possession shape−0.024 (−2.0)+0.001 (+0.1)−0.029 (−2.6)+0.017 (+1.5)
Passing style−0.023 (−2.0)−0.002 (−0.1)−0.022 (−1.9)+0.004 (+0.4)
Build-up−0.019 (−1.6)+0.005 (+0.5)−0.012 (−1.1)−0.012 (−1.0)
In-possession shape−0.015 (−1.3)−0.010 (−0.9)−0.008 (−0.7)−0.017 (−1.5)
Pressing trap−0.004 (−0.3)+0.005 (+0.5)+0.006 (+0.6)−0.003 (−0.2)
Line of engagement+0.002 (+0.2)+0.005 (+0.4)+0.009 (+0.8)+0.004 (+0.3)
 
Is there a variable for shot power? I remember in the old forum some people suggested that the Shoots with Power trait worked really well with high Long Shots.
 
Yeah, would be really good to find out which player trait affects striker output. Mainly the attacking ones such as Places shots, Shoots with Power/From Distance, Beating offside trap and Likes to round keeper.
 
This is a really cool piece of analysis on how things work, if the AI tools is able to read things accurately. I wonder if the patch changes much about how it works and the weighting.

I do have lot of speculative questions on it, I don't know if you have the tools to actually check it or not, but would be interesting to know what attributes are being checked in specific passages of play to see if some attributes lend better towards particular tactical choices.

For example, you mentioned that if a player is looking to cross it checks for the targets jumping balance etc... does it check the same thing for low crosses or is it more likely to look at players with good anticipating and pace and movement to send in a low cross through the box.

If someone is attempting a through ball, what checks are being run on the passer, and what checks are being run on the receiver and defender to decide the outcome?

What checks are run when a defender decides whether to stay in shape or press , and what checks influence whether a player successfully intercepts the ball or mistimes the run and get's passed through by the opposition?

For technical checks, does the difficulty of the event affect anything, or is the chance of a pass/tackle/cross happening successfully remain the same in all events? IE. does a short pass to an unmarked free man have the same dice roll and chance of being failed on an passing attribute of 12 as a sharp diagonal through ball between two opposition players to set a winger free into space? Does tackling someone with close control and technique and speed require a harder roll to make that someone who has taken a poor first touch, or is the roll for the tackle just a flat check that decreases in odds of failure with higher attirbute rolls regardless of the potential difficulty of the event?

Is the failure of technical skills to impact the match enging because the weighting isn't right, so the difficulty of making riskier passes and tackles and crosses isn't being as changed as much be attributes as it should be? Or is it a case that the same weighted attributes has the same odds of success regardless of the type of pass and tackle, and therefore once you've hit a certain level to minimise failures occurring too often it's basically redundant regardless of how you want your team to play?

Love to hear your thoughts if you have the ability to look at it in more detail.
 
Really great analysis, amazing work. Though it would be very interesting to see how the score calculation is coded because it matters the most.
 
Hello guys. First of all thanks for the deep dive and the result provided, great work. I was wondering about the height and weight of a player and if that mattered in the match engine ?
 
The match engine relies on effective values and die rolls. This was one of the most surprising things for me.

The engine almost never reads the numbers you see on the player's screen. There are two layers in between, and I'm quite confident on both (we (the agent and I) have the formulas and the agent checked them against real matches).

Layer 1: effective values. At kick-off and again at breaks in play (a few dozen times a match), the engine turns each attribute into an "effective" value: the attribute plus the player's match modifiers (mostly condition and sharpness), rescaled. The physical ones fade as a player gets tired. Over one match, a player's effective Agility, Balance and Acceleration dropped by about 10%. This is one of the ways Stamina pays: it keeps your Pace and Acceleration up late on.

Layer 2: dice. At the same moments, the engine rolls a die for 28 attributes, from 0 to the effective value, and until the next roll a lot of the play reads the die, not the attribute. Most mental attributes reach the pitch mainly this way. Passing, Finishing and the other ball skills don't have a die and are read directly. A better attribute still gives a better die on average, but a player's level swings from one spell to the next.

The weird part: most checks only ask if the die came up zero. This is what I mentioned in the first post. When the engine checks a die, most of the time it just asks "is it zero?" (for Decisions, about 255 of its 300 checks). A positive die lets the player consider something, like an option or a small adjustment to his position, and a zero means he doesn't, for the whole spell. How often you get a zero depends on the scale the attribute is kept on:

AttributeChance of a zero die at 5at 10at 15at 20
Decisions, Positioning, Marking, Composure, Concentration, Anticipation, Vision, Technique, Off the Ball4.0%2.9%2.3%1.9%
Work Rate, Bravery, Aggression13%8%6%4.5%
Teamwork8%5%3%2.4%
The skill and mental attributes are squeezed into the top part of their scale, so even a bad player rarely rolls a zero, and +5 moves that chance by about half a percentage point. So Decisions, Positioning or Marking can be read hundreds of thousands of times in a match and still barely move results. Work Rate, Bravery and Aggression are on a steeper scale, which I think is why Work Rate has a floor in the tests (bad at the bottom, flat from about 9 up).

What the engine looks at the most. Counting the dice, per outfield player per 90 minutes: the Vision die about 310,000 times, Anticipation 240,000, Decisions 210,000, Concentration 150,000. Then the physical attributes behind every "who gets there first" estimate: Agility about 90,000, Balance 70,000, Strength 60,000, Jumping Reach 40,000. Pace and Acceleration are only about 25,000 each, Passing 30,000, and Finishing about 100. So Pace and Acceleration aren't read more than the others, they are read in the places that decide what happens.

For me, the above is bonkers. We have all these attributes that actually do something in the ME but that at the end make no difference in the final result.

This is very interesting and would explain why these attributes come up with poor results in tests, would it be correct that for an attribute of 5 it is actually rolling between 0-50 (minus modifiers)? I don't know whether the move to unity can unlock this, but I'd be interested to see whether a mod could hijack these rolls to make the zero die scale differently and have a much larger differentiation. It would be a lot of work to change each check individually but you could for example make each roll be out of 20/200, with rolls above the players absolute value returning 0, and 0 itself.

It sounds like we have a sophisticated system that could actually show a lot of dynamism but they hamstrung themselves due to these absolute checks. I wonder if it is to give them more control over results to keep them in line with real world goals, assists etc.
 
It sounds like we have a sophisticated system that could actually show a lot of dynamism but they hamstrung themselves due to these absolute checks. I wonder if it is to give them more control over results to keep them in line with real world goals, assists etc.
This is the most interesting part. Obviously it is impossible to constantly ensure a realistic score and statistics with millions of possible individual outcomes in calculations without some additional mechanism for normalizing the results. I wonder if it even looks backwards after performing match calculations and somehow scales/normalizes the results.
 
Amazing... I'm really happy that the sim match tool can be used so extensively. I used to plan these experiments, but I gave up because I'm really busy recently, thanks for your work!
 
Back
Top