Aces High Bulletin Board

General Forums => Aces High General Discussion => Topic started by: BowHTR on May 05, 2015, 02:46:34 PM

Title: How is ENY calculated
Post by: BowHTR on May 05, 2015, 02:46:34 PM
What is the formula for how eny balancing is created? In basic terms.

I did find the following post, but i have no idea what it means.

  •    if(Balance->TotalPlayerCnt > 0 )
       {
          if(Settings->MinBalanceTotal != 0)
          {
             BalanceGain = (double)Balance->TotalPlayerCnt / (double)Settings->MinBalanceTotal;
          }
          else
          {
             BalanceGain = 1;
          }
          if(BalanceGain > 1)
          {
             BalanceGain = 1;
          }

          Least = 2.0;
          for(Country=0;Country<pcMAX_COUNTRY;++Country)
          {

             Balance->CountryPer[Country] = (double)Balance->PlayerCnt[Country] / (double)Balance->TotalPlayerCnt;
             if(Balance->CountryPer[Country] < Least)
             {
                Least = Balance->CountryPer[Country];
             }

          }

          if(Least != 0)
          {
             for(Country=0;Country<pcMAX_COUNTRY;++Country)
             {

                Balance->MinEnyValue[Country] =
                   (Balance->CountryPer[Country] - (Least + Settings->BaseCountryPer)) * Settings->CountryBalanceScale * BalanceGain * 100;
                if(Balance->MinEnyValue[Country] < 0)
                {
                   Balance->MinEnyValue[Country] = 0;
                }
                if(Balance->MinEnyValue[Country] > Settings->MinEnyValue)
                {
                   Balance->MinEnyValue[Country] = Settings->MinEnyValue;
                }
             }
          }
       }
       else
       {
          for(Country=0;Country<pcMAX_COUNTRY;++Country)
          {
             Balance->MinEnyValue[Country] = 0;
          }
       }

       if(Balance->TotalPlayerCnt < 6)
       {
          for(Country=0;Country<pcMAX_COUNTRY;++Country)
          {
             Balance->MinEnyValue[Country] = 0;
          }
       }
Title: Re: How is ENY calculated
Post by: Volron on May 05, 2015, 03:17:17 PM
We need the Lusche for this one. :)
Title: Re: How is ENY calculated
Post by: Lusche on May 05, 2015, 03:23:25 PM
We need the Lusche for this one. :)


I don't speak HiTech  :old:
Title: Re: How is ENY calculated
Post by: The Fugitive on May 05, 2015, 04:16:42 PM

I don't speak HiTech  :old:

Nobody does!

ENY is calculated by the population of players in the arenas as each team compares.... population wise to each other.

Hitech and crew assigned a value to each plane and GV. As an imbalance in population numbers increases it hits a threshold and starts disallowing the country/team with the higher population planes and vehicles based on these values
Title: Re: How is ENY calculated
Post by: Copprhed on May 05, 2015, 06:04:35 PM
How many times do these same topics get brought up.....with the same people saying the same things, over and over and over...........
Title: Re: How is ENY calculated
Post by: BowHTR on May 05, 2015, 06:28:16 PM
let me rephrase this. I understand how eny works. What i would like to know is how it is calculated. What formula is used to say that the Bish have a 3.3 ENY, or the knights have a 10 ENY, and so forth.

For example, lets say that there are 360 players online. 120 on team 1, 180 on team 2, and 60 on team 3. What would be the ENYs?
Title: Re: How is ENY calculated
Post by: Zimme83 on May 05, 2015, 07:11:04 PM
I think that ENY kicks in when a team has >40% of the total population and reach its maximum of 20 when a team has 50% or more of the total population.
Title: Re: How is ENY calculated
Post by: BowHTR on May 05, 2015, 07:59:03 PM
I think that ENY kicks in when a team has >40% of the total population and reach its maximum of 20 when a team has 50% or more of the total population.

screenshot from Caldera: (http://i343.photobucket.com/albums/o460/caldera_08/ahss0.jpg~original)

Disregard the arrow and question marks. This pic was pulled from a different post.
Title: Re: How is ENY calculated
Post by: BowHTR on May 05, 2015, 08:02:36 PM
Here is another one from another post:

(http://img62.imageshack.us/img62/9495/ahss30.png)
Title: Re: How is ENY calculated
Post by: Zimme83 on May 05, 2015, 08:04:10 PM
Ok. then i might be wrong. However that is something i will never admit...  :noid
Title: Re: How is ENY calculated
Post by: The Fugitive on May 05, 2015, 08:18:41 PM
In the second the difference between the lowest and highest populated team is 10.5%. It looks like the trigger point is 10%. .5% gives you a .8 ENY and 12.1% (10% trigger and 2.1% more) gives you a 3.3 ENY then just with that math for every .5% over the trigger you get a .8 ENY. So 15% should give you an 8 ENY

I don't think there is any kind of graduated scale. I think Lusche has all the numbers figured out.
Title: Re: How is ENY calculated
Post by: Dragon Tamer on May 05, 2015, 08:26:32 PM
What is the formula for how eny balancing is created? In basic terms.

I did find the following post, but i have no idea what it means.

If I remember correctly, when programing in C a semicolon is used to tell the computer that anything after said semicolon on that line is a comment and not code. Looks like HT may have edited his notes out of the equation, probably for protection. I did however go through and manage to decipher it. I've re-inserted the comments as they most likely read.

Quote
   if(Balance->TotalPlayerCnt > 0 )
   {
      if(Settings->MinBalanceTotal != 0)
      {
         BalanceGain = (double)Balance->TotalPlayerCnt / (double)Settings->MinBalanceTotal;This line is for calculating the thing using the things above
      }
      else
      {
         BalanceGain = 1; Exactly as it says
      }
      if(BalanceGain > 1)
      {
         BalanceGain = 1; Exactly as it says agian
      }

      Least = 2.0;
      for(Country=0;Country<pcMAX_COUNTRY;++Country)
      {

         Balance->CountryPer[Country] = (double)Balance->PlayerCnt[Country] / (double)Balance->TotalPlayerCnt;
         if(Balance->CountryPer[Country] < Least)
         {
            Least = Balance->CountryPer[Country]; This is where I hide my sheep, no one can ever know
         }

      }

      if(Least != 0)
      {
         for(Country=0;Country<pcMAX_COUNTRY;++Country)
         {

            Balance->MinEnyValue[Country] =
               (Balance->CountryPer[Country] - (Least + Settings->BaseCountryPer)) * Settings->CountryBalanceScale * BalanceGain * 100;
            if(Balance->MinEnyValue[Country] < 0)
            {
               Balance->MinEnyValue[Country] = 0; This is the part that inflates egos
            }
            if(Balance->MinEnyValue[Country] > Settings->MinEnyValue)
            {
               Balance->MinEnyValue[Country] = Settings->MinEnyValue; This part makes the ego pop
            }
         }
      }
   }
   else
   {
      for(Country=0;Country<pcMAX_COUNTRY;++Country)
      {
         Balance->MinEnyValue[Country] = 0; This is responsible for rage quits
      }
   }

   if(Balance->TotalPlayerCnt < 6)
   {
      for(Country=0;Country<pcMAX_COUNTRY;++Country)
      {
         Balance->MinEnyValue[Country] = 0; Where did I put my scotch?
      }
   }
Title: Re: How is ENY calculated
Post by: Someguy63 on May 05, 2015, 10:17:41 PM
.
Title: Re: How is ENY calculated
Post by: FBKampfer on May 06, 2015, 12:25:56 AM
Imo, it should be:

((largest country pop. / smallest country pop.) x 100) - 100 = ENY limit.
Title: Re: How is ENY calculated
Post by: MrKrabs on May 06, 2015, 05:47:22 AM
Imo, it should be:

((largest country pop. / smallest country pop.) x 100) - 100 = ENY limit.

Used to be max 60  :old:
Title: Re: How is ENY calculated
Post by: RedAgony on May 06, 2015, 09:36:54 AM
If I remember correctly, when programing in C a semicolon is used to tell the computer that anything after said semicolon on that line is a comment and not code. Looks like HT may have edited his notes out of the equation, probably for protection. I did however go through and manage to decipher it. I've re-inserted the comments as they most likely read.

Not sure if serious, or joking...

/*
this is a comment in C
*/

// This is also a comment (though some compilers don't support)

; completes a line of code.

Is this game coded in C?  If so, I need a job!
Title: Re: How is ENY calculated
Post by: SilverZ06 on May 06, 2015, 10:28:10 AM
I believe it is coded in C++. What compiler doesn't support // as a comment?

// is a single line comment

/* This is a block comment
 * everything  between
 * the /* and the */ are comments
 * and are ignored by the compiler
 */

; is the execution statement for a line of code.
Title: Re: How is ENY calculated
Post by: RedAgony on May 06, 2015, 10:40:02 AM
sorry that is a holdover from OLD C compilers using the C90 standard.
Title: Re: How is ENY calculated
Post by: SilverZ06 on May 06, 2015, 10:46:50 AM
Quote
           if(Balance->TotalPlayerCnt > 0 ) //If TotalPlayerCnt is greater than 0 do the code in the brackets
           {
              if(Settings->MinBalanceTotal != 0)//If MinBalanceTotal is Not equal to  0 do the code in the brackets
              {
                 BalanceGain = (double)Balance->TotalPlayerCnt / (double)Settings->MinBalanceTotal;//cast TotalPlayerCnt and MinBalanceTotal to doubles and divide TotalPlayerCnt by MinBalanceTotal
              }
              else//If MinBalanceTotal is equal to 0
              {
                 BalanceGain = 1;//set BalanceGain to 1
              }
              if(BalanceGain > 1)//If BalanceGain is greater than 1 then set it back to 1
              {
                 BalanceGain = 1;
              }

              Least = 2.0; //set Least to 2.0
              for(Country=0;Country<pcMAX_COUNTRY;++Country)//This is a for loop and will execute as long as the statement Country<pcMax_COUNTRY is true
              {
                 //The following code uses 'Country' as the index number so the first time through the loop 'Country' is equal to 0, the next loop 'Country will be equal to 1 and so on and so forth until Country is greater than or equal to pcMAX_COUNTRY. My guess is pcMAX_COUNTRY's value is 2 since we have 3 countries (0,1,2).
                 Balance->CountryPer[Country] = (double)Balance->PlayerCnt[Country] / (double)Balance->TotalPlayerCnt;//This sets CountryPer[Country] equal to PlayerCnt[Country] divided by TotalPlayerCnt.
                 if(Balance->CountryPer[Country] < Least)//If the result of the previous calculation is less than Least do the code in the brackets
                 {
                    Least = Balance->CountryPer[Country];//Set the value of Least equal to CountryPer[Country] (remember Country is the index number and the loop control variable)
                 }

              }//End of the for loop

              if(Least != 0)//If Least does NOT equal 0 do the code in the brackets
              {
                 for(Country=0;Country<pcMAX_COUNTRY;++Country)//Another for loop using Country as the loop control variable and the index value
                 {
                    //This block of code looks to be where the ENY value is set. 
                    Balance->MinEnyValue[Country] =
                       (Balance->CountryPer[Country] - (Least + Settings->BaseCountryPer)) * Settings->CountryBalanceScale * BalanceGain * 100;
                    //Set MinEnyValue[Country] equal to (CountryPer[Country] minus (Least + BaseCountryPer)) then multiply by CountryBalanceScale times BalanceGain times 100
                    if(Balance->MinEnyValue[Country] < 0)//If MinEnyValue[Country] is less than 0, set MinEnyValue[Country] to 0
                    {
                       Balance->MinEnyValue[Country] = 0;
                    }
                    if(Balance->MinEnyValue[Country] > Settings->MinEnyValue)//If balance MinEnyValue[Country] is greater than MinEnyValue in settings, then set balance MinEnyValue[Country] equal to settings MinEnyValue
                    {
                       Balance->MinEnyValue[Country] = Settings->MinEnyValue;
                    }
                 }
              }
           }
           else//this is hard to tell not being in a compilier but I believe this else statement belongs to the very top If statement. If it does it means If TotalPlayerCount is less than or equal to 0 do the following code in the brackets
           {
              for(Country=0;Country<pcMAX_COUNTRY;++Country)//Another for loop
              {
                 Balance->MinEnyValue[Country] = 0;//set balance MinEnyValue[Country] to zero
              }
           }

           if(Balance->TotalPlayerCnt < 6)//If TotalPlayerCnt is less than 6 do the following code in the brackets
           {
              for(Country=0;Country<pcMAX_COUNTRY;++Country)//Another for loop setting each country's MinEnyValue to zero
              {
                 Balance->MinEnyValue[Country] = 0;
              }
           }

I have to run and pick up my son. I'll pick up where I left off and add more comments when I get a chance later today. Hope this helps some of you attempt to understand what is going on.
Title: Re: How is ENY calculated
Post by: SilverZ06 on May 06, 2015, 12:22:10 PM
Okay I've added all my comments and some may be wrong as I was trying to read the code quickly while feeding my sons their lunches. So basically ENY is calculated from this line of code: (Balance->CountryPer[Country] - (Least + Settings->BaseCountryPer)) * Settings->CountryBalanceScale * BalanceGain * 100; However with out knowing the values of CountryBalanceScale or BalanceGain I can't be more precise in explaining it just from the code. I hope this helped.  :cheers:

How'd I do Hitech?
Title: Re: How is ENY calculated
Post by: hitech on May 06, 2015, 12:54:58 PM
Okay I've added all my comments and some may be wrong as I was trying to read the code quickly while feeding my sons their lunches. So basically ENY is calculated from this line of code: (Balance->CountryPer[Country] - (Least + Settings->BaseCountryPer)) * Settings->CountryBalanceScale * BalanceGain * 100; However with out knowing the values of CountryBalanceScale or BalanceGain I can't be more precise in explaining it just from the code. I hope this helped.  :cheers:

How'd I do Hitech?

You can look up those values in the arena settings on line.
Also It is always difficult to get the BBS to display tabs correctly.

HiTech
Title: Re: How is ENY calculated
Post by: FBKampfer on May 06, 2015, 12:55:17 PM
Used to be max 60  :old:

Why in God's name did we lower max ENY? Especially if we were to change the limitation system, a more precise scale would be extremely useful.
Title: Re: How is ENY calculated
Post by: 38ruk on May 06, 2015, 01:03:14 PM
I think that ENY kicks in when a team has >40% of the total population and reach its maximum of 20 when a team has 50% or more of the total population.

Knights had a 28 eny last night so i'm not sure what the max eny is , but it's over 20. Just an observation 8)
Title: Re: How is ENY calculated
Post by: Lusche on May 06, 2015, 01:04:47 PM
Max ENY limit is 29.
Title: Re: How is ENY calculated
Post by: Skyyr on May 06, 2015, 01:57:26 PM
Imo, it should be:

((largest country pop. / smallest country pop.) x 100) - 100 = ENY limit.

You do realize that, using your suggestion, once one team has a 50% numbers advantage over the smallest team (as has happened for 3 of the last 4 nights), nothing can be flown by that team, right?
Title: Re: How is ENY calculated
Post by: Randy1 on May 06, 2015, 02:27:13 PM
Last weekend the eny bit hard.  For a time there I could not get a P38J.  You see this at map change briefly but for some reason a couple of times the rook nation dominated the other countries in numbers online.

At first I disliked the eny system but now, like the three country system, it is the best compromise during an imbalance.  My only suggestion has been to control perk planes by numbers in use in conjunction with population.  Every time a 262 goes out in a country as an example, the next cost slightly more than the population set cost.  No 262s in use price drops.
Title: Re: How is ENY calculated
Post by: SilverZ06 on May 06, 2015, 02:33:50 PM
Last weekend the eny bit hard.  For a time there I could not get a P38J. 

Perfect time to try the wildly underestimated P38G.  :rock
It is quite the perk farmer.
Title: Re: How is ENY calculated
Post by: FBKampfer on May 06, 2015, 06:12:14 PM
You do realize that, using your suggestion, once one team has a 50% numbers advantage over the smallest team (as has happened for 3 of the last 4 nights), nothing can be flown by that team, right?

I think it would be obvious that the cap is whatever max ENY is. Right now it's 40, though 60 sounds even better.
Title: Re: How is ENY calculated
Post by: 38ruk on May 06, 2015, 08:01:09 PM
Perfect time to try the wildly underestimated P38G.  :rock
It is quite the perk farmer.

Take that armored glass out of her and she'd go from perk farmer to perked lol!
Title: Re: How is ENY calculated
Post by: Lusche on May 07, 2015, 08:34:53 AM
This screenshot taken in LW arena a few minutes you can see the ENY limit maxing out at 29

(http://i1145.photobucket.com/albums/o507/Snaildude/side%20balancing_zpszq9mab5j.jpg)


It also starts to make me more sympathetic to any kind of involuntary auto balancer..... (not to mention a certain 12 hour rule....  :noid)

It's just a matter of time we will have a country with population 0. I'm sure the base capture stats will skyrocket then  :old: