Skip to content

Balancer: keep parties together on the same team - #3086

Open
windbyte wants to merge 2 commits into
ZeroK-RTS:masterfrom
windbyte:balance-keep-parties-together
Open

windbyte wants to merge 2 commits into
ZeroK-RTS:masterfrom
windbyte:balance-keep-parties-together

Conversation

@windbyte

Copy link
Copy Markdown

Parties were only kept together if cbal was on and it actually got
used. With cbal off, or when cbal gave up (a clan too big for one
team, or teams more than 70 elo apart), we balanced player by player
and parties got split.

Now normal balance groups players by party first. When cbal gives up,
it falls back to party grouping instead of going straight to normal.
If a party is too big for one team, we still fall back to normal like
before.

Also fix the group keys. They were PartyID ?? ClanID ?? AccountID, and
party IDs are a small counter starting at 1, so a party could get
lumped in with a player or clan that had the same number. The keys
now carry a prefix ("party:5", "clan:5", "account:5") so they can't
collide. They're built in PartyGroupKey/ClanGroupKey helpers in both
balancers.

windbyte and others added 2 commits November 22, 2026 15:01
Previously parties were only respected when clan balance (cbal) succeeded.
With cbal off, or when cbal fell back to normal balance (clan too big or
teams too uneven), party members could be split across teams.

Normal balance now tries party grouping first, and clan balance falls back
to party grouping instead of plain normal balance. Party grouping itself
still falls back to normal if a party is too large to fit on one team.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parties were only kept together if cbal was on and it actually got
used. With cbal off, or when cbal gave up (a clan too big for one
team, or teams more than 70 elo apart), we balanced player by player
and parties got split.

Now normal balance groups players by party first. When cbal gives up,
it falls back to party grouping instead of going straight to normal.
If a party is too big for one team, we still fall back to normal like
before.

Also fix the group keys. They were PartyID ?? ClanID ?? AccountID, and
party IDs are a small counter starting at 1, so a party could get
lumped in with a player or clan that had the same number. The keys
now carry a prefix ("party:5", "clan:5", "account:5") so they can't
collide. They're built in PartyGroupKey/ClanGroupKey helpers in both
balancers.
@GoogleFrog

Copy link
Copy Markdown
Contributor

Don't do two things with one AI PR ("Also fixed...").

There has to be a no-party no-clan fallback if team elos differ by too much. Your description says you have violated this requirement. There is potentially a version of the change that does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants