Battle balance

Discuss anything related to warbarons.

Battle balance

Postby Itangast » Fri Jul 09, 2010 7:48 pm

I have played a lot of quite long 1 vs 1 games lately...

In short:
- The battles involves too much luck and I would like to evaluate a 18 sided dice instead of 20 sided. If you could make that option I would be happy.

The long...
At the moment the battle rolls involve too much luck to be honest. This is not only my opinion but also the people I have played (mainly 1 vs 1 games).

Off course there should be bad luck battles and lucky ones - but currently the luck factor is too strong to make it fun.
It wasnt obvious at start, but from playing loads (and I mean loads) and having seen the outcome of great number of battles between full stacks, battle rolls need adjustments.

As it currently stands - A full set of light cavalry in open (4 str) may "quite" easily wipe out a good "organized" stack with 6-7 str.

I have put together great combination of armies using canceling terrain / stack bonuses / -1 stack and high STR units just to be wiped out by a stack of 1 turn units (lt. cavalry).

This is not a one time situation issue - once I had about 50 armies in different stacks (all well organized with good bonuses making my armies 2-3 str better than opponent.) and I had them eliminated by 50 armies in stacks mainly consisting of 1 turn armies... (the popular lt. cavalry :)
My opponent didnt even bother with adding a pegasi to his stacks, just throw any army present at me.

His armies in a stack took like 8 turns to produce while mine took like 19-20.

As luck is such a large factor the player with most armies are likely to win (if played right off course). I have been the underdog in 2-3 games and it doesnt really matter how good you play - large numbers is too tough.

Simply put: there is no incentive to build good stack when the lesser armies work so well....

A strategy likely to win; would be plundering all cities you conquer and buy light cavalry in them, it will be loads of armies to move in the end but you will probably have the advantage....

As I said - It would be great if we could evaluate 18 sided battles rolls...

Few other thing:
- Latest game I played - I havent gotten a hero offer for 30 turns. Please add a guaranteed hero offer after fixed amount of turns (make it with no allies if you like).

- While playing "Bullrun" and select "no allies as production". Some ally cities still exist: dragons, devils, archons and fire ellies. These neutral cities are guarded by a 0 str unit.

- The unicorn does not neglect the Elephant +2 group in open, which it should imo.
Itangast
 
Posts: 51
Joined: Sun Apr 04, 2010 5:51 pm

Re: Battle balance

Postby steff » Fri Jul 09, 2010 8:21 pm

I totally agree.
The battle system will have to give more credit to stronger units.
steff
 
Posts: 18
Joined: Fri Apr 02, 2010 4:30 pm

Re: Battle balance

Postby KGB » Fri Jul 09, 2010 9:20 pm

Itangast,

Itangast wrote:As it currently stands - A full set of light cavalry in open (4 str) may "quite" easily wipe out a good "organized" stack with 6-7 str.


Out of curiosity, how much of an advantage do you consider a 6 strength stack over a 4 strength stack to be? Do you think it should win 60% of the time? 70%? 80%? 90%, 95%? 99% more than 99%?

I wrote a short program to test a 6 strength stack of 8 units vs a 4 strength stack of 8 units. Here's the code for anyone who is interested:

Code: Select all
int main(void)
{
   int hitsStack1 = 16;
   int hitsStack2 = 16;
   int strStack1 = 6;
   int strStack2 = 4;
   int winsStack1 = 0;
   int winsStack2 = 0;
   int unitsLeftStack1 = 0;
   int unitsLeftStack2 = 0;

   srand(time(NULL));

        // Do this battle 10000 times
   for (int i=0; i<10000; i++)
   {
      while (hitsStack1 > 0 && hitsStack2 > 0)
      {
         int rollStack1 = (rand()%20) + 1;
         int rollStack2 = (rand()%20) + 1;
         
         if (rollStack1 <= strStack1 && rollStack2 > strStack2) hitsStack2--;
         if (rollStack2 <= strStack2 && rollStack1 > strStack1) hitsStack1--;
      }
      
      if (hitsStack1 == 0)
      {
         winsStack2++;
         unitsLeftStack2 = unitsLeftStack2 + (hitsStack2+1)/2;
      }
      if (hitsStack2 == 0)
      {
         winsStack1++;
         unitsLeftStack1 = unitsLeftStack1 + (hitsStack1+1)/2;
      }
      
      hitsStack1 = 16;
      hitsStack2 = 16;
   }
   
   printf ("6 Strength Stack won %d battles with an average of %f units left\n", winsStack1, unitsLeftStack1/10000.0);
   printf ("4 Strength Stack won %d battles with an average of %f units left\n", winsStack2, unitsLeftStack2/10000.0);
   printf ("The 6 Strength Stack winning percentage is %f\n", (float)winsStack1/10000.0*100.0);
}


I then ran this code and guess what I saw (I ran my program many times, same results)

6 Strength Stack won 9350 battles with an average of 3.638800 units left
4 Strength Stack won 650 battles with an average of 0.120400 units left
The 6 Strength Stack winning percentage is 93.5000

So the 6 strength stack wins 93% of the time. On average, you should be left with 3.6 units (this includes all the times you are left with 0 units when you lose). The 4 strength stack is left with <1 unit because it mostly loses so on average it's dead. Looking at it another way, you should lose this battle roughly 1 in 10 times. Is 1 in 10 times what you consider easily losing?

I'd be curious to know if SnotlinG/Piranha ran a similar test with their own algorithm if they got the same results. I say curious because I don't think the random number generator they have works well because the other day after another bad loss, I went back and charted 1000 dice rolls (took me over 2 hrs) in all my battles (my rolls, my opponents rolls) for a game. I expected to see roughly 50 rolls for each of the 20 numbers. Instead I saw some (like the number 3) occurred as frequently 70 times while others occurred less than 30. That seems to me to be *way* outside a normal distribution of random numbers.

Itangast wrote:I have put together great combination of armies using canceling terrain / stack bonuses / -1 stack and high STR units just to be wiped out by a stack of 1 turn units (lt. cavalry).


Me too sadly. In fact in the latest game where I just killed your hero, I had 4 9 strength Hv Calv and lost all 4 to your 4 5 strength Elves in an amazing run of bad luck for me.

Itangast wrote:This is not a one time situation issue - once I had about 50 armies in different stacks (all well organized with good bonuses making my armies 2-3 str better than opponent.) and I had them eliminated by 50 armies in stacks mainly consisting of 1 turn armies... (the popular lt. cavalry :)
My opponent didnt even bother with adding a pegasi to his stacks, just throw any army present at me.


BTW, if I re-run the above program and change the stack 1 strength to 5 (lt Calv + Pegasi) vs strength 4 (all lt Calv) the winning percentage drops to 78%. So the Pegasi roughly increases your odds from 50% to 78%. It's well worth the investment to add one to your stack.

Itangast wrote:Simply put: there is no incentive to build good stack when the lesser armies work so well....


100% true. Of course this was true for Warlords 2 as well. Quantity mattered much more than quality. 1 turn units are by FAR the best units in the game to make. They were in Warlords 2 as well. The exceptions are spiders/minotaurs on city defense and bonus units like demons/pegasi.

The only exception is a VERY powerful hero stack consisting of all +4 bonus overall (Dragon + hero) and units with at least 7+ strength so they are 11-12 with the bonus. That's VERY hard to get right now but will probably be easier once blessing comes into play.

Itangast wrote:A strategy likely to win; would be plundering all cities you conquer and buy light cavalry in them, it will be loads of armies to move in the end but you will probably have the advantage....


I definitely buy oodles of Lt Calvary due to the 3 strength, large move, open combat bonus. They are unbalanced at the moment. As I said in another thread, they should be reduced to 2 strength with +2 open bonus so they are less useful on defense/attacking cities.

Itangast wrote:As I said - It would be great if we could evaluate 18 sided battles rolls...


Incidentally, I changed the dice roll to be out of 18 instead of 20 (as you asked for). Guess what. The winning percentage for the 6 vs 4 stack changed by only 1% to increase to 94%. So it really doesn't help in *this* kind of battle (It would matter MUCH more beneficial in hero battles where you might have all 9-12 strength units).

In reality, I suspect the dice rolls in the game aren't very random right now. Hopefully SnotlinG/Piranha has a chance to do a similar test to what I did above.

Itangast wrote:- While playing "Bullrun" and select "no allies as production". Some ally cities still exist: dragons, devils, archons and fire ellies. These neutral cities are guarded by a 0 str unit.


That's partially my fault. I set those 4 special cities to have that production. Regardless of what you set in the game options, those cities are set to have those units in them (all other cities are random). Same with the starting capitol cities for sides not in play. Originally I envisioned setting all capitol production to avoid Wizards in the capitol. But it only works right now on neutral cities so capitols of sides not in use get the production I set.

Anyway, I guess there is a bug with the 'no allies' option when the map designer sets production in cities. Code will have to be added to re-do production on those cities.

Itangast wrote:
- The unicorn does not neglect the Elephant +2 group in open, which it should imo.


Technically, the Elephant is giving a stack bonus, not a terrain bonus. So the Unicorn can't negate it because it only negates terrain bonus's. You'll need a Devil to negate the Elephant.

In other words, the Elephant bonus does not stack with a Pegasi/Demon +1 stack bonus but does add to the Open terrain bonus Calvary get (lt Calv are 6 strength with an Elephant in the open).

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: Battle balance

Postby Ansgar » Fri Jul 09, 2010 10:21 pm

Hi all,

New member here... brother of "Itangast" and a player of Warlords since the Amiga days :)

Congrats on making quite a nice WL-clone in just a web-browser (!!) ... very impressive !


I don't know any specifics on the code or calculations - but can confirm that "something"
in regards to battle-calculations could do with a bit of tweaking/testing to make the game
more fun & playable (even though I was at the right end of the stick in the mentioned battles :twisted: )

Right now, the game favours "hornet nest chaos" style of play, which is a bit sad since there
is so much strategic power in the old game-concept as we know it.

Maybe these calculations wont matter that much once ruins/items/questing/temples are introduced,
but right now there is a problem.


... and again, thx for putting up the work of making this available! Great fun !

/Ansgar
Ansgar
 
Posts: 2
Joined: Mon Jul 05, 2010 12:43 pm

Re: Battle balance

Postby Itangast » Fri Jul 09, 2010 10:38 pm

You could be right about the random numbers being out of order. Its up to the devs to prove you're wrong... :)

Anyways I will be glad to evaluate alternative battle rolls setups... Yes testing > theory :p

Changing Lt. Cavalry to STR 2(+2 open) is a good change, I agree. Even though Lt. cavalry is being mentioned a lot , the problem is not related to this specific unit - just wanted to point that out...
Itangast
 
Posts: 51
Joined: Sun Apr 04, 2010 5:51 pm

Re: Battle balance

Postby KGB » Sat Jul 10, 2010 1:32 am

Itangast,

I know you don't just mean the problem is only the Lt Cavalry and that it was just used for your example.

I think one thing long time Warlorders like ourselves (I also played War1 on the Amiga) keep remembering is a fully completed game with magic items and the ability to get +5 stack bonus's rather easily due to heroes/blessings/allies/quests etc. So they really just remember 1-2 super flying hero stacks with speed items warping around the board killing everything.

We have to remember this game is still far from complete yet. The big bonus's are still hard to achieve because there aren't quests/allies in ruins/items etc. Those things will come in time.

The other thing is that without FOW and/or Hidden Map it's easy to see exactly where your enemy is weak and so you know where to attack. Once FOW and/or Hidden Map enters the game in Beta 3, I suspect a lot of issues are going to get sorted out or won't end up being nearly the problem people think they are.

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am

Re: Battle balance

Postby piranha » Wed Jul 21, 2010 1:46 pm

We are using this function to make our dice rolls: http://se2.php.net/manual/en/function.mt-rand.php

I can't really comment on the randomness but I don't think the php function is broken. I run the function and the number it returns is the number you see in the scroll to the right.
I'm absolutely no guru with this type of stuff, but my own experience is that with 1000 tests there is quite a lot of room for randomness left. I did some tests of 1000 runs and I got numbers that are +-15 very often and +-20 now and then.

My own experience is that warlords (1 on amiga and 2 DLX on pc) have too much randomness in the battles. I know we stopped playing warlords 1 because we were unhappy with the battle randomness. We did a bit of test with castles with 28-32 units in that were attacked by a good hero stack and the result could go any way. One side could crush the other or the reverse. We thought it was too much random to be fun.
Before we started working on this version we played w2 DLX and have played it while making our game and the randomness is just as crazy there.

In my opinion there is no goal to make the battle calculation exactly like warlords just because thats they way the original handled it.

I want the outcome from battles to be more predictable than it is now.

I think we will have 2-3 different systems in beta3 and you can choose which one when you host. This is probably the best way to figure out improvements over the current one.

I think we are going to try with a system where units have different HP, perhaps 1 turn units 3HP, 2turn 4HP, 3turn 5HP and so on. All your units will heal when you start your turn but not between battles.
User avatar
piranha
Site Admin
 
Posts: 1188
Joined: Fri Feb 12, 2010 9:44 pm

Re: Battle balance

Postby KGB » Wed Jul 21, 2010 5:36 pm

Piranha,

piranha wrote:We are using this function to make our dice rolls: http://se2.php.net/manual/en/function.mt-rand.php


Thanks for that link. I'll do some reading up on it.

piranha wrote:I can't really comment on the randomness but I don't think the php function is broken. I run the function and the number it returns is the number you see in the scroll to the right.


Scroll to the right? Not sure what you mean by that. I don't see anything on the right.

piranha wrote:I'm absolutely no guru with this type of stuff, but my own experience is that with 1000 tests there is quite a lot of room for randomness left. I did some tests of 1000 runs and I got numbers that are +-15 very often and +-20 now and then.


Some of the randomness depends on the seed value. Are you for example re-seeding the generator once a day? Once per game load (ie each time someone starts their turn do they get a custom random seed), once per battle etc.

I added the following to my code

Code: Select all
int main(void)
{
   int outlier = 0;
   int totals[20];

   srand(time(NULL));

   for (int i=0; i<20; i++)
   {
      totals[i] = 0;
   }
   for (int i=0; i<1000; i++)
   {
      totals[(rand()%20)]++;
   }
   for (int i=0; i<20; i++)
   {
      printf("%d %d's  ", totals[i], i+1);
      if (totals[i] < 35 || totals[i] > 65) outlier++;
   }
   printf("\n");
   printf("The number of outliers is %d\n", outlier);
}


And I get:
40 1's 44 2's 60 3's 52 4's 62 5's 53 6's 60 7's 57 8's 43 9's 45 10's 43 11's 45 12's 52 13's 48 14's 55 15's 49 16's 38 17's 53 18's 50 19's 51 20's
The number of outliers is 0

49 1's 42 2's 54 3's 49 4's 43 5's 52 6's 56 7's 48 8's 47 9's 51 10's 62 11's 52 12's 47 13's 55 14's 43 15's 51 16's 47 17's 57 18's 47 19's 48 20's
The number of outliers is 0

55 1's 46 2's 55 3's 68 4's 45 5's 47 6's 49 7's 59 8's 46 9's 48 10's 51 11's 39 12's 56 13's 44 14's 56 15's 45 16's 51 17's 51 18's 48 19's 41 20's
The number of outliers is 1

59 1's 49 2's 53 3's 56 4's 59 5's 44 6's 43 7's 44 8's 40 9's 36 10's 58 11's 44 12's 53 13's 54 14's 56 15's 46 16's 45 17's 56 18's 46 19's 59 20's
The number of outliers is 0

59 1's 50 2's 39 3's 43 4's 48 5's 48 6's 54 7's 56 8's 48 9's 51 10's 52 11's 49 12's 43 13's 54 14's 50 15's 48 16's 53 17's 60 18's 51 19's 44 20's
The number of outliers is 0

So I got one outlier (15+ off the average value of 50) in 5 runs of the program. That's about what I average if I run my program once every 3-4 seconds (to allow the random seed time to change based on the clock for the next running).

Not sure it proves anything one way or another about the random function itself but if you are getting a lot more outliers then it would seem to indicate that maybe you need to reseed more or less often.

piranha wrote:My own experience is that warlords (1 on amiga and 2 DLX on pc) have too much randomness in the battles. I know we stopped playing warlords 1 because we were unhappy with the battle randomness. We did a bit of test with castles with 28-32 units in that were attacked by a good hero stack and the result could go any way. One side could crush the other or the reverse. We thought it was too much random to be fun.


That's interesting. Mostly because Warlords 1 used a maximum dice roll of 10 instead of 20. I would have expected that to mean much smoother results and far fewer outliers.

piranha wrote:In my opinion there is no goal to make the battle calculation exactly like warlords just because thats they way the original handled it.

I want the outcome from battles to be more predictable than it is now.


I think everyone wants this.

But predictable to me means that if 8 identical units fight (8 light infantry vs 8 light infantry) then the outcome shouldn't be one side wins with 4-8 units left. It means one side should win with 3 or fewer units left. That's because 75% of all possible outcomes have one side or the other winning with 3 or fewer units left.

piranha wrote:I think we are going to try with a system where units have different HP, perhaps 1 turn units 3HP, 2turn 4HP, 3turn 5HP and so on. All your units will heal when you start your turn but not between battles.


This doesn't do anything to make battles more predictable. All this does is make 2, 3, 4 turn units MUCH better. If that's what you are trying to achieve with predictable then it will work. But if you want to prevent wild swings in outcomes this won't help in the least.

Again, here is some code I wrote modified to show 8 light infantry fighting 8 light infantry. This time it counts only the number of units remaining for the winner.

Code: Select all
nt main(void)
{
   int hitsStack1 = 16;
   int hitsStack2 = 16;
   int strStack1 = 2;
   int strStack2 = 2;
   int winsStack1 = 0;
   int winsStack2 = 0;
   int unitsLeftStack1 = 0;
   int unitsLeftStack2 = 0;
   int avgUnitsLeft[9];


   srand(time(NULL));

   for (int i=0; i<9; i++)
   {
      avgUnitsLeft[i] = 0;
   }
   
   for (int i=0; i<10000; i++)
   {
      while (hitsStack1 > 0 && hitsStack2 > 0)
      {
         int rollStack1 = (rand()%20) + 1;
         int rollStack2 = (rand()%20) + 1;
         
         if (rollStack1 <= strStack1 && rollStack2 > strStack2) hitsStack2--;
         if (rollStack2 <= strStack2 && rollStack1 > strStack1) hitsStack1--;
      }
      
      if (hitsStack1 == 0)
      {
         winsStack2++;
         unitsLeftStack2 = unitsLeftStack2 + (hitsStack2+1)/2;
         avgUnitsLeft[(hitsStack2+1)/2]++;
      }
      if (hitsStack2 == 0)
      {
         winsStack1++;
         unitsLeftStack1 = unitsLeftStack1 + (hitsStack1+1)/2;
         avgUnitsLeft[(hitsStack1+1)/2]++;
      }
      
      hitsStack1 = 16;
      hitsStack2 = 16;
   }

   for (int i=1; i<9; i++)
   {
      printf("%d %d's  ", avgUnitsLeft[i], i);
   }
   printf("\n");
}


Running the code I get
2918 1's 2661 2's 2179 3's 1369 4's 622 5's 222 6's 27 7's 2 8's

So you can see that winning with 3 or less units left is 2918+2661+2179=7758 or 77.58% of the time. 4 or less units left is 7758+1369 = 91.27%.

Now when I changed the hit points from 2 to 4 (16 to 32) and ran again I got
2844 1's 2699 2's 2127 3's 1395 4's 676 5's 222 6's 37 7's 0 8's

Virtually the same results. There is still going to be a 10% chance one side wins with 5+ units left and a 25% chance one side wins with 4+ units left.

So what you have to decide is whether or not you want to fix THIS problem. This is the problem to me that is the biggest issue. The fact that you can get those outlier cases where someone gets WAY too lucky with the result.

The answer to me is you have to ignore the outliers and completely re-do the battle. The only question is whether you set the outlier case at 90% or 75% or 80%.

I honestly don't think the other problem of needing more hits for 2,3,4 and 5 turn units is that big of an issue if you just adjust slightly some of the strengths/bonus's on a few units like Light Cavalry, Elves, Elephants etc. In my mind making 2,3,4 and 5 turns units better is completely separate issue from battle balance and will require a LOT more work in terms of redoing unit strengths, costs, turns etc (Lets just say after 10 years DLR is STILL trying to get it perfectly right so that 50% of the 100+ units in DLR aren't completely useless).

Please, please, please on the system where you get 3 hits for 1 turn, 4 hits for 2 turns and 5 hits for 3 turns cap the hits at 5. An Archon/Devil/Dragon with 7 hits is just going to be WAY too hard to kill. I ran some numbers and an 8 strength Devil (7 plus his stack bonus) with 7 hits is 90% likely to kill 8 light infantry (2) strength and 50% likely to kill 8 heavy infantry (3) strength. I can definitely say that under this combat system the most valuable unit in the game is going to be Ghosts for their critical chance skill as it will be the only way to slow down big stacks.

KGB
KGB
 
Posts: 3030
Joined: Tue Feb 16, 2010 12:06 am


Return to Game discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Not able to open ./cache/data_global.php