So I've begun the work of porting Challenge Cup to Pokemon Showdown, and I ran across a problem in the level balance algorithm.
The algorithm that PO uses to calculate level balance is found
here. How is basically works is that it finds the pokemon with the lowest "baseStatSum" (Sunkern), sets that pokemon to Lv. 100, and then changes the level of everyone else so that they have (approximately) the same "baseStatSum."
On first glance, "baseStatSum" appears to be pretty straightforward: the stats of a pokemon at Lv. <level> given neutral nature, 31 IVs and 85 EVs in each stat, with Atk and SpA being further multiplied by <level>, since
attack power is (roughly) proportional to level (yes, I realize this
isn't actually the damage formula, but it's close enough for our purposes).
Okay, so here's the problem, that *should* become apparent on
second glance at that "baseStatSum" function: it's wrong. Namely,
that 85 should be a 21 (85/4). The rest of the formula seems correct, at least based on the premise of the algorithm (it can be argued that Atk and SpA should not be further multiplied by <level>, since bulk is the product of HP and Def). Here's the problem: if we make the correction, the corresponding level balance skews in favor of weaker pokemon: given 31 IVs / 85 EVs in each stat, neutral nature and given moves of equal base power (and no type advantage), Lv. 100 Sunkern will--barring a crit--always win against Lv. 50 Arceus.
However, Arceus will outspeed, and it *does* have greater bulk. And it should be noted that using the PO algorithm, Lv. 60 Arceus will always win against Lv. 100 Sunkern.
So here's the deal: for now, I'm going to program CC4PS with the CORRECT algorithm (21 instead of 85), and we're gonna see how you guys feel about the new level balance.
Eventually, I'd like to move Challenge Cup's (and Randbat's) level balance system over to using a modified version of
X-Act's BSR. But this isn't exactly a huge priority--the glorious thing about battles with random teams is that any imbalances are made somewhat moot by the fact that each person has the same chance of getting each team.