[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 » Fri 18. Sep 2015, 20:52

We had the following crash today, nothing else in the log file.

Code: Select all

Critical: mutTeamBalance ONS-AirMars-SP6.mutTeamBalance (Function Engine.Mutator.AlwaysKeep:0000) Infinite script recursion (250 calls) detected
Exit: Executing UObject::StaticShutdownAfterError
Exit: Exiting.
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 » Fri 18. Sep 2015, 21:30

Hmm, interesting. Though Even Match is not necessarily the cause of that crash. Is it repeatable with that map? (Is there a download for it somewhere? I only have SP4.)

AlwaysKeep is one of the mutator functions that recursively call the next mutator's corresponding function. AlwaysKeep, CheckRelevance and CheckReplacement are all part of the spawning checks mutators can perform. If here's some kind of infinite recursion happening in the mutator chain, it's more or less random which of these three functions is reported and which of the running mutators it shows. Even Match doesn't actually override any of those three functions, so it likely doesn't affecte the crash any more or less than most other running mutators.

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

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

Post by Cat1981England » Fri 18. Sep 2015, 21:48

Wormbo wrote:Is it repeatable with that map?
That's the first crash we've had since Alpha 8

ONS-AirMars-SP6. You've probably got them all, but if you're missing any files you can find them in the map pack.

We have had problems with Airmars before, we had to use EnhancedLevelGameRules from UltimateMappingTools to disable MutWheeledVehicleStunts if that's any help.
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 » Fri 18. Sep 2015, 22:00

I'd count that as "repeatable" and enough evidence to blame the map. I'll have a look at it to check if there's anything that could be done about it in a map edit.

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

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

Post by Cat1981England » Fri 18. Sep 2015, 23:56

Thank you. I found the old error,

Code: Select all

Critical: MutWheeledVehicleStunts ONS-AirMars-SP5a.MutWheeledVehicleStunts (Function Engine.Mutator.AlwaysKeep:0000) Infinite script recursion (250 calls) detected
Exit: Executing UObject::StaticShutdownAfterError
Exit: Exiting.
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.

Zon3r
Posts: 575
Joined: Thu 7. Apr 2011, 07:46
Description: Don't shoot at me!

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

Post by Zon3r » Sat 19. Sep 2015, 05:39

The new balancer is behaving better, but it should be a little more smarter ( :) ), for example when the number of players is even, i can't switch to the losing team
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 19. Sep 2015, 05:49

You are disallowed because that would give the losing team a 2 player advantage. That would only be allowed when the team is about to get defeated.

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 » Sun 4. Oct 2015, 00:08

Observing the latest EvenMatch version's reports n' general feedback received on both threads over the recent period (but mostly on the Omni msg. board, if I'm honest), I couldn't help but notice that repeated complaints started clustering around the two issues of general balancing performance during matches, on the larger scale, and acceptability of individual swap choices during rounds, on a narrower perspective. Given how the degree of these alleged failings varies from person to person, as well as how differences in standards and inherent biases can creep in and distort one's perception of what they consider balanced or reasonable decision-making in the first place, the thought occurred that perhaps the macroscopic evaluation of whether EvenMatch has truly been contributing to more balanced gaming sessions or not could be assisted through the introduction of more objectively gathered observations to the discussion, namely through the more systematic collection of data (my favourite type of fact :)).

Put more practically, what I'm proposing for consideration here is the addition of a "verbose mode" beyond the scope of the current debug output, which server admins could opt to enable in order to have the mutator create and maintain a steady, but not resource-heavy, output of balance-relevant measurements at regular intervals, but also during any other event specifically pertaining to EvenMatch's actions (pre-match team shuffling, routine mid-game soft swaps, manual rebalancing calls, etc.), either in the main server log or (ideally) in a different, dedicated one for easier perusing.
Helpful information that could be gleaned after each match could include a "heartbeat", where the state of balance during a round would be written to the log every, say, 30secs as measured through the already existing Progress metric, and optionally also the number of nodes each team was holding, as well as their cumulative PPHs (or just the difference?) at the time of polling. This would allow for easy rebuilding n' visually depicting the course of rounds n' matches later on, and after reviewing a large enough sample size to gain the necessary experience and understanding of what balanced matches truly look like in terms of graph slopes, the conversation around determining whether any specific match that EvenMatch curated was balanced or not can hopefully be carried out in a much more levelheaded n' pragmatic manner after the fact, rather than be formed mostly on the basis of bruised egos and emotion-affected impressions - which all human beings are susceptible to, myself included.
Additionally, as already touched on in my last post on page 1 here, the crucial bits of info that influenced the reasoning behind each swap and team changing event could also be included for later cross-referencing (reason for swap event [pre-match, routine, manual call, etc.], teams size difference, state of chosen player [walking, idle, dead, etc.], score percentile placement of chosen player), so that should anyone report some seemingly unexpected or counter-intuitive behaviour later on, pulling the relevant data and reviewing exactly what EvenMatch saw as it decided who wasn't a key player that should be moved (versus what the player later claims) can constitute the basis of a more reliable debugging & assessment process.
Much like with general logging standards, such entries for each map/session could be bookended with a match start time stamp, as well as map name & active mutators info for easier bookkeeping n' retrieval.

Assuming my estimates of an average of 16 player swap events per match and ~35mins for matches' length are realistic enough, the above suggestions shouldn't produce more than 90 log entries per match on average (max could be ~80% higher), a value that seems within the reasonably low side of the realtime server resources consuming spectrum. A simple script to append such a daily EvenMatch log output to a cumulative one, while clearing it afterwards could additionally be run once a day to ensure fluid performance for the server HDD, too, as part of routine admin maintenance.

All in all, the goal of a "verbose mode" idea is for it to assist in EvenMatch getting a fair[er] shake by clearing up as much as possible the fog of subjectivity typically associated with the discussion of balancing in ONS matches. As community members continue to report and help assess the mutator's true hits n' misses, shaping its comprehensive benefits n' drawbacks profile, this might just constitute a key part in Wormbo getting the right info to cut through the noise n' correctly identify and stay on the right path for the remainder of its development so that everyone can benefit the most out of EvenMatch's ultimate performance.


PS: Had forgotten about it, but two instances on the same page is pretty much screaming for attention, so quick tip to Cat here: preventing pre elements (which phpBB uses to wrap around blocks of code or other kinds of raw text dumps) from horizontally screwing up pagination can easily be done by adding a white-space: pre-wrap; rule to the .codecontent class assigned by default to pre elements in stylesheet.css, starting from line 688.
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 » Sun 4. Oct 2015, 09:13

Good idea there, Peg.
I wonder what the best way could be to dump this kind of information to text or html files. Maybe some kind of CSV-style output? Anything stats-related is probably best viewed in Excel or Open/LibreCalc.
The first thing that came to my mind was that there will have to be multiple files per match. The initial shuffling is based on different parameters than the rebalancing during the match. I could write one file for shuffling (or two, if short round reset happens) and another that lists rebalancing checks, whether any action was taken and if so, which players were switched and why.

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

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

Post by Cat1981England » Sun 4. Oct 2015, 10:37

We're running off a ramdisk atm, so i can't see additional log files being an issue :thumbup: .

The only legitimate complaint i've seen is that the some players are being swapped multiple times a game.
Pegasus wrote:PS: Had forgotten about it, but two instances on the same page is pretty much screaming for attention, so quick tip to Cat here: preventing pre elements (which phpBB uses to wrap around blocks of code or other kinds of raw text dumps) from horizontally screwing up pagination can easily be done by adding a white-space: pre-wrap; rule to the .codecontent class assigned by default to pre elements in stylesheet.css, starting from line 688.
How's that?

-------------

If anyone is interested, here's a sample of how the output looks in the server.log,

Code: Select all

EvenMatch: Overriding player team preference team=255 with team=0
EvenMatch: Overriding player team preference team=255 with team=1
EvenMatch: Overriding player team preference team=1 with team=0
EvenMatch: Overriding player team preference team=0 with team=1
EvenMatch: Overriding player team preference team=255 with team=0
EvenMatch: Overriding player team preference team=255 with team=1
EvenMatch: Overriding player team preference team=1 with team=0
[...]
EvenMatch: Shuffling teams based on previous known PPH...
EvenMatchDebug: XYLOPHONE 158.52 PPH, currently on Red
EvenMatchDebug: AC[WALES] 137.58 PPH, currently on Blue
EvenMatchDebug: Harold -1.00 PPH, currently on Red
EvenMatchDebug: Puerto_Rico 36.00 PPH, currently on Red
EvenMatchDebug: MarcusAurelius 180.86 PPH, currently on Red
EvenMatchDebug: rush_douchebag -1.00 PPH, currently on Blue
EvenMatchDebug: [SkyFORS]FORSIETS 392.27 PPH, currently on Red
EvenMatchDebug: MeatChopper 236.74 PPH, currently on Blue
EvenMatchDebug: beefcakes 225.26 PPH, currently on Red
EvenMatchDebug: [RMD]Colman 36.00 PPH, currently on Blue
[...]
EvenMatchDebug: 21 players, combined PPH 4247.08, balance target PPH per team 2123.54
EvenMatchDebug: Balancing team sizes and PPH...
EvenMatchDebug: Odd player count, randomly assigning rush_douchebag to blue (-1.00 PPH)
EvenMatchDebug: Assigning Changal (467.89 PPH) and [SkyFORS]FORSIETS (392.27 PPH)
EvenMatchDebug: Changal will be on blue (now 466.89 PPH), [SkyFORS]FORSIETS will be on red (now 392.27 PPH)
EvenMatchDebug: Assigning Antman (285.70 PPH) and Hyden (253.20 PPH)
EvenMatchDebug: Antman will be on red (now 1029.77 PPH), Hyden will be on blue (now 1014.68 PPH)
EvenMatchDebug: Assigning Droopy_Bollocks (245.29 PPH) and MeatChopper (236.74 PPH)
EvenMatchDebug: Droopy_Bollocks will be on blue (now 1259.97 PPH), MeatChopper will be on red (now 1266.51 PPH)
EvenMatchDebug: Assigning Sedoy (180.06 PPH) and smalltown (163.74 PPH)
EvenMatchDebug: Sedoy will be on blue (now 1856.92 PPH), smalltown will be on red (now 1869.59 PPH)
[...]
EvenMatchDebug: Red team size 10, combined PPH 2095.06
EvenMatchDebug: Blue team size 11, combined PPH 2152.02
EvenMatchDebug: Applying team changes...
EvenMatchDebug: Moving RainbowDash to red
EvenMatchDebug: Moving MeatChopper to red
EvenMatchDebug: Moving aftertwobowlsOO> to red
EvenMatchDebug: Moving [RMD]Colman to red
EvenMatchDebug: Moving Butcher to blue
EvenMatchDebug: Moving Droopy_Bollocks to blue
[...]
EvenMatchDebug: Teams shuffled.
EvenMatchDebug: 101.04 Saving PPH data...
EvenMatchDebug: 102.22 Saving PPH data...
EvenMatchDebug: 112.98 Saving PPH data...
EvenMatch: Overriding player team preference team=255 with team=0
EvenMatchDebug: 127.20 Saving PPH data...
EvenMatchDebug: 134.11 smalltown switched to Red
EvenMatch: Overriding player team preference team=255 with team=0
EvenMatchDebug: 150.46 Saving PPH data...
EvenMatchDebug: 153.25 Saving PPH data...
[...]
EvenMatch: Teams have become uneven, soft balance in 50s
EvenMatchDebug: 204.59 Saving PPH data...
EvenMatchDebug: 210.87 Saving PPH data...
EvenMatchDebug: 240.60 Saving PPH data...
EvenMatchDebug: 246.29 Not enough soft balancing candidates
EvenMatch: Teams are uneven, forced balance in 70s
EvenMatchDebug: 247.29 Not enough soft balancing candidates
EvenMatchDebug: 248.28 Not enough soft balancing candidates
EvenMatchDebug: 249.27 Not enough soft balancing candidates
EvenMatchDebug: 250.30 Not enough soft balancing candidates
EvenMatchDebug: 251.29 Not enough soft balancing candidates
EvenMatchDebug: 252.28 Not enough soft balancing candidates
EvenMatchDebug: 253.27 Not enough soft balancing candidates
EvenMatchDebug: 253.27 Additional soft balancing candidate: FORS[forsikan.repub]
EvenMatch: Forced team change: FORS[forsikan.repub] Blue soft-balance at respawn
[...]
EvenMatchDebug: 337.49 [RMD]Colman switched to Red
EvenMatchDebug: 339.51 advfree switched to Blue
EvenMatchDebug: 366.37 advfree switched to Blue
[...]
EvenMatch: Teams have become uneven, soft balance in 50s
EvenMatchDebug: 724.86 rush_douchebag switched to Blue
EvenMatchDebug: 731.00 Butcher switched to Blue
[...]
EvenMatchDebug: 811.36 Saving PPH data...
EvenMatchDebug: 832.12 Antman switched to Red
EvenMatchDebug: 838.92 Butcher switched to Blue
EvenMatchDebug: 850.82 AC[WALES] switched to Blue
EvenMatchDebug: 880.51 AC[WALES] switched to Blue
EvenMatch: Overriding player team preference team=255 with team=0
EvenMatchDebug: 887.60 [RMD]Colman switched to Red
EvenMatchDebug: 894.95 Hyden switched to Blue
EvenMatchDebug: 904.32 Gl@diator34 switched to Red
[...]
EvenMatch: Teams have become uneven, soft balance in 50s
EvenMatchDebug: 1218.38 MarcusAurelius switched to Blue
EvenMatchDebug: 1339.86 [RMD]Colman switched to Red
EvenMatchDebug: 1344.85 [RMD]Colman switched to Red
EvenMatchDebug: 1349.92 [RMD]Colman switched to Red
EvenMatchDebug: 1359.81 PimPomPum switched to Red
EvenMatchDebug: 1361.98 Hyden switched to Blue
EvenMatchDebug: 1362.09 [RMD]Colman switched to Red
EvenMatchDebug: DEBUG: Changal disconnected
EvenMatchDebug: 1412.79 Saving PPH data...
EvenMatchDebug: DEBUG: EmanReleipS disconnected
EvenMatchDebug: DEBUG: RainbowDash disconnected
[...]
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.