Balancing by total rating
Players are sorted from highest rating to lowest, then each player goes to the team with the currently smallest rating total. A random choice breaks only exact ties. This is a greedy balancing rule, not an exhaustive search for every possible split. It assumes the supplied ratings use one comparable scale and that a one-point difference means the same thing for every player.
Six ratings worked step by step
For Alex:8, Blair:7, Casey:6, Drew:5, Emery:4, and Finley:3 with two teams, Alex starts one total at 8 and Blair starts the other at 7. Casey joins the 7 total, making 13; Drew joins 8, making 13; Emery and Finley then separate. One valid final balance is Alex, Drew, Finley = 16 against Blair, Casey, Emery = 17. The one-point gap is the useful result, not a promise of identical teams.
Rating quality controls the result
A stale rating can be worse than no rating because the algorithm treats it as a fact. Decide whether ratings represent current skill, task experience, a handicap, or a coach's estimate. A goalkeeper and a striker with equal numbers may still be non-interchangeable. Add role constraints separately when the activity needs them; this tool only balances the totals it receives.
When a greedy allocation is insufficient
Three teams, uneven roster sizes, paired participants, and required positions can create combinations the simple lowest-total rule cannot optimize. For a casual practice, the visible totals give a transparent starting point. For a league selection with eligibility rules or safeguarding requirements, use an agreed roster policy rather than presenting a generated score split as a final decision.
Test the totals against the game format
A total of 17 versus 16 may be close enough for a casual game, while a one-point difference in a short contest could matter less than a missing defender. Read the player lists as well as the sums. If one team has all the necessary roles, change the constraint or the roster deliberately and record why. Numerical balance is evidence about one score scale, not a complete fairness certificate.
Questions about this assignment rule
What does a balanced total mean?
It is the sum of the ratings supplied to each team, not an independent measure of performance.
Why can totals still differ?
The greedy allocation works one player at a time and may not find a perfectly equal partition.