AC vs EV calculator and its outcomes


Ask fellow adventurers how to stay alive in the deep, dark, dangerous dungeon below, or share your own accumulated wisdom.

Slime Squisher

Posts: 377

Joined: Friday, 1st February 2013, 21:08

Post Friday, 12th June 2015, 17:04

AC vs EV calculator and its outcomes

Warning for number and optimization haters: avoid the link!

Armour or Dodging? Strength or dexterity? As a min-maxer, I was bothered for quite a while which stats/skills to choose. One couldn't probably go wrong by taking Strenth and Armour on Hill Orc wearing chain mail. On the opposite, Dodging and Dexterity are Spriggan's natural choices. What about less obvious combinations? What to do with unusual artifacts +10str / +10dex? Well, I made a little google spreadsheet, which solved my dilemmas. You can find it here:
https://docs.google.com/spreadsheets/d/ ... edit#gid=0

My thoughts are:
- You can't go very wrong by taking "obvious" choices. In the end it seems that you might be just several points below optimal AC/EV.
- (Edit) You want to use an armour with encumbrance lower or equal to your strength unless there is clear incentive to do otherwise (high enchantment/useful ego etc).
- even 4 points of difference between aptitudes do not mean that training worse skill is stupid. Usually you should just stop training few levels earlier.
- Large species are not sentenced to poor EV. Training requires just a bit more effort than usual.
- Taking several points of armour skill is very cheap and almost always pays back. Possible exceptions are only a) troll/ogre in robe b) statue form
- If you cast spells, strength and intelligence are definitely better than dexterity no matter what spreadsheet says!

Technical notes:
- for some reason final AC/EV differs sometimes by +/-1. I guess it has something to do with rounding - I did not use excerpts from code, but wiki.
- armour might have improper encumbrance/base AC. These changed several times recently. If you find some outdated values, PM me.
- experience needed to improve a skill does not follow strictly any mathematical function. My approximations lead to some small errors.
- if you find the spreadsheet useful, but bugged, let me kow - I'll see what can be done.
(Edit) EV should be now calculated properly for 0.16+ version.
Last edited by Bart on Saturday, 13th June 2015, 06:57, edited 2 times in total.

For this message the author Bart has received thanks: 7
and into, Berder, GlassGo, nago, quik, rockygargoyle, Sandman25

Ziggurat Zagger

Posts: 11111

Joined: Friday, 8th February 2013, 12:00

Post Friday, 12th June 2015, 17:17

Re: AC vs EV calculator and its outcomes

Is "Other EV" used? I changed it to -30 but recommended final dodging level was not changed, it still says 15 and "Your EV" is -26.

Ziggurat Zagger

Posts: 11111

Joined: Friday, 8th February 2013, 12:00

Post Friday, 12th June 2015, 17:32

Re: AC vs EV calculator and its outcomes

"Dodging skill needed to overcome initial armour penalty"
I believe this was removed in 0.16. Now you can get +EV in CPA with low dodging.

Edit. http://git.develz.org/?p=crawl.git;a=co ... bf21ebb6df

Slime Squisher

Posts: 377

Joined: Friday, 1st February 2013, 21:08

Post Friday, 12th June 2015, 19:00

Re: AC vs EV calculator and its outcomes

Sandman25 wrote:Is "Other EV" used? I changed it to -30 but recommended final dodging level was not changed, it still says 15 and "Your EV" is -26.

Not really. You can fill "other EV" if you do not like adding the value on your own (as "other EV" is only added without any multiplications). The sheet also considers -26 to be better than e.g. -31.

Sandman25 wrote:"Dodging skill needed to overcome initial armour penalty"
I believe this was removed in 0.16. Now you can get +EV in CPA with low dodging.

Edit. http://git.develz.org/?p=crawl.git;a=co ... bf21ebb6df

I used 0.16 version which apparently did not have this fix yet. If you can provide me with new formulas, I can update the calculator.

For this message the author Bart has received thanks:
Sandman25

Ziggurat Zagger

Posts: 11111

Joined: Friday, 8th February 2013, 12:00

Post Friday, 12th June 2015, 19:04

Re: AC vs EV calculator and its outcomes

Have you opened http://git.develz.org/?p=crawl.git;a=bl ... 385153d04e? It looks like formulas are explained there in comments

Edit. Sorry, I am not C++ expert, it is hard for me to extract the formulas from source code.

Barkeep

Posts: 3890

Joined: Wednesday, 14th August 2013, 23:25

Location: USA

Post Friday, 12th June 2015, 20:06

Re: AC vs EV calculator and its outcomes

Bart wrote:My thoughts are:
- You can't go very wrong by taking "obvious" choices. In the end it seems that you might be just several points below optimal AC/EV.
- You want to use an armour with encumbrance lower or equal to your strength even if you do not train dodging.
- If your armour is very heavy, avoiding dodging is a safer option, because you need a lot of skill to see any results at all... unless you have plenty of dexterity and strength.
- even 4 points of difference between aptitudes do not mean that training worse skill is stupid. Usually you should just stop training few levels earlier.
- Large species are not sentenced to poor EV. Training requires just a bit more effort than usual.
- Taking several points of armour skill is very cheap and almost always pays back. Possible exceptions are only a) troll/ogre in robe b) statue form
- If you cast spells, strength and intelligence are definitely better than dexterity no matter what spreadsheet says!


I don't hate numbers, but I've never been drawn to min-maxing in Crawl. I experiment with some things in wizmode, and tried to test certain hunches with that, but I didn't worry too much about optimization, so much as simply achieving "consistently non-bad play."

Nonetheless, with obvious exception of the last sentence, these accord very closely with how I came to feel about these matters, based on my own experiences and guided by the advice of experienced players. FWIW.

For this message the author and into has received thanks:
Lasty

Ziggurat Zagger

Posts: 8782

Joined: Sunday, 5th May 2013, 08:25

Post Friday, 12th June 2015, 20:21

Re: AC vs EV calculator and its outcomes

Bart wrote:- You want to use an armour with encumbrance lower or equal to your strength even if you do not train dodging.
This is absolutely not true. The reasoning that your minmaxing target should be AC+EV is flawed. Surely you would rather wear wear plate armour on D:1 with HEGl (11 AC, 4 EV) than leather (4 AC, 13 EV)!

That said the spreadsheet is cool as long as you ignore the bad advice

For this message the author duvessa has received thanks: 3
and into, nago, Sar

Slime Squisher

Posts: 377

Joined: Friday, 1st February 2013, 21:08

Post Friday, 12th June 2015, 20:55

Re: AC vs EV calculator and its outcomes

duvessa wrote:
Bart wrote:- You want to use an armour with encumbrance lower or equal to your strength even if you do not train dodging.
This is absolutely not true. The reasoning that your minmaxing target should be AC+EV is flawed. Surely you would rather wear wear plate armour on D:1 with HEGl (11 AC, 4 EV) than leather (4 AC, 13 EV)!

That said the spreadsheet is cool as long as you ignore the bad advice

Umm, you got me, but not completely. Firstly, I wrote this comment thinking of situations where AC and EV is somewhat more balanced and character more developed. Besides, there are several potentially deadly situations where 11 AC, 4 EV is not necessarily better than 4 AC, 13 EV:
- melee poison sources
- blowgunners
- elec weapons
- centaurs
- every fight where accuracy is important, e.g. against Orc priest
That said, I also favour AC over EV, but not blindly, not with low str and with no Armour skill.

Sandman25 wrote:Have you opened (...)
Edit. Sorry, I am not C++ expert, it is hard for me to extract the formulas from source code.

I tried to create new formulas, but I'm too stupid to make them work based on the comments only... I'll try to figure out what's wrong tomorrow.

Sar

User avatar

Ziggurat Zagger

Posts: 6418

Joined: Friday, 6th July 2012, 12:48

Post Friday, 12th June 2015, 20:58

Re: AC vs EV calculator and its outcomes

I'm pretty sure you don't get poisoned if the base attacks fails to do damage. At least that's how it seemed to work last time I tested it with an adder.

bel

Cocytus Succeeder

Posts: 2184

Joined: Tuesday, 3rd February 2015, 22:05

Post Friday, 12th June 2015, 21:04

Re: AC vs EV calculator and its outcomes

I think if you wear early plate you basically cannot die to anyone other than orc priest.

For this message the author bel has received thanks:
partial

Ziggurat Zagger

Posts: 8782

Joined: Sunday, 5th May 2013, 08:25

Post Friday, 12th June 2015, 21:16

Re: AC vs EV calculator and its outcomes

Bart wrote:melee poison sources
as Sar said you don't get the poison if you don't get the damage, unless it's a weapon of venom in which case you had tons of advance warning so why are you getting hit by it?
Bart wrote:blowgunners
sure (I wonder if these not caring about AC anymore was even intentional...)
Bart wrote:elec weapons
ok but you had tons of advance warning so why are you getting hit by it
Bart wrote:centaurs
i dont know of a way to fsim this but i am pretty sure it is wrong, unless you mean centaurs with wands of lightning maybe
Bart wrote:every fight where accuracy is important, e.g. against Orc priest
orc priest melee checks AC last time I checked, you might as well tell people to drop their shield

Bart wrote:Besides, there are several potentially deadly situations where 11 AC, 4 EV is not necessarily better than 4 AC, 13 EV:
well I never said there weren't in the first place

Slime Squisher

Posts: 377

Joined: Friday, 1st February 2013, 21:08

Post Friday, 12th June 2015, 21:57

Re: AC vs EV calculator and its outcomes

I would immensely enjoy a game where all enemies wearing dangerous weapons were courteous enough to let me escape instead of forcing to fight them!

I'm curious about centaurs myself. There's no GDR for ranged, but of course EV also does not guarantee avoiding arrows. Somehow I remember few humiliating deaths to centaurs shooting through plate, but that might be just a bias. At least I do not see plate to be clearly advantageous, esp. against centaur with (my favourite) poisonous arrows.

Orc priest's smite bypasses AC. The longer you fight them, the more you get smitten. I just recalled that draining and distortion are cool effects to add to the list, too.

(I still somewhat agree with you - i.e. AC is a bit better)

Tartarus Sorceror

Posts: 1774

Joined: Tuesday, 23rd December 2014, 23:39

Post Saturday, 13th June 2015, 02:49

Re: AC vs EV calculator and its outcomes

Thanks, Bart, for this calculator. Even if it doesn't choose the exact optimal value, it does show you how much of the different skills you can get for given experience, and how that affects your ev and ac.

Indeed, maximizing AC+EV is not optimal. You can see details of how much AC and EV matter versus some different enemies, at viewtopic.php?t=14989 . Note the third reply where I give the absolute defensive value as well as marginal defensive value. You can see that maximizing AC+EV is not too bad in most cases.

That thread is missing a crucial diagram: the adder. Here is the absolute defensive value chart for an adder.

Image

As you can see, AC is worth far more versus an adder than EV is, due to the adder's low damage (5). 10 ev is worth a bit over 5 defensive value (DV), and 10 ac is worth over 15 DV, three times as good.

This chart is not exactly right, because it neglects the poison damage dealt by the adder. AC reduces damage to 0 a lot, just as EV does, so I think that AC would have a similar effect on poison and it would not change the picture a lot. My code is not at present set up to handle poison damage.
streaks: 5 fifteen rune octopodes. 15 diverse chars. 13 random chars. 24 NaWn^gozag.
251 total wins Berder hyperborean + misc
83/108 recent wins (76%)
guides: safe tactics value of ac/ev/sh forum toxicity

For this message the author Berder has received thanks:
Bart

Slime Squisher

Posts: 377

Joined: Friday, 1st February 2013, 21:08

Post Saturday, 13th June 2015, 06:35

Re: AC vs EV calculator and its outcomes

The change mentioned by Sandman25 is strange.

Shall race have impact on armour dodge penalty or not?
  Code:
 First, calculate base dodge bonus (linear with dodging * stepdowned dex),
+ * and armour dodge penalty (base armour evp, increased for small races &
+ * decreased for large, then with a magic "3" subtracted from it to make the
+ * penalties not too harsh).


Later in the code I see unadjusted_body_armour_penalty():
  Code:
const int armour_dodge_penalty = you.unadjusted_body_armour_penalty() - 3;

  Code:
if (armour_dodge_penalty >= str)
+        return dodge_bonus * str / (armour_dodge_penalty * 2);
+    return dodge_bonus - dodge_bonus * armour_dodge_penalty / (str * 2);

Calculator returns now proper values if I indeed take unadjusted armour penalty.

Am I missing something, or did somebody else miss that?

EDIT: @Berder, as much as you are right about defense value, you (and Duvessa previously as well) forget about offensive value and variety of encounters in crawl. Let me then run fsim for you:

Leather armour, mentioned HEGl vs adder:
2.0 AvEffDam (attacking), 0.7 AvEffDam (defending)
Plate armour, the same fight:
1.6 AvEffDam (attacking), 0.5 AvEffDam (defending).
In case of HEGl, the difference between Str and encumbrance is not yet very high, but for kobold the advice to wear plate would be plainly bad.

Additional test against ogre, HeGl in leather:
3.2 AvEffDam (attacking), 4.7 AvEffDam (defending)
Plate armour, the same fight:
3.1 AvEffDam (attacking), 6.8 AvEffDam (defending).

How does that make plate armour and AC obviously better?

For this message the author Bart has received thanks: 2
Berder, Sandman25

Tartarus Sorceror

Posts: 1774

Joined: Tuesday, 23rd December 2014, 23:39

Post Saturday, 13th June 2015, 17:02

Re: AC vs EV calculator and its outcomes

Bart wrote:Leather armour, mentioned HEGl vs adder:
2.0 AvEffDam (attacking), 0.7 AvEffDam (defending)
Plate armour, the same fight:
1.6 AvEffDam (attacking), 0.5 AvEffDam (defending).
In case of HEGl, the difference between Str and encumbrance is not yet very high, but for kobold the advice to wear plate would be plainly bad.

Yeah - plate is too heavy, considering that adders are very high ev so the loss of to-hit matters more. Try scale mail instead, and you see almost no reduction in damage output but a substantial increase in defenses, for the same sum ac+ev=17.

Additional test against ogre, HeGl in leather:
3.2 AvEffDam (attacking), 4.7 AvEffDam (defending)
Plate armour, the same fight:
3.1 AvEffDam (attacking), 6.8 AvEffDam (defending).

Well, ogres are very different from adders. AC is highly effective against adders due to their low damage. Ogres in contrast deal huge damage, making AC less effective. (Although I'm not sure how much to trust fsim vs an ogre considering that they use weapons - which weapon will fsim equip them with? Could one test use a GSC and the other just use a giant club or unarmed?) I would also almost never fight a pre-lair ogre in melee unless there is no choice (e.g. naga) or unless I happen to be extremely strong, so they aren't as important an enemy as adders are.
streaks: 5 fifteen rune octopodes. 15 diverse chars. 13 random chars. 24 NaWn^gozag.
251 total wins Berder hyperborean + misc
83/108 recent wins (76%)
guides: safe tactics value of ac/ev/sh forum toxicity

Vestibule Violator

Posts: 1601

Joined: Sunday, 14th July 2013, 16:36

Post Saturday, 13th June 2015, 18:37

Re: AC vs EV calculator and its outcomes

Berder wrote:(Although I'm not sure how much to trust fsim vs an ogre considering that they use weapons - which weapon will fsim equip them with? Could one test use a GSC and the other just use a giant club or unarmed?)

You can create an ogre, and then fsim against the created one. (I don't know if the previous poster had done that, though)

Halls Hopper

Posts: 78

Joined: Friday, 17th April 2015, 23:46

Post Wednesday, 24th June 2015, 11:53

Re: AC vs EV calculator and its outcomes

I've filled in the spreadsheet with the info of my current char, a HOAK. It recommends that I should pick up Strength on level up. It surprises me because I've always been told to pick Dex on non-caster characters. Can someone explain? Thanks.

Image
User avatar

Ziggurat Zagger

Posts: 4358

Joined: Wednesday, 23rd October 2013, 07:56

Post Wednesday, 24th June 2015, 12:07

Re: AC vs EV calculator and its outcomes

Your strength is 15 and armour encumbrance is -15 so I guess raising Str a couple of points more sounds reasonable.
DCSS: 77: ...SpWz{OgGlTrMo}{CeWnMfBeMiSk}DrEE{GrFiFoGl}DgEnFeNe{OpGlHuSu}DDAr
HaCKSpAEGrTmDgFEDsCjGhMoHuVM{HaAMBaEn}{HuMoHOWn}DsWzDDHu{DgWnGnBe}FeIE
{MiEnMfCj}SpNeBaEEGrFE{HaAKTrCK}DsFESpHu{FoArNaBe}FeEE{HOIEMiAE}GrGlHuWrGnWr
Bloat: 4: RaRoPrPh{GuStGnCa

For this message the author Sprucery has received thanks:
quik

Slime Squisher

Posts: 377

Joined: Friday, 1st February 2013, 21:08

Post Wednesday, 24th June 2015, 13:29

Re: AC vs EV calculator and its outcomes

It surprises me because I've always been told to pick Dex on non-caster characters.

Bad advice.

Heavy armour penalizes gains from dodging. The penalty is determined from encumbrance and STR. Decreasing penalty might give you better results than increasing Dex/Dodging.

Purely in terms of EV, a better rule is to rise strength until it is at least equal to the encumbrance of body armour. After that, raise dex mostly if you plan high Dodging and add STR point once in a while. Also there's a step-down function applied at Dex>24, so higher Dex is questionable.

I wouldn't make the calculator if the answer was obvious!

For this message the author Bart has received thanks:
quik

Vestibule Violator

Posts: 1601

Joined: Sunday, 14th July 2013, 16:36

Post Wednesday, 24th June 2015, 19:09

Re: AC vs EV calculator and its outcomes

Bart wrote:
It surprises me because I've always been told to pick Dex on non-caster characters.

Bad advice.

Heavy armour penalizes gains from dodging.

Has that changed? Last time I looked at this, the penalty from armor and the bonus from dodging had nothing to do with each other, except for one particular interaction: the armor penalty isn't allowed to reduce your EV below a certain threshold, so Dex/Dodging don't have an effect until you're above that threshold.

Slime Squisher

Posts: 377

Joined: Friday, 1st February 2013, 21:08

Post Wednesday, 24th June 2015, 21:19

Re: AC vs EV calculator and its outcomes

It has changed in the commit mentioned by Sandman25.

  Code:
+ * If the player's strength is greater than the armour dodge penalty, return
+ *      base dodge * (1 - dodge_pen / (str*2)).
+ * E.g., if str is twice dodge penalty, return 3/4 of base dodge. If
+ * str = dodge_pen * 4, return 7/8...
+ *
+ * If str is less than dodge penalty, return
+ *      base_dodge * str / (dodge_pen * 2).
+ * E.g., if str = dodge_pen / 2, return 1/4 of base dodge. if
+ * str = dodge_pen / 4, return 1/8...

Return to Dungeon Crawling Advice

Who is online

Users browsing this forum: No registered users and 17 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.