# Condition

In the context of the match simulation, a player's condition affects their in-game performance via a fixed function. A fixed amount of the player's rating is weighted by their condition rating.

**Logic:**

- Given an Elo rating and a condition then the player's rating in the game is:

$GameRating = (PositionRating-1200)+(1200 * condition)$

**Example:**

- A player has an Elo rating of 2000 and
- A condition of 100%:

$GameRating(100\%)=(2000-1200)+(1200*100\%)=2000$

- A condition of 80%:

$GameRating(80\%)=(2000-1200)+(1200*80\%)=1760$

- A condition of 50%:

$GameRating(50\%)=(2000-1200)+(1200*50\%)=1400$

During a match, a player's condition decreases, meaning they get tired and their performance worsens. The rate at which a player loses condition is dependent on their fitness, however, the rate at which they recover is independent of fitness.

When decreasing a player's 0-100 condition, using the below formula we convert the number to an Elo value, a domain that is easier to operate over mathematically.

$Elo(x) = -\frac{ln(\frac{1}{x-0.15}-1)+0.0015*1700}{0.0015}$

We decrease the condition, then convert it back to a condition value (0-100) using the below formula

$Condition(x) = \frac{1}{1+e^{- 0.0015(x-1700)}}+0.15$

Players recover whilst they're not playing in a game.

Last modified 4mo ago