EvenMatchOmni

Discuss and provide feedback on Maps.
User avatar
captainsnarf
Posts: 2631
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

Ankeedo is a good example of why map specific PPH is a good idea.

He'll rack up kills and destroyed nodes on MassD sitting in a levi most of the game, getting a high PPH. If he's on one team, and the other doesn't have any players that like sitting in levis, then Ankeedo's team will most likely win.

So on that map, his PPH is justified. Same thing happens when he sits in the deemer tank on desert junkyard.

Put him on a DM style map and it's going to skew the balancer the other way though.
User avatar
pooty
Posts: 4351
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

Snarf, I don't think 3.3 version is in the Git repo.
User avatar
captainsnarf
Posts: 2631
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

oops, I'll upload it when I get home
User avatar
captainsnarf
Posts: 2631
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

3.3 source has been uploaded to github
User avatar
pooty
Posts: 4351
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

Some relevant lines of code:

So saving MapBased PPH is an average of your past PPH on that map and your current PPH on that map:
RecentMap.PPH[IndexMap].PastPPH = 0.5 * (RecentMap.PPH[IndexMap].PastPPH + RecentMap.PPH[IndexMap].CurrentPPH);

BUT saving the overall PPH is adjusted differently , per code comments: adjust generic PPH slower than map-specific

Code: Select all

Recent.PPH[Index].PastPPH = 0.32 * (2.125 * Recent.PPH[Index].PastPPH + Recent.PPH[Index].CurrentPPH);
So I get you want to move the value slower since you don't want one great/shitty game to wreck your average, but I need to thing about the math here..

Also the beauty of this code, I want to check some math on, mostly on case 1 which would be with game start (Current is -1 since game hasn't started), and with ignore map on we should hit case 5.

Code: Select all

 // snarf allow ignoring map specific PPH
    if(EvenMatchMutator.bIgnoreMapSpecificPPH)
    {
        PastPPHMap = -1;
    }
	
	// combine current and past PPH values in a meaningful way
	switch (int(PPH == -1) + 2 * int(PastPPH == -1) + 4 * int(PastPPHMap == -1)) {
		case 0: // all three PPH values available
			retval = 0.4 * (PPH + PastPPHMap + 0.5 * PastPPH);
            break;
			
		case 1: // no current (meaningful) score yet, but both past PPH available
			retval = 0.8 * (PastPPHMap + 0.25 * PastPPH);
            break;
			
		case 2: // no past generic PPH (should not be possible)
			retval = 0.5 * (PPH + PastPPHMap);
            break;
			
		case 3: // only past map-specific PPH (should not be possible either)
			retval = PastPPHMap;
            break;
			
		case 4: // no past map-specific PPH
			retval = 0.5 * (PPH + PastPPH);
            break;
			
		case 5: // only past generic PPH
			retval = PastPPH;
            break;
			
		case 6: // only current PPH (new player)
			retval = PPH;
            break;
			
		default: // none of the above (should not be possible)
			retval = CurrentPPH;
	}

    return retval;
}
So I need to look at how the math comes out, but seems fairly well thought through by Wormbo
User avatar
pooty
Posts: 4351
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

Code: Select all

Recent.PPH[Index].PastPPH = 0.32 * (2.125 * Recent.PPH[Index].PastPPH + Recent.PPH[Index].CurrentPPH);
So I think that's ok.

PastPPH GamePPH Simple Avg Save value as Coded (case 5 when not using map specfic, this is returned for balancer)
250 500 375 330 (Really good game, raises).
250 400 325 298
250 300 275 266
250 250 250 250 (same)
250 100 175 202 (Really bad game, lowers it a bit)

350 500 425 398
350 400 375 366
350 300 325 334
350 250 300 318

200 500 350 296 Extremely good, player goes from 200 to 296, seems maybe too high, idk>
200 400 300 264
200 300 250 232
200 250 225 216
200 200 200 200

Code: Select all

 RecentMap.PPH[IndexMap].PastPPH = 0.5 * (RecentMap.PPH[IndexMap].PastPPH + RecentMap.PPH[IndexMap].CurrentPPH);
Map based uses simple average (see above). I think have save should use same formula as the generic PPH, so that impact of outlier performances are reduced. So to me that's one change needed if we use map based (which we should), so that mapPPH don't fluctuate too much (via simple avg).

If we look at what's used by the initial balancer, case 1 with map
retval = 0.8 * (PastPPHMap + 0.25 * PastPPH);
PastPPH MapPPH Simple Avg Return
250 500 375 450 (shitty on normal maps, beast on this map).
250 400 325 370
250 300 275 290
250 250 250 250
250 100 175 130

350 500 425 470
350 400 375 390
350 300 325 310
350 250 300 270

200 500 350 440
200 400 300 360
200 300 250 280
200 250 225 240
200 200 200 200

I Think that's reasonable too....

So the only change I want to make is:
1. Use Map Specific PPH, it helps with fluctutations based on maps
2. Update the MapPPH save to use the slower adjusting formula

One option might be to change both formulas so the adjustment is even slower/lower for outliers but not sure its worth the time to mess with it.
User avatar
pooty
Posts: 4351
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

I updated EvenMatchOmni to 3.4 Checked into git.
Map Specific saves use slower changing formula.
Map Specific PPH is turned back on.
User avatar
captainsnarf
Posts: 2631
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

We had a few quick win rounds last night (score before OT). When that happened, no score happened. Score was still 0 - 0. It's been a long time since we had this bug. I'm guessing UTComp is somehow conflicting with EvenMatchOmni custom scoring? They both have their own 'ONSGameRules' classes, but they should be working together OK.
Post Reply