Simulating Chain Heal – Preliminary Results

Sim, simming me/sim, simming me/sim, sim, simming you.

As I’ve been going on about for ages, I’ve been developing a simulation of Chain Heal’s application in Warlords of Draenor raid-type situations, including the variation on raid positioning and decision making. Today, I’ll be taking a look at some preliminary results of the simulation which I spent the Easter weekend simming and analysing.

CH_Bouncing2

Not long ago Dayani posted a nice first analysis of Chain Heal and it’s interaction with Riptide and High Tide. If you haven’t read it already, it’s fantastic and you should. Either way, she made an interesting point about how Chain Heal’s mean healing changed as the number of Riptides on the raid increased. However, by her own admission she wasn’t able to mathematically extend her analysis to any size of raid or number of Riptides;

To analyse the full range of possible number of injured targets versus possible number of Riptides on the raid would take me way too much brainpower, and that’s what I’m hoping the computer models being worked on by Stoove and Haileaus will allow us to do in a more efficient manner.

I had a stroke of inspiration and suggested that the general case for calculating the number of High Tide targets might be described by something known as a “hypergeometric” distribution. I will leave the gory details to a future post, but if anyone has heard of a “binomial” distribution, you could consider the hypergeometric to be a logical extension of that.

So, to the data. I will frame this in terms of an experiment, with a Hypothesis to be tested. For this post, I’ll look at whether the hypergeometric distribution does give us an insight into the realities of how Chain Heal behaves.

Hypothesis:

The distribution of the number of High Tide targets in a given Chain Heal application is described by a hypergeometric distribution.

Caveats:

The distribution is expected to hold only in the limit that the number of Chain Heal casts tends to infinity, and in the case where all possible chains can connect.

Expected Behaviour:

The simulated (i.e. “realistic”) distribution observed will show analogous behaviour to the hypergeometric distribution, with large deviations expected due to raid spread, critical decision making, and player deaths.

Another critical component to the “realistic” case is that Riptide numbers must be maintained rotationally, and so we expect variations in the number of active Riptides during the fight to increase the variation of the results.

If we set the simulation to prioritize Riptide targets for Chain Heal, we should expect the number of

Test Methodology:

A believable raid situation is simulated;

  • A group of 20 players spread roughly within 12.5yds of the centre, taking low but persistent damage each second.
  • Each simulation ran for 120 second of simulated time with a time step of 1ms.
  • To reduce artefacts due to outliers in the RNG of raid positioning and health distributions, 10 different raid layouts and for each of these 10 different sets of initial healthbars were generated.
  • Each situation was simulated 500 times in order to get reasonable statistics from Chain Heal’s random targeting.
  • The mean of the distribution function for raid health was 0.5 (50%) and the standard deviation of the (Gaussian) line-shape was 0.1 (10%).
  • Tanks were not simulated in this raid.
  • The Glyph of Riptide was chosen.
  • The Glyph of Chaining was not chosen.

The “goal” for total number of Riptides to maintain during the fight was varied from 0 to “as many as possible”. The simulated Shaman also prioritized players under 10% health over casting Riptide or casting Chain Heal upon a Riptide target (which makes sense).

The number of players who were healed by High Tide was counted for each Chain Heal cast (~0.2M casts for each specified number of active Riptides) as well as the number of Riptides up at the time of each cast completion.

Results:

I measured the mean frequency for each number of Tide Pool targets in each simulation and plotted against the number of Tide Pool targets. On the same graph, I plotted the mean frequency of each number of Riptides active upon the raid.

On the same plots, I included the hypergeometric distribution with a height multiplied by 50 – the total number of Chain Heal casts varied over the simulations so this was a reasonable value to set in order to compare the distributions but is not meant to show an exact expected distribution for these plots. I chose this approach because the variation in number of casts over the simulations was not trivial to account for (you’ll have to take my word on that one).

I also included error bars which show the standard deviation in each measurement made from this sim (that took quite a lot of effort). If two error bars overlap significantly along the vertical axis, you can’t say with confidence that they are distinct from each other. This is useful because it allows us a good look at how variable the results in a real raid situation are likely to be.

Below are the plots for each number of Riptides which the simulated Shaman tried to maintain on the raid. Try to look out for plots where the blue points (the hypergeometric distribution) follow roughly the same pattern as the red points (the measured values). I don’t expect that any of the measurements will be exactly coincident with the hypergeometric distribution.

max0_rescaled_Hypergeo max1_rescaled_Hypergeo max2_rescaled_Hypergeo max3_rescaled_Hypergeo max4_rescaled_Hypergeo max5_rescaled_Hypergeo max6_rescaled_Hypergeo max7_rescaled_Hypergeo max8_rescaled_Hypergeo max9_rescaled_Hypergeo

These definitely aren’t the most elegant plots I’ve ever made, but they will serve the purpose of getting the message across. So you’ve glanced over them and seen that some plots are odd, and some clearly show the measured and approximated distributions showing similar patterns. Go back and have a look to see;

  1. Which plots did the distribution not show roughly the right shape?
  2. Of those, which ones had a distribution of n.o. applied RT’s which didn’t really match up to what they were supposed to (smooth, single peak value = maxnRTs, noted in the title).

Answers I got;

  1. maxnRTs = 4, 5, 7, and 9
  2. 5, 7, and 9.

But what does that mean?

Broadly speaking, it means that the main factor in whether the hypergeometric distribution was representative of the real behaviour was whether the Shaman maintained the expected number of Riptides upon the raid or not. In cases 5, 7, and 9, the simulated Shaman didn’t produce a spread of Riptides which met the goal of being consistent as well as at the specified number. In case 4, the reason it doesn’t look quite correct is that the simulated statistics were very close together and statistically indistinguishable. As a result, it’s sort of a null-result; neither a support of the hypothesis or against it.

The final plot is a particularly special case because everybody died. Well, the raid wiped fairly consistently. Lesson learned; do not spam Riptide to the exclusion of all else. We can also safely exclude this from our analysis henceforth; nobody will ever want to look at “how many Tide Pool targets will I get if I never cast Chain Heal?”

So the count of plots which support our hypothesis is 6, which don’t support it is 2, and there are two plots which neither support nor fail to support the hypothesis. Overall, then, it seems reasonable to conclude that hypergeometric distributions are a reasonable model for High Tide’s behaviour in a raid.

Of course, all of this comes with the caveat that we must apply this distribution in the full knowledge that you are never going to see exactly the hypergeometric distribution.

That’s it for now! Soon (TM) I’ll make a post describing how to implement this distribution if you want to do some theorycraft to look at the implications of this in more detail. In the mean time, if you want a sort-of introduction you can find a .pdf view and download here.

Advertisements

About stoove

A physicist, researcher, and gamesman. Likes to think about the mathematics and mechanics behind all sorts of different things, and writing up the thoughts for you to read. A competent programmer, enjoys public speaking and mechanical keyboards. Has opinions which might even change from time to time.
This entry was posted in Alpha/Beta News, Maths, World of Warcraft and tagged , , , , , , , , , , , , , , , . Bookmark the permalink.

4 Responses to Simulating Chain Heal – Preliminary Results

  1. Pingback: WoDsplosion! | UNconstant

  2. Pingback: To Craft a Sim – Part 4 | UNconstant

  3. Pingback: Hypergeometric Distribution: How and Why | UNconstant

  4. Pingback: To cast, perchance to Chain (Heal) | UNconstant

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s