## Skill calculation

This page outlines the skill calculation algorithm used by Scorched3D online stats. The original skill calculation formula was adapted from psychostats.

This page is correct as with version 43.3.

All players start with 1000 skill. Skill is lost or gained depending on the skill difference between the playing tanks. e.g. If player A has more skill than another player B, A will gain less skill if A kills B, than B if B kills A.

This is system is designed to provide several features:

- Skillful players need to play other skillful players to raise their skill by meaningful amounts.
- Less skillful players are rewarded for killing the more skillful players.
- New players can quickly catch up to the skillful players (depending on the new players skill)
- Skill isn't gained by playing more often.

In reality it has several drawbacks:

- Skillful players can feel penalized for being killed #luckily# by a lower skill player, and may quit the server if they see them
- Skillful players that join as another #new user) can destroy the skill of other players.
- Skill does tend to creep upwards with time due to skill awards for rounds won.

## Skill calculation algorithm

Here is the algorithm described in sudo code for two players, player K and player V. Where K is the killer and V is the victim i.e. K kills V

if K has more skill than V
K skill gain is a small amount based on the difference in skill
V skill loss is a small amount based on the difference in skill
else if V has more skill than V
K skill gain is a large amount based on the difference in skill
V skill loss is a large amount based on the difference in skill
end

Then check players dont lose or gain more skill than the server allows (max skill lost/gained setting).
Add a bonus for the weapon that the player killed with. A lower arms level gives more skill.

## Skill calculation algorithm in more detail

Base skill lost gained algorithm in more detail:

if K has more skill than V
kbonus = ((kskill + vskill)*(kskill + vskill)) / (kskill*kskill)
vbonus = kbonus * vskill / (vskill + kskill)
else
kbonus = ((vskill + kskill)*(vskill + kskill)) / (vskill*vskill) * vskill / kskill
vbonus = kbonus * (vskill + 1000) / (vskill + kskill)
end

Weapon weighting algorithm:

weight = weaponArmsLevel / 10 + 5
kbonus = bonus * weight
vbonus = vbonus * weight