Harpies as mage killers...something doesn't add up....

How to beat those cowardly High Elves?

Moderators: Layne, The Dread Knights

User avatar
Red...
Generalissimo
Posts: 3750
Joined: Wed Sep 02, 2009 3:09 pm
Location: Baltimore

Harpies as mage killers...something doesn't add up....

Post by Red... »

I've been meaning to post this query for a while, but for some reason have never got around to it until now.

I've read lots about using harpies as mage killers, but only tried it myself recently. Here's what occured to me as I did:

3 harpies get 6 attacks.
6 WS3 attacks usually hit on 4s = 3 hits.
3 S3 hits usually wound on 4s = 1.5 wounds.

So on average a unit of harpies rushing an unarmoured T3 mage will do 1-2 wounds. So half of the time, they will kill the mage, half of the time they won't.

That's actually quite unreliable in my opinion. The unit will usually be destroyed immediately after the charge (T3 and no armour save is not hard to kill), so you pretty much know that when you make that charge you're sacrificing the unit.

Now, I get that 5 harpies are just 55 points versus a mage's cost of 60-140 or so, but even so, their likelihood of killing a mage seems less reliable that I originally thought from reading people's posts on here.

So, I guess my long winded question is: am I missing something?
"While all answers are replies, not all replies are answers. So answer the question."

Don't be a munchkin?

Image

I am an Extraordinary Druchii Gentleman
User avatar
Calisson
Corsair
Corsair
Posts: 8820
Joined: Fri Mar 14, 2008 10:00 pm
Location: Hag Graef

Post by Calisson »

No, you have the stats right.
What you may be missing is the perception by the opponent of their vulnerability: what? my mage has 50% chances to be killed by a 55pts unit charging at 20"? :x
Winds never stop blowing, Oceans are borderless. Get a ship and a crew, so the World will be ours! Today the World, tomorrow Nagg! {--|oBrotherhood of the Coast!o|--}
User avatar
Tethlis
Malekith's Best Friend
Posts: 1444
Joined: Thu Aug 31, 2006 2:54 am
Location: Santa Barbara, CA

Post by Tethlis »

The whole concept of "mage hunting", like a lot of strategic discussion, tends to be oversimplified. It's sort of become a catch phrase that most people assume everyone should do, but never really go into detail about how to do it or whether it's really effective or not. It's probably pretty common to see something like:

"Dark Elves should never have to worry about magic, since we have great mage hunting and Ring of Hotek."

Sure, but it's certainly easier said than done. Especially in the current gaming climate, many armies have moved away from the standard T3, unarmored caster format. Daemon casters are either enormous fighting monsters, or tough characters with Regeneration, a Ward Save (or both) sitting in a Fear-causing unit that's almost impossible to break. Vamp Counts are pretty similar, since most of their casters are base Strength 5 with access to armor and the ability to heal wounds, or else are riding around in a regenerating zombie bucket on wheels. Lizardmen have mages that can have ethereal, regeneration, magic resistance 3, Terror or some fearsome combination thereof, which is pretty moot anyway since they're often thrown into a cold-blooded Stubborn regiment that excels at not dying. The other common loption for lizardmen is to have them ride around on the back of a triceratops with a magical flamethrower and a 2+ armor save.

So, by contrast, the concept of mage hunting might be universal, but the execution of it varies tremendously based on who you're facing. Many armies currently in circulation couldn't care less if their casters take a harpy charge.
There is no escape from Chaos. It marks us all.


Image
Image
Starphoenix
Warrior
Posts: 58
Joined: Sat Dec 20, 2008 5:07 pm
Location: Michigan

Post by Starphoenix »

I'd just add that even though you only kill a mage 50% of the time from combat - you can add to that the chance of breaking the mage and then running him down. You are usually winning by a least 1(numbers) possibly two; and unless you roll like me, most mages won't out-run a flying unit.

This gives you a better than 50% kill rate - still by no means a lock, but if some is dumb enough to leave a lone mage within charge range of my harps - I'd go for it.
"You can sleep when you're dead."
User avatar
Rabidnid
Malekith's Best Friend
Posts: 3023
Joined: Mon Nov 12, 2007 8:31 pm
Location: The Tower of Dust

Post by Rabidnid »

Starphoenix wrote:I'd just add that even though you only kill a mage 50% of the time from combat - you can add to that the chance of breaking the mage and then running him down. You are usually winning by a least 1(numbers) possibly two; and unless you roll like me, most mages won't out-run a flying unit.

This gives you a better than 50% kill rate - still by no means a lock, but if some is dumb enough to leave a lone mage within charge range of my harps - I'd go for it.


Running down a mage in the open isn't hard, you will inflict a wound or two and outnumber, so it will probably break and be run down if it doesn't die outfight.

Red's point is about charging a unit of harpies into a large enemy unit with a mage in the front rank, and then directing the attacks of the 3 harpies in BtB at the mage. Much more problematic.

When I think mage hunting as DE I'm more likely to use hydra teeth or bladewind, which also work against BSBs with their lightish armour.
"Luck is the residue of design"
User avatar
Bounce
Malekith's Best Friend
Posts: 1004
Joined: Sun Mar 09, 2008 3:40 am

Post by Bounce »

I would tend to agree that Harpy Kamikaze doesn't work very well.
A more successful and cheaper option is a block of 5 Witches.
Much shorter range tbh however the 3 in contact with the mage deal out 9 attacks. Odds are they will kill the mage and then some.
"I will embrace death without regret as I embrace life without fear"
ImageImageImage
User avatar
Rabidnid
Malekith's Best Friend
Posts: 3023
Joined: Mon Nov 12, 2007 8:31 pm
Location: The Tower of Dust

Post by Rabidnid »

Bounce wrote:I would tend to agree that Harpy Kamikaze doesn't work very well.
A more successful and cheaper option is a block of 5 Witches.
Much shorter range tbh however the 3 in contact with the mage deal out 9 attacks. Odds are they will kill the mage and then some.


An even cheaper option is 10-14 witches with a standard and muso, give them KB from the cob and they should wipe the whole unit out, mage and all - plus you get the unit back afterwards. I tend to have two units of witches around now, one on either flank. They can do an appalling amount of damage with KB or +1 attack for a 115 point unit.
"Luck is the residue of design"
User avatar
Timz
Cold One Knight
Posts: 218
Joined: Wed Jan 27, 2010 2:35 am

Post by Timz »

Bounce wrote:I would tend to agree that Harpy Kamikaze doesn't work very well.
A more successful and cheaper option is a block of 5 Witches.
Much shorter range tbh however the 3 in contact with the mage deal out 9 attacks. Odds are they will kill the mage and then some.


Maybe it's just me, but 5 witches sounds like a very bad idea.

They move slowly and even 1 unit shooting at it or 1 magic missile could kill most of the squad and cause a panic test.

5 naked T3 people on foot sounds like a complete free kill for an opponent.

50 points for 5 witch elves (5" move, 10" charge) and die to shooting instantly.
55 points for 5 harpies (20" speed) and die to shooting instantly.

The only time the 5 witch elves seem like a sound idea would be against an army that lacks any shooting or magic. For mage-hunting... that is kinda ruled out.

If your opponent can't kill 5 WE before they footslog into contact with his mages, then he's so bad he'd lose no matter what.



As for the initial topic, a 50% chance for a 55 point unit of harpies to kill a 160 point lvl.2 sorc w/ sac dagger would be way, way worth it.
To kill a 135 point lvl.2 sorc it's still a points pay-off for 110 points of harpies to guarantee a kill on it.

A harpy is a core slot and a wizard is a hero. If core slots easily dominated hero choices for the same points value no matter what, it'd be very unbalanced.


To contribute something to OP:
I've simulated a harpy attack in java. Just the first turn, 6 attacks on a normal T3 mage with 2 wounds.

The harpies succeeded in killing the mage on the charge 67% of the time. 2/3rds instead of the above-mentioned 50%. Quite an effective amount for 55 points, and there is no decrease in combat effectiveness if 2 harpies die.


The actual chance would also get the added percentage of the rare times that your 2 other harpies kill rank-n-files and you do 1 wound to mage. That 3 combat res has a chance to run down a unit of say, archers that a mage is in, or any weak troops.
Last edited by Timz on Wed May 19, 2010 6:23 am, edited 3 times in total.
Eglard
Corsair
Posts: 96
Joined: Mon Mar 16, 2009 7:05 pm

Post by Eglard »

Witches do not take panic tests. They are frenzied. Anyway I think that 5 witches are a bad idea, unless you screen them well. A bigger unit is much more useful.
User avatar
Red...
Generalissimo
Posts: 3750
Joined: Wed Sep 02, 2009 3:09 pm
Location: Baltimore

Post by Red... »

Thanks guys,

That's some really interesting replies.

Calisson: yes, that's certainly true, I do remember my opponent's face once I allocated all 6 attacks against his mage. If I did it enough times then people would learn to fear the harpies.

Tethlis, yes, that exactly it. I had read about it so many times that I had come to believe it was true (the point you make about increasingly hard mages is also very true, I hadn't realised it was on such a large scale though! wow :( ). I usually mage hunt differently, so will use harpies if I need to, but won't ever go into battle with just them as my only mage kilers again :)

Starphoenix: yes, true, good point, particularly against Tzeentch flying mages or mages who leave units. Doesn't work against mages in big blocks of warriors though, which is usually where they are sadly.

Rabinid: Yes, I hadn't considered either of those options (bladewind and hydra teeth). Both sound quite promising and less risky :) Will give them some thought.

Bounce: Yes, another interesting idea. I'm really glad I posted this now, lots of additional ways to mage kill for me to think about :)

Rabinid: Haha, this to be honest is actually how I currently mage kill at 2250. I take the ring, a scroll caddy and some nasty as heck melee units and - in the course of events - his wizards get destroyed without me really noticing. I tend to let the less important spells go through and then either scroll or dispel the really important ones that get past the ring.

Timz, yes you are right that a 55 point unit lost for a 120 point mage is a good trade. But if they only achieve it 50% of the time then it makes me a bit more reluctant to do it, especially as I usually only take a unit of harpies or two (only have 10 harpy models). It's also important to know that they won't work, so as I dont bring harpies as my only mage hunting kit.

I'm not sure how your java simulation gave you a 67% result, as 6 attacks, hitting on a 4 is an average of 3 hits. Wounding on a four is an average of 1.5 hits. No java simulation needed, that's a 50% success rate. [edit. Just re-read the end of your post: thats a valid point, but doesn't factor in for if the mage is in a unit of 1+ ranks, outnumbering and/or a standard. Probably best not to include other elements of CR at this stage of discussion.)

Eglard, yeah, I think 5-7 witches as a tactic is probably hard to pull off - still a very good strategy I think, but may need more skill than I have at present.
"While all answers are replies, not all replies are answers. So answer the question."

Don't be a munchkin?

Image

I am an Extraordinary Druchii Gentleman
User avatar
Demetrius
Malekith's Best Friend
Posts: 1070
Joined: Mon Jun 25, 2007 1:36 am
Location: Melbourne, Australia

Post by Demetrius »

Lets see, the only T3 unarmoured mages that exist are...

Dark Elves- well we are them.
Wood Elves- Normally sitting in a unit of bows that shoot and kill the harpies to stand and shoot.
High Elves- ASF in a unit, will kill the harpies before they can strike
Skink Priests- Normally has a 2+ save from sitting on an Engine, or in a big unit of blowpipe skinks that kill or panic off harpies from S&S
Empire- In my experiance are normally battle mages with a decent armour save and/or has a unit attachment that flank charges you.
Bretts- Normally only a scroll caddy anyway that sitts in the middle of a lance. Good luck getting to her.

In short, dont waste your harpies. Instead, charge the unit the mage is in with a heavy hitter boosted by the cauldron and put the harpies behind the unit so when they break, they get caught imediately.
Eglard
Corsair
Posts: 96
Joined: Mon Mar 16, 2009 7:05 pm

Post by Eglard »

Skaven, VC and O&G also have T 3 mages. Night goblin shammans can be very good. Warlock engineers are very powerful (at least used to be). Necromancers are not so good, but they often have vanhels, so it is good to get rid of them.
User avatar
Red...
Generalissimo
Posts: 3750
Joined: Wed Sep 02, 2009 3:09 pm
Location: Baltimore

Post by Red... »

Interesting points Demetrius :) I hadn't realised it had become that bad! I was playing against another DE player at the time, which ironically enough sounds like one of the easiest mage to kill from the list you've given! (another reason dark elves suck at magic...).

Eglard, yes thats true. I suppose though that a gobbo mage is an even bigger risk to try and kill, as they're so cheap (55 points base for a night gobbo mage I believe!)
"While all answers are replies, not all replies are answers. So answer the question."

Don't be a munchkin?

Image

I am an Extraordinary Druchii Gentleman
User avatar
Timz
Cold One Knight
Posts: 218
Joined: Wed Jan 27, 2010 2:35 am

Post by Timz »

Red... wrote:Timz, yes you are right that a 55 point unit lost for a 120 point mage is a good trade. But if they only achieve it 50% of the time then it makes me a bit more reluctant to do it, especially as I usually only take a unit of harpies or two (only have 10 harpy models). It's also important to know that they won't work, so as I dont bring harpies as my only mage hunting kit.

I'm not sure how your java simulation gave you a 67% result, as 6 attacks, hitting on a 4 is an average of 3 hits. Wounding on a four is an average of 1.5 hits. No java simulation needed, that's a 50% success rate. [edit. Just re-read the end of your post: thats a valid point, but doesn't factor in for if the mage is in a unit of 1+ ranks, outnumbering and/or a standard. Probably best not to include other elements of CR at this stage of discussion.)


I assure you, the statistics probably are not wrong. Double checking entirety of the code again though.

It uses a reliable random number generator.

6 attacks
if (rolls 4,5,6)
then if (rolls 4, 5, 6)
subtract 1 from mage wounds.
if mage wounds equals zero, flag he's dead.

loop it to run 100,000+ times.

Clear results 2/3rds of time mage dead. Someone with a better mastery of conditional probability might want to explain why this is so, because I can't.

Actual probability is a lot more complex than 6 * 1/2 * 1/2 = 1.5

If that was absolutely true, then if a coin has a 50% chance to come up heads or tails and you flip it twice, you'd have a 100% chance to have gotten a tails and a 100% chance to have gotten a heads result.

That is obviously not accurate.
Bitterman
Beastmaster
Posts: 319
Joined: Mon Apr 19, 2010 9:08 pm

Post by Bitterman »

Clear results 2/3rds of time mage dead. Someone with a better mastery of conditional probability might want to explain why this is so, because I can't.


There's a bug in your code.

Actual probability is a lot more complex than 6 * 1/2 * 1/2 = 1.5


Not really it's not, no. For the average case, that's pretty much all there is to it. For any individual case, you can do anything between 0 and 6 wounds, but over many iterations, on average you'll do 1.5. If your code hasn't got that result, it's wrong. If it's coded as per the pseudocode you gave, the bug is probably in the RNG (or the conversion from the random number to a D6).

If that was absolutely true, then if a coin has a 50% chance to come up heads or tails and you flip it twice, you'd have a 100% chance to have gotten a tails and a 100% chance to have gotten a heads result.


No, that's completely untrue. On any given flip there's a 50% (1/2) chance of heads. After two flips, there's a 75% chance (3/4) of at least one head. 7/8 after three flips. Note it never reaches 100%. It is possible, though highly unlikely, to flip a fair coin a million times and not get a single head. This is fairly simple maths.
User avatar
Red...
Generalissimo
Posts: 3750
Joined: Wed Sep 02, 2009 3:09 pm
Location: Baltimore

Post by Red... »

Bitterman: thanks, I thought I was going insane for a moment.


Timz: I think this is an occasion of 'if it seems unlikely then it probably is'.

Anyway, I can't believe I'm doing this, but:

Image

As you can see, there is a 25% chance of a harpy doing a wound to a mage with one attack. Multiply that by 6 (3 haries with two attacks each) and you have 1.5 wounds.

I am also quite familiar with stats and do know that it is therefore technically true that - as the outcome of one harpy attack in no way influences the outcome of another harpy attack - there is technically never more than a 25% chance of a harpy attack doing a wound to a mage (or a coin ever having more than a 50% chance of being either heads of tails).

Yes, technically if you flip a coin once and you end up with heads then there is as much chance on the next flip that it will come out heads as it will tails, indeed if you flip a coin nine times and it comes out heads every time, there is still a 50% chance that it will come out heads the next time too.

However, when a random probability test is carried out multiple times, we do know that the odds are likely to reflect the outcomes suggested by the maths: in fact the more times iterations are run, the closer it should go. If you were to make a calculation for how many times the coin would come out heads BEFORE making any flips, it would be right to say it should come out as 5 times heads and five times tails.


I'm wondering if your code is doing something along the lines of terminating the test each time that the mage dies. So if the test comes out as negative (ie the harpies do just one or no wounds) then it keeps on going until the mage dies (the 50% mark), but if the test comes out positive (ie the harpies do 2 wounds after 2-5 attacks rather than only after 6) it terminates that sequence of the loop and so creates an artificial probability result (above 50% probability). Now we're moving in the wacky realm of programming, however, where I must confess I am a bit out of my depth. All I know is that your simulation has got a bug somewhere with this one....sorry :(
"While all answers are replies, not all replies are answers. So answer the question."

Don't be a munchkin?

Image

I am an Extraordinary Druchii Gentleman
User avatar
Timz
Cold One Knight
Posts: 218
Joined: Wed Jan 27, 2010 2:35 am

Post by Timz »

int harpySuccess = 0;
int mageWounds = 2;
double numTests = 0;
double successRate = 0;
double totalSuccesses = 0;

do
{//attack mage

numTests++;
mageWounds = 2;
harpySuccess = 0;

for (int x = 1; x < 7; x++)
{//hit mage 6 times


if((generator.nextInt(6)+1) >= 4)
{//to hit

if((generator.nextInt(6)+1) >= 4)
{//to wound

mageWounds--; //subtracts 1 from mage wounds
if (mageWounds < 1)
{
harpySuccess = 1;
totalSuccesses++;
}

}//to wound end
}//to hit end
}//hit mage 6 times end

}//attack mage end
while (numTests < 100000);


successRate = (totalSuccesses / numTests);


Checking for flaws again.
The attack happens 6 times, I've tested that.
It rolls a dice correctly, nextInt returns 0-5, add 1 you get 1-6.

It's pretty simple as far as code goes and I can't find any error with it.

Def. working so far:
1. Random Number Generator - correctly rolling 1-6 And rolling reasonably average results, had it roll a bunch of dice, add sum, divide by number of rolls: came out to be 3.5 exactly like it should be.
2. The for loop which makes the harpy attack 6 times. I did that same loop to have it print "Hello" or whatever and it prints it exactly 6 times.
3. Keeping track of how many tests have been done, value is correct.
Last edited by Timz on Thu May 20, 2010 1:48 pm, edited 5 times in total.
User avatar
Timz
Cold One Knight
Posts: 218
Joined: Wed Jan 27, 2010 2:35 am

Post by Timz »

Bitterman wrote:
There's a bug in your code.

I've posted the code. Currently pulling each piece apart separately into a new program and testing every piece of it. Haven't found any flaws yet, will continue until it's 100% certain it works or doesn't work. My feeling is it's probably someone oversimplifying probability theory.


Not really it's not, no. For the average case, that's pretty much all there is to it. For any individual case, you can do anything between 0 and 6 wounds, but over many iterations, on average you'll do 1.5. If your code hasn't got that result, it's wrong. If it's coded as per the pseudocode you gave, the bug is probably in the RNG (or the conversion from the random number to a D6).

I find it hard to believe that the well-tested java RNG is off by like 20%. I just tested it, all values are being 1-6, and the average value from 100000 rolls is 3.5-ish. That rules out the problem being the RNG.

No, that's completely untrue. On any given flip there's a 50% (1/2) chance of heads. After two flips, there's a 75% chance (3/4) of at least one head. 7/8 after three flips. Note it never reaches 100%. It is possible, though highly unlikely, to flip a fair coin a million times and not get a single head. This is fairly simple maths.


The chance for Heads on a flip is 0.50, so using the flawed math of multiplying, you'd have a 100% chance to get at least one heads with two flips.
The chance for Tails on a flip is 0.50, so you'd ALSO have a 100% chance to get at least one tails with 2 flips.


This math is the same logic applied to the killing the mage thing. (Orange is the faulty logic which saves time)

"Flip a coin twice you'll get one heads" is no diff than multiplying 6 x 0.25 x 0.25 to determine mage is dead or not.

That's no different than the situation with the harpies.
Gotta go to the DMV to take test for motorcycle permit, maybe I'll create a simpler program for proof when I get back.
Bitterman
Beastmaster
Posts: 319
Joined: Mon Apr 19, 2010 9:08 pm

Post by Bitterman »

You've allowed the harpies to kill the wizards multiple times. There's your bug:

if (mageWounds < 1)
{
harpySuccess = 1;
totalSuccesses++;
}

So if the harpies inflict 6 wounds on the mage, that counts as 5 successes. You should break out of the for loop as soon as there is a success, that will fix the bug. (Note that your pseudocode said "if mage wounds equals zero" whereas actual code says "if mage wounds less than 1", which is very different).

[Edit] OK, I originally wrote something quite cruel here and on reflection, it was unnecessary so I am removing it. I will simply say that Googling "basic statistics" will probably reveal far more than I can be bothered to here. This stuff isn't really up for discussion, it's mathematical fact.

On a wider note... as you learn to program you will undoubtedly find that your results don't match what's expected. Most programmers when they start out (myself included, way back then) immediately conclude that the expected results were wrong, not the output of the program. You will become a better programmer once your default assumption is that the code is wrong, not the expectations. Coders are only human and make mistakes. Nowadays, when I make a mistake, I always, always, always assume that my own code is wrong first - even in apparently simple code like this - and I'm usually right about that. :) It's a lesson you will learn eventually (or else you won't make it as a programmer!) and my gentle advice to you would be to learn it sooner rather than later.
Bitterman
Beastmaster
Posts: 319
Joined: Mon Apr 19, 2010 9:08 pm

Post by Bitterman »

Red... wrote:I'm wondering if your code is doing something along the lines of terminating the test each time that the mage dies. So if the test comes out as negative (ie the harpies do just one or no wounds) then it keeps on going until the mage dies (the 50% mark), but if the test comes out positive (ie the harpies do 2 wounds after 2-5 attacks rather than only after 6) it terminates that sequence of the loop and so creates an artificial probability result (above 50% probability). Now we're moving in the wacky realm of programming, however, where I must confess I am a bit out of my depth. All I know is that your simulation has got a bug somewhere with this one....sorry :(


Heh... I've just noticed that Red predicted the exact nature of your bug even before the code was posted. Red, you should be a programmer my friend! :D ;)
User avatar
Red...
Generalissimo
Posts: 3750
Joined: Wed Sep 02, 2009 3:09 pm
Location: Baltimore

Post by Red... »

I still don't get why a complex piece of code is needed for this, particularly as it is wrong. I don't know why its wrong, nor can I wade through your code to find it (looks like Bitterman has done a good job here), but I do know the outcome is wrong. If you add 2 and 2 and get 5, it doesn't matter how many times your simulator tells you it is correct, it is still wrong.

The chance for Heads on a flip is 0.50, so using the flawed math of multiplying, you'd have a 100% chance to get at least one heads with two flips.
The chance for Tails on a flip is 0.50, so you'd ALSO have a 100% chance to get at least one tails with 2 flips.

Probabilities work in sequence. So if you have a 50% chance of getting a result with one coin and a 50% chance of getting a result on another coin you have a 25% chance of getting any particular outcome...

With one coin, you have two possible outcomes (H=heads, t=tails):

H
T

That's a 50% chance for each outcome.

With 2 coins, you have 4 possible outcomes

HH
HT
TH
TT

So, four possible combinations, that's a 25% chance of any of them (and, as Bitterman points out: 75% chance of getting a tails, 25% of getting only heads).

And so on.

Complex computer code aside, this is how probabilities work. You:

a) look at all of the possible results from a sequence of random inputs
b) count how many results meet the criteria threshold
c) divide the number of results that meet the criteria threshold with the total number of possible results.
That provides a percentage, and that percentage provides the scientific odds of a particular result happening.

But, that all said, probabilities have a way of not playing out in real life. Ever rolled 3 dice to cast a spell and rolled three 1s? Mind boggling, but it happens! That's, in part, why we play the game. Should we worship Khaine? Khorne? Slannesh? No, we should pledge ourselves to the DICE GODS and all their fickle ways =)

Heh... I've just noticed that Red predicted the exact nature of your bug even before the code was posted. Red, you should be a programmer my friend!

Thanks ;) But I suspect its less because of my knowledge of programming and more because its exactly the kind of thing I would do when writing a programme! Ever see the film Office Space where the software guy messes up their money laundering programme by getting the decimal point in the wrong place? That would totally be me :P
"While all answers are replies, not all replies are answers. So answer the question."

Don't be a munchkin?

Image

I am an Extraordinary Druchii Gentleman
User avatar
Timz
Cold One Knight
Posts: 218
Joined: Wed Jan 27, 2010 2:35 am

Post by Timz »

Bitterman wrote:
Red... wrote:I'm wondering if your code is doing something along the lines of terminating the test each time that the mage dies. So if the test comes out as negative (ie the harpies do just one or no wounds) then it keeps on going until the mage dies (the 50% mark), but if the test comes out positive (ie the harpies do 2 wounds after 2-5 attacks rather than only after 6) it terminates that sequence of the loop and so creates an artificial probability result (above 50% probability). Now we're moving in the wacky realm of programming, however, where I must confess I am a bit out of my depth. All I know is that your simulation has got a bug somewhere with this one....sorry :(


Heh... I've just noticed that Red predicted the exact nature of your bug even before the code was posted. Red, you should be a programmer my friend! :D ;)


He was certainly close. He never mentions overkill. After the helpful advice, I've made sure it can't overkill by only adding when the mage is at exactly 0 wounds, but now the results show mage only dies 46.5% of the time (that's w/ hundreds of thousands of times run.)

And yes, OFFICE SPACE is everyday life when dealing with code. >.<
Bitterman
Beastmaster
Posts: 319
Joined: Mon Apr 19, 2010 9:08 pm

Post by Bitterman »

...and 46.5% is a lot closer to 50% than 67%. I suspect if you added a few zeroes onto the number of iterations (1000000 or more instead of 100000) it'd go towards 50%, as it should.

Also, if you're getting 46.5% every time, it suggests you need to seed your random number generator from the clock - I don't know for sure how the Java RNG works, but it won't be truly random, so you need to make sure it has a different seed every time it runs except when intentionally looking for reproducible results.

Either way, 50% is proven even to those who don't believe in maths.
User avatar
Timz
Cold One Knight
Posts: 218
Joined: Wed Jan 27, 2010 2:35 am

Post by Timz »

Okay, so say the harpies have 12 attacks. What % chance do they have of killing a mage?

According to your earlier math, (25% to put a wound on a mage with a harpy attack and 6 attacks.) then 12 harpy attacks has more than a 100% chance to kill a mage.

That means it'd be impossible to not kill a mage with 2 squads of 5 harpies.

THAT is why I do not buy the simple math being proposed.

I quote
As you can see, there is a 25% chance of a harpy doing a wound to a mage with one attack. Multiply that by 6 (3 haries with two attacks each) and you have 1.5 wounds.
Bitterman
Beastmaster
Posts: 319
Joined: Mon Apr 19, 2010 9:08 pm

Post by Bitterman »

Timz wrote:Okay, so say the harpies have 12 attacks. What % chance do they have of killing a mage?

According to your earlier math, (25% to put a wound on a mage with a harpy attack and 6 attacks.) then 12 harpy attacks has more than a 100% chance to kill a mage.

That means it'd be impossible to not kill a mage with 2 squads of 5 harpies.

THAT is why I do not buy the simple math being proposed.


No - you've still not understood how it works. Again, Google "basic probability". Red gave a reasonably good simple explanation with coin tosses above, but that didn't seem to get through...

Each attack has a 25% chance of a wound, agreed? So on average, 12 such attacks would do 3 wounds. Of course, averages are unreliable, and you want the exact probability. Well, when dealing with probabilities you don't add them together (and no-one but you has claimed you should!), you multiply using a 0..1 scale.

In this case, with a 0.25 chance of wounding, that's a 0.75 chance of not wounding; 0.75 ^ 12 (0.75 * 0.75 * 0.75..., not 0.5 * 12) is ~0.03, so there's a 3% chance the wizard will take zero wounds (and therefore a 97% chance he will take at least one wound).

In order to calculate whether he will take at least two wounds and be slain, it gets a bit more complex as you have to use the inclusion/exclusion principle and count the number of times he takes zero or one wound from twelve attacks, but off the top of my head it would be 1 - ( ( 0.75 ^ 12 ) + ( 0.75 ^ 11 * 0.25 ) ) or about 0.96 => 96%. I might have overlooked something there.
Post Reply