After a lot of digging i found this question Improving soccer simulation algorithm and converted it over to C#, and have added in extras such as fitness, morale, various statistics for players which affect the match in various ways. what i am struggling with is working in the idea of formation.
At the minute, a 1-1-1 formation would be the best possible squad as you put your highest rated player in each of those positions and their averages do not reduce due to the other players having lower statistics, i would like to make it so a 5-4-1 has a better defence than a 4-4-2 which would again be better than a 3-4-3 with all defensive players being equal.
How would i go about making the averages of the players marked as defenders are better, when there are more players of equal statistics than the other side?