[Mutator] Even Match (Onslaught team balancer)

Anything about UT2004 mapping, Uscripting & more
User avatar
Cat1981England
Posts: 2326
Joined: Mon 23. Aug 2010, 15:35

Re: [Mutator] Even Match (Onslaught team balancer)

Post by Cat1981England » Sat 22. Aug 2015, 21:17

Wormbo wrote:[edit3]
I'm looking into potential replacement algorithms for the team shuffling, in case it still stays crashy with larger player counts. To test replacement candidates, I need some test data for the PPH values, though. Can a server admin please send me the list? Starting with alpha 8 it's stored in EvenMatchPPH.ini, earlier versions stored it in UT2004.ini. In either case you are looking for the "EvenMatchRules" section.
I'm afraid we got into the habit of cleaning all the PPH data everyday so we don't have any a7 or a5 data. I could run a7 tomorrow if you like?
The Universal Declaration of Human Rights, Article 1:

All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.

User avatar
Wormbo
Posts: 384
Joined: Sun 28. Aug 2011, 11:52
Description: Coding Dude

Re: [Mutator] Even Match (Onslaught team balancer)

Post by Wormbo » Sun 23. Aug 2015, 06:37

The source version doesn't really matter as the algorithm for gathering that data hasn't changed in a while. I really only need some realistic figures to compare algorithms, so alpha 8 data would be as good.

User avatar
Wormbo
Posts: 384
Joined: Sun 28. Aug 2011, 11:52
Description: Coding Dude

Re: [Mutator] Even Match (Onslaught team balancer)

Post by Wormbo » Sun 23. Aug 2015, 20:37

Good news:
I tested a vastly simpler algorithm for shuffling teams based on artificial player lists of random size generated using the about 100 PPH values Cat sent me. The algorithm is essentially a descending sort by PPH, followed by taking two players at a time and assigning them to the two teams. For each pair of players there are obviously two ways to assign them (first goes to red and second to blue, or vice versa), so the algorithm picks the one that results in a smaller PPH difference. With an odd player count, the player with the lowest PPH is first assigned to the red team, then the other players are assigned in descending order of PPH as described above.

As simple as it sounds, this is remarkably close to a perfect solution while the most complext part of it is the O(n * log n) sorting. That should pretty much rule out any kind of runaway loop crash on shuffling, even with maximum player count and a large number of stored PPH values. (Now I only need to implement it in the mutator, as the tests were done in C#.)

Independently, I modified the way PPH values are stored and updated. Essentially it's no longer just the last round or match that matters, but also previous matches further back. The current match counts 50% (1/2), the previous 25% (1/4), the one before 12.5% (1/8), etc. This should hopefully make the PPH more meaningful.

User avatar
Wormbo
Posts: 384
Joined: Sun 28. Aug 2011, 11:52
Description: Coding Dude

Re: [Mutator] Even Match (Onslaught team balancer)

Post by Wormbo » Sat 29. Aug 2015, 09:10

Since it will be the next thing I'll look into, can anyone here confirm this voicechat problem?

User avatar
Pegasus
Posts: 1128
Joined: Wed 4. Nov 2009, 23:37
Description: ONSWordFactory
Location: Greece

Re: [Mutator] Even Match (Onslaught team balancer)

Post by Pegasus » Sat 29. Aug 2015, 14:37

Assuming responses here would be based on people's experience with this server, getting helpful feedback on this issue might be harder than usual, on account of CEONSS not having voice chat enabled to begin with :/.
Image

User avatar
Wormbo
Posts: 384
Joined: Sun 28. Aug 2011, 11:52
Description: Coding Dude

Re: [Mutator] Even Match (Onslaught team balancer)

Post by Wormbo » Sat 29. Aug 2015, 21:12

No problem. In that case Omni responses will have to do, as they are the ones affected by it.

User avatar
Wormbo
Posts: 384
Joined: Sun 28. Aug 2011, 11:52
Description: Coding Dude

Re: [Mutator] Even Match (Onslaught team balancer)

Post by Wormbo » Sun 30. Aug 2015, 14:12

Alpha 9 is out with upgrades to the PPH storing and retrieving (please just let the data accummulate now, outdated entries are deleted after two days) and team shuffling (should no longer be a source of runaway loop crashes) and several minor fixes.
See the first post for a complete change list and download link.

User avatar
Cat1981England
Posts: 2326
Joined: Mon 23. Aug 2010, 15:35

Re: [Mutator] Even Match (Onslaught team balancer)

Post by Cat1981England » Sun 30. Aug 2015, 19:24

Thank you.

I'll put it on tonight or tomorrow morning.

-----edit------

Now on with the following settings,

[EvenMatchV2a9.mutTeamBalance]
ActivationDelay=10
MinDesiredFirstRoundDuration=5
bShuffleTeamsAtMatchStart=True
bRandomlyStartWithSidesSwapped=False
bAssignConnectingPlayerTeam=True
bIgnoreConnectingPlayerTeamPreference=True
bAnnounceTeamChange=True
bIgnoreBotsForTeamSize=True
bBalanceTeamsBetweenRounds=True
bBalanceTeamsWhilePlaying=True
bBalanceTeamsDuringOvertime=False
bDisplayRoundProgressIndicator=True
SmallTeamProgressThreshold=0.300000
SoftRebalanceDelay=30
ForcedRebalanceDelay=120
SwitchToWinnerProgressLimit=0.700000
ValuablePlayerRankingPct=75
MinPlayerCount=2
TeamsCallString=
bDebug=True
The Universal Declaration of Human Rights, Article 1:

All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.

User avatar
Wormbo
Posts: 384
Joined: Sun 28. Aug 2011, 11:52
Description: Coding Dude

Re: [Mutator] Even Match (Onslaught team balancer)

Post by Wormbo » Thu 3. Sep 2015, 19:14

Hmm, I goess no feedback also is a kind of feedback. It just worries me a bit that it's so quite here, while all hell broke loose over at the Omni forum.

User avatar
Pegasus
Posts: 1128
Joined: Wed 4. Nov 2009, 23:37
Description: ONSWordFactory
Location: Greece

[Mutator] Even Match (Onslaught team balancer)

Post by Pegasus » Thu 3. Sep 2015, 20:00

Well, if it would allay your concerns, I suppose we could persuade some CEONSS staffer to engage in some knee-jerk public reaction essentially shitting all over undermining the project not even 3 weeks after it's gone back on active development and already produced several substantially advanced alphas, which numerous msg. board members and server staffers already recognized as potentially very helpful to balancing and chose to personally get involved with through feedback and testing in their own communities ...but it may just be that people here have a slightly different understanding of class, perspective and appreciation towards the efforts of developers still contributing to UT/ONS than elsewhere, and have chosen to wait a bit more to see EvenMatch through to its beta stage before seeking a final verdict on its worth.


Or I could be wrong and EvenMatch already ought to be meeting all different communities' needs equally flawlessly because bugs and windshields ponies. There's always that possibility too.
Image