Gaming Zone > Unreal Tournament 2004

Let's talk about PPR! PPR Changes on Freon 1

<< < (6/7) > >>

Piglet:

--- Quote from: hagis on August 08, 2020, 17:20 ---there is another area in balancer that is flawed (or could be better)

--- End quote ---

Yeah - I've not made changes to the balancer itself in this revision. What I've done is make the values it use more accurate when current PPR is included in the mix.  Rather than using current PPR which includes all of this round's score, but not the fact that this round is being played I've included this round's score estimated to what you would get if you carried on scoring at that rate to overtime.

Hmmm...while I was typing that I had a thought. We could get round Holyspam's concerns by totally ignoring all points from the current round:

In round 1, show score as PPR (and use AVE PPR in balancing in place of current PPR as there isn't enough data to say what PPR people will be playing at)
In round 2 onwards show PPR = average score in all completed rounds so far. (Start to use that in balancer after n rounds...where n>0)

That might be better, and removes the need to make any assumptions about how long a round would go on.


--- Quote from: hagis on August 08, 2020, 17:20 ---need to look at the balancing code again because it has an idea of 'sticky players'

--- End quote ---


Sticky player code isn't actually used. It's there in the code. It's meant to work - but it doesn't. I fixed the bug in it a while back and it was rubbish. It meant that players weren't swapped more than once in a game - leading to the wrong player being picked to balance. I backed out the fix and left it how it was!

Piglet:
I'm going to try the stategy in orange above.

That removes the problem in trying to work out how far through the round you are. Instead, just ignore the current round.

Old code includes the score from the current round, but still divides by the number of whole rounds which have been completed.

This orange strategy updates current PPR once a round, but based on whole rounds and only on points that have been scored in those rounds.

Piglet:
Yeah. That works. I'm happier with that. Removes the old problem without introducing a new one.

Piglet:

--- Quote from: hagis on August 08, 2020, 17:20 ---need to look at the balancing code again because it has an idea of 'sticky players'

--- End quote ---

The code I think you're talking about is in Team_GameBase->FindBestAutoBalanceCandidate():


--- Code: ---  // move player that closest matches the required PPR gap / number of players needed
  for(C=Level.ControllerList; C!=None; C=C.NextController)
  {
   
    // Skip players who are on the don't switch list.
//Note: (Piglet) This is the code as I found it. Surely the "continue" on this iterator has no effect!
    for(i=0; i<DontAutoBalanceList.Length; ++i) {
      if(DontAutoBalanceList[i] == C)
        continue;
    }

  ....more stuff around checking the player and seeing if they are the "right one" to move...
  }

--- End code ---

The problem with that code is that it's pointless. It doesn't work. The "continue" just tells the code to skip to the next item in the DontAutoBalanceList and not the next controller in the ControllerList.

To make it work as intended this is the code I tried and then commented back out as it meant that a worse player was selected for swapping:


--- Code: ---...same stuff...


  // Skip players who are on the don't switch list. Note:(Piglet) Made this change to make the code work, but the players hated it. The 'wrong' player was swapped leaving the teams unbalanced. Reverting to investigate further some time.
    for(i=0; i<DontAutoBalanceList.Length; ++i) {
      if(DontAutoBalanceList[i] == C)
        break;
    }
if(i<DontAutoBalanceList.Length)
continue;



...same stuff...


--- End code ---

holyspam:
Players are sorted by their PPR for balancing, not sure about dontautobalancelist, so if you do for i=3 it will skip the 3 highest pprs, in the balancelist
I think it would be better to remove all the balance code from 3spn and split that on a standalone mutator, but i have no idea how mutators hook with each other, maybe a standalone class.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version