All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 The Death Slug (Posted on 2012-10-18)
While playing a Dungeons and Dragons knockoff, you find yourself alone in a cave, with a hungry death slug inching toward you! Your job is to figure out the probability of survival, and formulate the most optimal strategy for escape.

The cave is too narrow to get around the slug, and the path behind you is sealed due to a cave-in. Your only option is to fight.

By its movement rate, you judge the slug will need 5 rounds before you will be cornered (You act before the slug in each round).

You have a shortsword and a bow with arrows, and begin the encounter with the shortsword equipped. The sword deals more damage, but the bow and arrows have better accuracy and defensiveness (until you are cornered). If you choose to use the bow, you must spend one round putting the sword away and drawing the bow. Switching back from the bow to the sword also requires a round. For the sake of argument, assume the cave is well-lit.

Assume that each round, the slug advances toward you, forcing you into the corner, no matter what else occurs that round. For the first 5 rounds, the slug can attempt to bite if you have attacked with the sword. It cannot attack if your move was firing with the bow or switching weapons. After the first 5 rounds, you are “cornered” and the slug can attempt to bite no matter what your action was for that round.

Here are the probabilities of the various attacks:

Shortsword
----------
Chance to hit while not cornered: 90%
Chance to hit while cornered: 90%
Damage on successful hit: 1d10 (1dm means you roll 1 m-sided die)

Bow
---
Chance to hit while not cornered: 100%
Chance to hit while cornered: 50%
Damage on successful hit: 1d6

Slug bite
---------
Chance to hit while not cornered & you attacked with sword: 50%
Cannot attack while not cornered if you switched weapons or fired bow: 0%
Chance to hit while cornered (regardless of your weapon/action): 90%
Damage on successful hit: 1d4

The slug begins the encounter with 20 hit points. You begin the encounter with 11 hit points. Assume death occurs immediately upon reaching 0 hit points (this applies to both you and the slug). If the slug dies, you survive and have succeeded, no matter how few hit points you may have left (even if it’s only 1). If you die, you have failed.

Here is an example of one scenario:

Standing: Slug has 20 hit points, I have 11

Round 1
Action: sword (90% chance to hit)
Result: hit
Damage: 7 (1d10)
Slug: bite (50% chance to hit)
Result: miss
Damage: N/A
Standing: Slug has 13, I have 11
We get one step closer to the corner.

Round 2:
Action: switch weapons
Result: N/A
Damage: N/A
Slug: N/A (cannot bite)
Result: N/A
Damage: N/A
Standing: Slug has 13, I have 11
We get one step closer to the corner.

Round 3:
Action: bow (100% chance to hit)
Result: hit
Damage: 2 (1d6)
Slug: N/A (cannot bite)
Result: N/A
Damage: N/A
Standing: Slug has 11, I have 11
We get one step closer to the corner.

Round 4:
Action: switch weapons
Result: N/A
Damage: N/A
Slug: N/A (cannot bite)
Result: N/A
Damage: N/A
Standing: Slug has 11, I have 11
We get one step closer to the corner.

Round 5:
Action: sword (90% chance to hit)
Result: hit
Damage: 4 (1d10)
Slug: bite (50% chance to hit)
Result: hit
Damage: 4 (1d4)
Standing: Slug has 7, I have 7
We get one step closer to the corner. I am now cornered.

Round 6:
Action: switch weapons
Result: N/A
Damage: N/A
Slug: bite (90% chance to hit)
Result: hit
Damage: 3 (1d4)
Standing: Slug has 7, I have 4

Round 7:
Action: bow (50% chance to hit)
Result: hit
Damage: 5 (1d6)
Slug: bite (90% chance to hit)
Result: hit
Damage: 2 (1d4)
Standing: Slug has 2, I have 2

Round 8:
Action: bow (50% chance to hit)
Result: hit
Damage: 4 (1d6)
The slug is now dead and I have succeeded.
Standing: Slug has 0, I have 2

A) What is the best strategy to maximize your chances of surviving regardless of how many hit points you might end up retaining, and how many hit points would you expect to have following such a strategy?
B) Suppose instead we measure your ending hit points minus the slug's ending hit points and label this D, and your goal is to devise a strategy that maximizes D. Just to be clear, if you survive with 2 hit points (as in the example above), D is 2; if the slug survives with 2 hit points, D is -2. How would your strategy differ from (A)?

 No Solution Yet Submitted by Dustin No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 Possible solution | Comment 2 of 3 |
• Once cornered, the slug will attack the same whatever you do, so it's far better to use the sword (higher hit % and greater potential damage)
• Before being cornered, it may be better to use the bow (100% hit rate and prevention of slug bite)
With this in mind, I tried three basic strategies:
• Sword all the way
• Bow all the way
• Bow until cornered
Along with some variations of the third in terms of when/if to switch back to the sword. I then ran 1,000,000 trials of each to try and get some idea of their relative effectiveness.

In terms of highest chance of survival (i.e. % of trials won), the best strategy was to immediately switch to the bow, and then switch back to the sword the first round you are cornered (round 6) which had a success rate of about 96%. Sword only was next best (about 93%), with bow only a distant third (about 73%).

The question of "how many hit points you would expect to have following such a strategy" (emphasis mine) was a little ambiguous, so I've looked at a few different measures:
• mean score over all trials was 7.1 hp
• mean score over won trials was 7.4 hp
• median score over all trials was 8 hp
• mode score over all trials was 7 hp
• expected value was 6.5 hp
I haven't looked much at part B, other than to note that when using only the bow - while you're much less likely to win - when you do win, the most likely outcome is 11 hp.

 Posted by snark on 2012-11-29 18:18:08

 Search: Search body:
Forums (0)