EvenMatchOmni

Discuss and provide feedback on Maps.
Post Reply
User avatar
pooty
Posts: 4537
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

mutate teams - checks balance, if unbalanced swaps some players. This seems to do the right thing with killing players that have their team changed.
Does this only work if the teams are unbalanced numerically (ie 7 v 5), it doesn't do anything if teams are even or +/-1 right?
User avatar
McLovin
Posts: 1194
Joined: Sat Apr 03, 2021 12:54 pm
Location: Salt Lake City, Utah
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by McLovin »

Enyo wrote: Tue Jan 25, 2022 4:12 pm So, what's the difference between mutate teams and mutate balance exactly?
I did a mutate balance, and a mutate shuffle. Both, blew me to smithereens, destroyed my vehicle and switched me to the other team.
User avatar
captainsnarf
Posts: 2714
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

pooty wrote: Tue Jan 25, 2022 11:16 pm
mutate teams - checks balance, if unbalanced swaps some players. This seems to do the right thing with killing players that have their team changed.
Does this only work if the teams are unbalanced numerically (ie 7 v 5), it doesn't do anything if teams are even or +/-1 right?
Yes, that's how it was. Teams were considered balanced if they were numerically even, so I believe nothing happened if you did a teams command. It's a bit more complicated than that but that's the basics of it.

I changed it in the new version.

This code is called when you do a teams command

Code: Select all

function bool RebalanceNeeded(optional int SizeOffset, optional out float Progress, optional out byte BiggerTeam)
{
	Progress = GetTeamProgress();
	return RebalanceStillNeeded(SizeOffset, Progress, BiggerTeam) && IsBalancingActive();
}
I changed the GetTeamProgress() method. It use to return a number between 0 and 1 based on the game score (core points, node health, kills). 0 means red is winning, 1 blue is winning, 0.5 is a tie. Now it returns 0 if red's total PPH is bigger than blue, 1 if blue is bigger, and 0.5 if they are within 100 PPH of each other.

I changed the RebalanceStillNeeded() method. If teams had even players it returned false. Before it returned true based on the number of players on the team and the game score. If e.g. red had 3 players and blue had 2 and red was winning than definitely rebalance needed. But if red had 2 and blue had 3 and red was winning, rebalance was based on score and a config 'smallteams' threshold.

Now it returns true if red or blue has more than 100 PPH over the other. It doesn't care if the player numbers are even or game score. This RebalanceNeeded() is just to determine if the teams command does the actual shuffle or not.
User avatar
pooty
Posts: 4537
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

Ok, so I think I am confused.
And for everyone else just to be clear the chat 'teams' command right now just balances players based on number of players so none of the discussion here applies, its only to the admin commands:

mutate shuffle - forces immediate reshuffle by PPH/Map. All Players are potentially affected by shuffle_teams()

mutate teams - this is where I am confused, so it balances on num players, but then can also call shuffle_teams()? I am not sure we want that..I mean a that point we could just call mutate shuffle and it would rebalance and fix both number of players and PPH..this seems to do same thing? Meaning if its going to shuffle_teams() if the points are imbalanced, I might as well always be shufflin'

The other item is when new players join even teams, right now I think that's done via UAdminMod, and its more or less Random... rather it joined them based on either progress or PPH (anything better than random).
User avatar
captainsnarf
Posts: 2714
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

Meh, I was confused too. Sorry.

mutate teams doesn't call shuffle_teams(). It calls something else 'ActuallyCheckBalance'. That swaps player too, but has logic to not swap some players ('key' players), and more logic to swap others (people that team switched previously).
User avatar
pooty
Posts: 4537
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

Okay got it.
I should be able to get 1.2 loaded later today.
I'll try to populate the KnownPlayers with a few well known high end players, give them a mulitple of say 1.2 to start?
User avatar
Super Sanka
Posts: 265
Joined: Mon Jan 10, 2022 7:12 pm
Location: Orlando
Contact:

Re: EvenMatchOmni

Post by Super Sanka »

Give me low rating pls
User avatar
captainsnarf
Posts: 2714
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

Well, the teams command certainly blew up. I'm not sure what happened there. It worked ok when I tried it out locally.
User avatar
pooty
Posts: 4537
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

Someone did type the UAdminMod teams at nearly the same time, so might have been an interaction. I'll dig up the log later today.
User avatar
pooty
Posts: 4537
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

Ignore IPs they've been redacted

Code: Select all

Log: Garbage: objects: 102277->99022; refs: 1423382
ScriptLog: Using Official Link Setup: Default
ScriptLog: p)o(Oty logged in as p00ty.
NetComeGo: Close TcpipConnection 1.1.1.1:51300 01/28/22 22:32:56
EvenMatchDebug: 431.58 Not enough soft balancing candidates
EvenMatch: Teams are uneven, forced balance in 30s
EvenMatchDebug: 432.61 Not enough soft balancing candidates
...
EvenMatchDebug: 435.58 Initial balancing candidate: Player2
EvenMatchDebug: 435.58 Not enough soft balancing candidates
EvenMatchDebug: 435.58 Additional soft balancing candidate: C@nOnFOndl3r
EvenMatchDebug: 435.58 Additional soft balancing candidate: WebAdmin
Warning: mutTeamBalance ONS-Minus-McLovins-MEGA-ARENA-V7.mutTeamBalance (Function EvenMatchOmni.mutTeamBalance.RememberForcedSwitch:0042) Accessed None 'Team'
EvenMatch: Forced team change: WebAdmin  soft-balance at respawn
EvenMatch: Not remembering WebAdmin

....
EvenMatchDebug: 437.60 Initial balancing candidate: Player2
EvenMatchDebug: 437.60 Not enough soft balancing candidates
EvenMatchDebug: 437.60 Additional soft balancing candidate: C@nOnFOndl3r
EvenMatchDebug: 437.60 Additional soft balancing candidate: WebAdmin
Warning: mutTeamBalance ONS-Minus-McLovins-MEGA-ARENA-V7.mutTeamBalance (Function EvenMatchOmni.mutTeamBalance.RememberForcedSwitch:0042) Accessed None 'Team'
EvenMatch: Forced team change: WebAdmin  soft-balance at respawn
EvenMatch: Not remembering WebAdmin

And then this repeats many times...
We don't seem to log teams call or mutate teams calls, we should probably add that to the log.

Snarf I can send you the whole log if you'd like, but I don't want to post it because it has IPs in it.

And I should point out I forgot an ending quote in KnownPlayers.ini (that's fixed now) but I don't think that caused to weird balancer condition.
Post Reply