Monday, August 15, 2011

Other Initiative Bonuses and the Next Step

This afternoon, in a spasm of post-computer modeling boredom, I computed the remaining probabilities for +2, +3, and +4 initiative bonuses.  A +5 initiative bonus is uninteresting because it is equivalent to the orc automatically losing initiative unless he has some bonus that negates the elf's bonus.  In that case, though, it becomes statistically equivalent to the 0, +1, +2, +3 or +4 case.  The results of these and my previous investigations are summarized below.  They were all arrived at by methods identical to the previous posts.

Figure 1: The probability of the elf winning initiative as a function of any bonuses.

Figure 2: The probability of the elf tying initiative as a function of any bonus.

To proceed any further in my effort, I need to define some more of the properties of my elf and my orc.  I need to determine their weapons, hit points, and armor.  The orc is easy:

Orc(1): AC: 6, HD: 1, 8 hp, MV: 120'(40'), ATT:  1 sword, DAM: 1d8, Save As: F1, ML: 8, ALIGN: Chaotic.

That's just reading straight out of the rules and assuming maximum hit points.  I figure the orc is a good "standard" bad guy against which to gauge the capabilities of a character.  Similarly, I'll assume a "standard" level 1 PC elf with max hit points for now.  The PC elf will be wearing leather armor with a shield giving him an armor class of 7, which is slightly inferior to the orc.

According to the Labyrinth Lord attack tables, the Orc must roll a 12 or better to hit the elf, and the elf must roll a 13 or better to hit the orc.  This implies P(elf hits orc) = 40%, and P(orc hits elf) = 45%.  This places the orc at a slight advantage in terms of hitting ability. Given the previous observations that what really makes the difference in initiative, besides bonuses, is the ability to survive in a tied initiative round, I can't help but wonder if this slight advantage will translate into a noticeable advantage in the end for the orc.

At this point, the system is completely defined.  Neglecting magic and missiles (which I left out), I have everything necessary to fill out a probability tree for the turn.  The goal will then be to create a process so that I can analyze trade offs.  Then I can ask questions like, rationally, when is a two handed weapon worth losing initiative?  Irrational, "I think battle axes are cool!" is perfectly fine.  Lord knows, PCs should not feel constrained to act rationally, and resolving all of a character's choices to a series of optimized tactical trade offs is probably one of the least interesting and fun ways to play the game.  None the less, the question remains there to be answered what's the best decision?

Whatever results I get from this experiment are going to be driven by the assumptions going into them.  What's the best weapon to carry against an orc, might not be the best weapon to carry against another elf.  I'm also neglecting magic.  Really, whether the results of this experiment gives any indication of the "best" choice anything is a subject of debate.  Any "best" choice would certainly be highly situation dependant.  I imagine one day compiling a list of optimized equipment for various foes.  I doubt I'll do it, though.

For my next step, I'm going to boldly forgo proving that the combat turn is a Markov process and just fill out the tree assuming each state of the system is annotated by the elf's hit points and the orc's hit points.  Hence, on turn one, the beginning state is E(6)O(8) for "Elf: 6 hp, Orc 8hp."  There are 63 possible states.  I guess now I need to fill out my probability tree...

Sunday, August 14, 2011

Initiative in a One on One Combat with a +1 Bonus

What is the impact of an initiative bonus on combat?  I'll start to answer this question using the same sorts of observations I made previously. Assuming a +1 bonus, the initiative matrix looks like this:

Figure 1:  Initiative Outcomes Assuming a +1 Bonus to the Elf
The PC elf now has an appreciable advantage in the intiative phase.  P(Elf Wins) = 21/36 = 58.33%, which is a pretty substantial edge if you can maintain the advantage through the later phases of combat round.  It is, by no means decisive.

Figure 2: Elf Wins Initiative 58.33% of the Time with a +1 Bonus
The advantage would be even more substantial if the elf enjoyed further combat advantages enabling good survivability in the event of tied initiative.

Figure 3: Elf Wins Ties Initiative 13.89% of the Time with a +1 Bonus

Does a +1 bonus enable a serious "first strike" advantage?  Probably not.  But over several combat rounds would the cumulative effect become noticable?  You'd notice it. particularly if you were strong enough to withstand a tied round now and then.  If that was the case, then it'd be pretty decisive.   

Beginning with the Combat Round

To begin my analysis, I decided to start with the combat round.  I plan to start off very simply and describe a notional encounter between a PC elf and an orc.  This one-on-one renders questions about group versus individual initiative irrelevant for now.  I expect I'll get back to that some other time.  I'll flesh out their characteristics further as it's necessary.  The first step of a combat round is initiative.    To determine who wins initiative, we roll 1d6 and who ever's roll is higher wins.  If both sides roll the same number, actions are assumed to occur simultaneously.  There are 6^2=36 possible outcomes in the initiative phase.

Figure 1: Initiative Outcomes in a One-on-One Encounter
What is the probability of the elf winning initiative and getting one up on the orc?  As the above table shows, the elf wins, 15 out of 36 times.  Therefore P(Elf Wins) = 15/36 = 41.67%.  Since the system is symmetric the orc has an equal probability of winning initiative.

Figure 2: Elf Wins Initiative in 15 Possible Outcomes
 The diagonal elements of the matrix of possible outcomes constitutes ties.  There are 6 possible ties.  Therefore P(Tie) = 6/36 = 16.67%. 

Figure 3: Elf and Orc Tie Initiative in 6 Possible Outcomes

 The first effect of group initiative is that neither the orc nor the elf is likely to win initiative.  This isn't to say that neither side has an advantage due to initiative.  If for some reason (armor, spells, special abilities, etc.) the elf might have an advantage in the event of a tie, the initiative might actually slightly favor the PC because the probability of winning or tie-ing, P(win ^ tie)=58.33%. 

Assuming that's not the case, however, most of the time a PC is not going to get any "first strike" advantage, therefore to be really effective in combat, a PC needs to survivable against a monster's first strike or the outcome of a tied round. A one-on-one combat in D&D, therefore is about survivability.  With no initiative bonuses, combat as an ambiguous scenario, where if any side has any advantage at all it results from other combat related advantages such as armor class, hit points or saving throws. 

Certain special abilities entail the player or DM applies a small bonus to their initiative rolls.  A dexterity score of 13 entails a +1 bonus.  How large are the effect of bonuses in initiative?  I'll have to play with that calculation later, though. 

Friday, August 12, 2011

Starting The Mathematics of Old School D&D

Much ink has been spilt on how old school Dungeons and Dragons favors clever players who act cautiously in the face of terrible danger.  But what actually constitutes playing cleverly?  What course of action is, in fact, wise?  What is an effective precaution?  Cleverness can consist of acting imaginatively and thinking "out of the box." While that kind of thinking often leads to entertaining gaming sessions, a lot of D&D is also about learning to play the odds effectively.   A more modest sort of cleverness is about making good decisions to improve one's probability of survival in a hostile and constantly evolving environment.  Both players and dungeon masters must learn to make decisions in the face of uncertainty, simply by virtue of the randomness inherent in the game's rules. 

This isn't to say I'm intending to blog on power-gaming or meta-gaming.  That's because creating over-powered characters in old school D&D is fairly difficult.  They're created randomly by one of several processes.  Rather, I intend to focus on rational decision making and planning for dungeon masters and players.  I'm also curious about the implications some house rules have on the outcome of combat.  I want to steer away from questions that may involve thinking too much about "realism" through the lens of physics.  As far as I'm concerned, talking about "realism" in a fantasy game is a waste of time.  What does realism mean in an imaginary world where unicorns and pixies frolic, anyhow?  I'm more concerned purely with what the rules entail and any insights thinking about things mathematically might provide for the sake of an improved afternoon of play.

I'll try to present charts, graphs and equations to explain my thinking.  If I'm feeling ambitious, I may even present the results of the odd Monte Carlo model.  If I'm wrong, feel free to call me out on it.  My hope is that this doesn't turn into me pedantically droning on about stochastic processes and turns into an interesting discussion of rational decision making, tactics, techniques and the interesting mathematical problems presented by old school roleplaying games in general, and D&D specifically.  Hopefully the end result will be a practical advice that will contribute to better dungeons, better dungeon masters, and smarter players.