fsim data dump


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

bel

Cocytus Succeeder

Posts: 2184

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

Post Thursday, 12th January 2017, 03:44

fsim data dump

fsim is useful, but the displayed numbers are fairly limited. I modified fsim to dump all the fight data to a file (in addition to the normal display). This works only in the "quick fight" mode ("&f", not "&F"). Here's the patch.

bel

Cocytus Succeeder

Posts: 2184

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

Post Thursday, 12th January 2017, 03:47

Re: fsim data dump

Using the data dump one can answer various questions (all keeping in mind the limitations of fsim scenarios).

One measure I think is more useful than avEffDam is "number of rounds in which you die". I computed this measure as follows. I ran fsim (looked at the defensive rounds) for 10000 (say) rounds. I then partitioned the rounds into "fights" The "fight" ends whenever the total damage you take is >= your HP, or 500 auts pass. I then store how many rounds the "fight" lasts.

Here is the application of this measure to one of my recent hellcrawl games. Here is the dump:
Spoiler: show
  Code:
 Dungeon Crawl Stone Soup version 0.19-a0-2013-g488b080 (tiles) character file.

bel5 the Summoner (Tengu Summoner)                 Turns: 12394, Time: 01:32:45

Health: 68/68      AC:  7    Str:  8    XL:     11   Next: 44%
Magic:  21/21      EV: 25    Int: 18    God:    Sif Muna [*.....]
Gold:   767        SH:  5    Dex: 16    Spells: 8/22 levels left

rFire  . . .      SeeInvis .    a - +1 falchion (elec)
rCold  . . .      Faith    .    K - +2 leather armour {rPois}
rNeg   . . .      Spirit   .    q - +0 buckler
rPois  +          Reflect  .    (helmet restricted)
rElec  .                        g - +1 cloak
rCorr  .                        (no gloves)
MR     .....                    (boots unavailable)
Stlth  ++........               (no amulet)
                                y - ring of wizardry
                                T - +3 ring of evasion

@: flying quickly and evasively, divine energy, quick
A: beak, talons 3, able to fly 1
a: Stop Divine Energy, Renounce Religion


You are on level 11 of the Dungeon.
You worship Sif Muna.
Sif Muna is aware of your devotion.
You are not hungry.

You have visited 2 branches of the dungeon, and seen 12 of its levels.

You have collected 979 gold pieces.
You have spent 212 gold pieces at shops.

Inventory:

Hand Weapons
 a - a +1 falchion of electrocution (weapon)
 b - a +0 trident
 u - a +1 dagger of speed
 A - a +0 dagger of holy wrath
 G - a +3 dire flail of crushing
 X - a +1 antimagic short sword
Missiles
 v - 39 curare-tipped needles
 B - 168 javelins (quivered)
 W - 2 throwing nets
Armour
 g - a +1 cloak (worn)
 q - a +0 buckler (worn)
 E - a +2 shield
 K - a +2 leather armour of poison resistance (worn)
Jewellery
 e - a +3 ring of protection
 l - a +5 ring of protection
 m - an uncursed ring of protection from magic
 y - a ring of wizardry (right hand)
 C - an uncursed ring of resist corrosion
 T - a +3 ring of evasion (left hand)
 U - an uncursed amulet of rage
 Z - an uncursed ring of wizardry
Wands
 o - a wand of confusion (12/24)
 w - a wand of digging (8/18)
 I - a wand of iceblast (7/15)
 M - a wand of flame (8/24)
 O - a wand of acid (8/15)
 P - a wand of disintegration (2/18)
 S - a wand of polymorph (10/18)
 V - a wand of paralysis (9/18)
Scrolls
 d - 4 scrolls of enchant armour
 f - 6 scrolls of recharging
 j - 3 scrolls of blinking
 r - 7 scrolls of teleportation
 s - 3 scrolls of fog
 t - a scroll of magic mapping
 H - a scroll of fear
 J - a scroll of amnesia
 R - 3 scrolls of enchant weapon
Potions
 c - a potion of berserk rage
 h - a potion of cure mutation
 i - 3 potions of might
 k - 2 potions of heal wounds
 p - 5 potions of curing
 x - 2 potions of ambrosia
 z - a potion of magic
 D - a potion of invisibility
 F - 2 potions of resistance
 L - a potion of flight
Books
 n - a book of Callings   
   
    Spells                             Type                      Level
    a - Summon Small Mammal          Summoning                     1
    b - Call Imp                     Summoning                     2
    c - Call Canine Familiar         Summoning                     3
    d - Summon Guardian Golem        Hexes/Summoning               3
    e - Summon Lightning Spire       Summoning/Air                 4
    f - Summon Ice Beast             Ice/Summoning                 4


   Skills:
 + Level 8.0 Fighting
 + Level 9.4 Dodging
 + Level 2.4 Stealth
 - Level 4.7 Shields
 + Level 6.3 Spellcasting
 - Level 10.6 Summonings
 - Level 3.0 Ice Magic
 - Level 7.0 Air Magic


You have 8 spell levels left.
You know the following spells:

 Your Spells              Type           Power        Failure   Level  Hunger
a - Summon Small Mammal   Summ           ####         1%          1    None
b - Summon Ice Beast      Ice/Summ       ####....     4%          4    ####...
c - Call Canine Familiar  Summ           #####...     1%          3    ##.....
i - Call Imp              Summ           #####...     1%          2    None
l - Summon Lightning Spi  Summ/Air       #####...     2%          4    ####...


Dungeon Overview and Level Annotations

Branches:
Dungeon (11/15)            Temple (1/1) D:4             Orc (0/2) D:8
  Lair: D:-1         Crypt: Vaults:-1     Tomb: Vaults:-1   

Altars:
Cheibriados
Dithmenos
Elyvilon
Gozag
Hepliaklqana
Kikubaaqudgha
Makhleb
Nemelex Xobeh
Okawaru
Qazlal
Ru
Sif Muna
Trog
Uskayaw
Vehumet
Xom
Yredelemnul
Zin
The Shining One
Beogh

Shops:
D:4 }!?(   D:11 =

Annotations:
D:3 exclusion: downstairs
D:5 exclusion: downstairs
D:8 exclusion: 2 downstairs
D:10 exclusion: cyclops
D:11 exclusion: gargoyle, Fannar


Innate Abilities, Weirdness & Mutations

You have a beak for a mouth.
You have claws for feet.
You can fly.


Message History

Unknown command.
Unknown command.
Unknown command.
Search for what [Enter for "rege", or ? for help]? armour
Unknown command.
Search for what [Enter for "armour", or ? for help]? hat
Unknown command.
Unknown command.
Unknown command.
Unknown command.
Unknown command.
Unknown command.
Save game and exit?
Level annotation: exclusion: gargoyle, Fannar
Welcome back, bel5 the Tengu Summoner.
Sif Muna whispers: I know many secrets...
Press ? for a list of commands and other information.
Unknown command.
Unknown command.
Unknown command.

#..#....#####....
##>#....#   #.###
 #.#.#'##   #.#
 #.#.#.#    #.#
 #.#.#.#    #.#
 #.#.#.######.##.
 #.#.#.....§..##.
 #.#.############
 #.#.#
 #.#@############
 #.#.............
 #.##############
 #.#         #(..
 #.#         #.##
 #.#         #...
 #.##############
 #8..............
 ################


There are no monsters in sight!

Vanquished Creatures
  An orc high priest (D:10)
  An unseen horror (D:11)
  A troll (D:11)
  5 yaks
  A spiny frog skeleton (D:9)
  3 orc warriors
  An ice beast (D:11)
  An ogre (D:11)
  A blink frog skeleton (D:11)
  A rime drake skeleton (D:8)
  A bullfrog (D:9)
  A howler monkey (D:7)
  2 crimson imps
  A jelly (D:10)
  A wasp zombie (D:10)
  3 orc priests
  2 hounds
  2 orc wizards
  A centaur skeleton (D:9)
  A killer bee zombie (D:6)
  A hound skeleton (D:6)
  Robin (D:3)
  A gnoll (D:6)
  2 adders
  3 shadow imps
  An adder skeleton (D:5)
  2 dart slugs (D:2)
  2 leopard geckos
  9 orcs
  4 bats
  5 giant cockroaches
  6 goblins
  6 hobgoblins
  5 jackals
  2 kobolds
  5 rats
86 creatures vanquished.

Vanquished Creatures (collateral kills)
  A hydra (D:11)
  2 two-headed ogres
  Erica (D:9)
  Pikel (D:8)
  A deep elf mage (D:9)
  2 ugly things (D:11)
  A black mamba (D:9)
  Joseph (D:7)
  A gargoyle (D:11)
  A centaur skeleton (D:9)
  A spiny frog (D:9)
  A rime drake (D:9)
  A troll (D:9)
  Grinder (D:4)
  3 wyverns
  Sigmund (D:3)
  Grum (D:8)
  3 yaks
  2 steam dragons
  Menkaure (D:5)
  Edmund (D:5)
  2 soldier ants (D:9)
  A spiny frog zombie (D:9)
  Duvessa (D:4)
  3 ice beasts
  7 orc warriors
  2 slaves (D:8)
  3 blink frog zombies
  4 ogres
  A phantom (D:6)
  2 wasps (D:9)
  A wolf (D:8)
  6 centaurs
  Blork the orc (D:4)
  2 wyvern zombies (D:11)
  2 gnoll sergeants
  A wyvern skeleton (D:8)
  Dowan (D:4)
  3 scorpions
  5 killer bees (D:10)
  2 jellies
  A crimson imp (D:5)
  2 centaur zombies
  A wasp zombie (D:9)
  A gnoll shaman (D:5)
  5 orc priests
  A hound (D:6)
  4 iguanas
  Ijyb (D:2)
  Natasha (thrice) (D:2)
  10 orc wizards
  3 worker ants
  5 adders
  19 gnolls
  A shadow imp (D:9)
  2 leopard geckos
  30 orcs
  A bat (D:3)
  A giant cockroach (D:1)
  7 goblins
  4 hobgoblins
  5 jackals
  7 kobolds
  A frilled lizard (D:3)
  A rat (D:3)
194 creatures vanquished.

Vanquished Creatures (others)
  Eustachio (D:5)
  2 slaves (D:8)
  A wolf (D:8)
  An adder (D:5)
5 creatures vanquished.

Grand Total: 285 creatures vanquished

Notes
Turn   | Place    | Note
-------+----------+-------------------------------------------
     0 | D:1      | bel5 the Tengu Summoner began the quest for the Orb.
     0 | D:1      | Reached XP level 1. HP: 10/10 MP: 4/4
   174 | D:1      | Reached skill level 5 in Summonings
   491 | D:1      | Reached XP level 2. HP: 7/15 MP: 4/6
   496 | D:1      | Learned a level 2 spell: Call Imp
  1282 | D:2      | Reached XP level 3. HP: 19/19 MP: 7/7
  1287 | D:2      | Learned a level 3 spell: Call Canine Familiar
  2031 | D:3      | Reached skill level 6 in Summonings
  2048 | D:3      | Noticed Robin
  2212 | D:3      | Noticed Sigmund
  2349 | D:4      | Found Reidenij's Gadget Boutique.
  2357 | D:4      | Bought a wand of confusion (12/24) for 147 gold pieces
  2398 | D:4      | Found Iqell's Magic Scroll Shoppe.
  2407 | D:4      | Bought a scroll of teleportation for 39 gold pieces
  2407 | D:4      | Bought a scroll of fog for 26 gold pieces
  2414 | D:4      | Found Tudy's Antique Weapon Shoppe.
  2474 | D:4      | Reached XP level 4. HP: 24/24 MP: 0/8
  2478 | D:4      | Found a staircase to the Ecumenical Temple.
  2489 | Temple   | Entered the Ecumenical Temple
  2640 | D:4      | Found a sacrificial altar of Ru.
  2646 | D:4      | Became a worshipper of Ru the Awakened
  2806 | D:3      | Reached skill level 1 in Air Magic
  2927 | D:2      | Found a shadowy altar of Dithmenos.
  2953 | D:2      | Noticed an earth elemental
  2955 | D:2      | Found a stormy altar of Qazlal.
  3038 | D:2      | Noticed a water elemental
  3038 | D:2      | Noticed a fire elemental
  3038 | D:2      | Noticed an air elemental
  3160 | D:2      | Gained mutation: You can fly. [Tengu growth]
  3160 | D:2      | Reached XP level 5. HP: 27/28 MP: 6/10
  3178 | D:2      | Noticed Natasha
  3331 | D:2      | Noticed Ijyb
  3343 | D:2      | Killed Ijyb
  3458 | D:2      | Killed Natasha
  3682 | D:2      | Noticed Natasha
  3686 | D:2      | Killed Natasha
  3692 | D:2      | Noticed Natasha
  3700 | D:2      | Killed Natasha
  3807 | D:3      | Reached skill level 7 in Summonings
  3974 | D:3      | Learned a level 4 spell: Summon Lightning Spire
  4003 | D:3      | Killed Robin
  4066 | D:3      | Killed Sigmund
  4066 | D:3      | Reached XP level 6. HP: 23/32 MP: 1/11
  4327 | D:4      | Found a shimmering altar of Xom.
  4374 | D:4      | Noticed Dowan
  4385 | D:4      | Noticed Duvessa
  4392 | D:4      | Killed Dowan
  4395 | D:4      | Killed Duvessa
  4398 | D:4      | Noticed Blork the orc
  4523 | D:4      | Killed Blork the orc
  4523 | D:4      | Reached skill level 1 in Fighting
  4556 | D:4      | Found Joipic Faure's Distillery.
  4581 | D:4      | Reached XP level 7. HP: 35/38 MP: 7/13
  4665 | D:4      | Noticed Grinder
  4677 | D:4      | Killed Grinder
  4677 | D:4      | Reached skill level 8 in Summonings
  4788 | D:5      | Entered Level 5 of the Dungeon
  4788 | D:5      | Noticed Eustachio
  4799 | D:5      | Killed Eustachio
  4972 | D:5      | Noticed Edmund
  5012 | D:5      | Killed Edmund
  5168 | D:5      | Noticed Menkaure
  5694 | D:5      | Reached XP level 8. HP: 22/44 MP: 12/15
  5907 | D:5      | Killed Menkaure
  6007 | D:6      | Reached skill level 9 in Summonings
  6222 | D:6      | Found a bloodstained altar of Trog.
  6329 | D:6      | Learned a level 4 spell: Summon Ice Beast
  6530 | D:6      | Found an iron altar of Okawaru.
  6584 | D:6      | Found a hide-covered altar of Uskayaw.
  6614 | D:6      | Found a bloodstained altar of Trog.
  6696 | D:6      | Reached skill level 1 in Ice Magic
  6958 | D:7      | Reached skill level 5 in Air Magic
  7077 | D:7      | Noticed a wyvern
  7084 | D:7      | Killed a wyvern
  7084 | D:7      | Reached XP level 9. HP: 47/51 MP: 8/17
  7142 | D:7      | Found a burning altar of Makhleb.
  7385 | D:7      | Noticed Joseph
  7393 | D:7      | Killed Joseph
  7393 | D:7      | Reached skill level 5 in Dodging
  7514 | D:8      | Noticed Pikel
  7523 | D:8      | Killed Pikel
  7523 | D:8      | Reached skill level 1 in Shields
  7743 | D:8      | Found a roughly hewn altar of Beogh.
  7743 | D:8      | Found a staircase to the Orcish Mines.
  7763 | D:8      | Reached skill level 5 in Spellcasting
  7766 | D:8      | Reached skill level 10 in Summonings
  8137 | D:8      | Noticed Grum
  8147 | D:8      | Killed Grum
  8570 | D:9      | Noticed Erica
  8579 | D:9      | Noticed a spiny frog
  8579 | D:9      | Killed Erica
  8673 | D:9      | Noticed a black mamba
  8681 | D:9      | Killed a black mamba
  8705 | D:9      | Reached XP level 10. HP: 43/58 MP: 5/18
  8716 | D:9      | Noticed a deep elf mage
  8726 | D:9      | Killed a deep elf mage
  8990 | D:9      | Killed a spiny frog
  8990 | D:9      | Reached skill level 5 in Fighting
  9996 | D:9      | Found a hazy altar of Hepliaklqana.
 10028 | D:9      | Found a deep blue altar of Sif Muna.
 10036 | D:9      | Fell from the grace of Ru
 10036 | D:9      | Became a worshipper of Sif Muna the Loreminder
 10118 | D:10     | Entered Level 10 of the Dungeon
 10174 | D:10     | Noticed a cyclops
 10618 | D:10     | Noticed a two-headed ogre
 10820 | D:10     | Killed a two-headed ogre
 10870 | D:10     | Noticed an orc high priest
 10913 | D:10     | Killed an orc high priest
 10913 | D:10     | Reached XP level 11. HP: 67/67 MP: 9/20
 10993 | D:10     | Reached * piety under Sif Muna
 11240 | D:11     | Killed an unseen horror
 11362 | D:11     | Noticed a red ugly thing
 11369 | D:11     | Killed a red ugly thing
 11565 | D:11     | Found an iron altar of Okawaru.
 11671 | D:11     | Noticed a red ugly thing
 11680 | D:11     | Killed a red ugly thing
 11734 | D:11     | Noticed a nine-headed hydra
 11741 | D:11     | Killed a nine-headed hydra
 11870 | D:11     | Found Yhetam's Jewellery Boutique.
 11924 | D:11     | Noticed Fannar
 12064 | D:11     | Noticed a two-headed ogre
 12080 | D:11     | Killed a two-headed ogre

Skill      XL: |  1  2  3  4  5  6  7  8  9 10 11 |
---------------+----------------------------------+-----
Summonings     |  5     6     7     8  9 10       | 10.6
Air Magic      |           1  3  4     5     6  7 |  7.0
Spellcasting   |              3     4     5     6 |  6.3
Fighting       |                 1  2  3  4  7  8 |  8.0
Dodging        |                    3  4  6  8  9 |  9.4
Ice Magic      |                       2  3       |  3.0
Shields        |                          4       |  4.7
Stealth        |                                  |  2.4

Action                   |  1- 3 |  4- 6 |  7- 9 | 10-12 || total
-------------------------+-------+-------+-------+-------++-------
Melee: Whip              |    87 |    63 |       |       ||   150
       Kick              |    18 |    16 |    35 |    29 ||    98
       Unarmed           |     3 |       |       |       ||     3
       Peck              |    14 |     8 |    22 |    16 ||    60
       Falchion          |       |     6 |   124 |   104 ||   234
       Spear             |       |       |    13 |       ||    13
       Trident           |       |       |     3 |    17 ||    20
 Fire: Hunting sling     |       |     4 |       |       ||     4
Throw: Javelin           |       |       |       |     1 ||     1
 Cast: Summon Small Mamm |    16 |     1 |     1 |       ||    18
       Call Imp          |    10 |    13 |     5 |       ||    28
       Call Canine Famil |     6 |    12 |    19 |    23 ||    60
       Summon Lightning  |       |     8 |    47 |    52 ||   107
       Summon Ice Beast  |       |       |    10 |    28 ||    38
Invok: Divine Energy     |       |       |       |     1 ||     1
 Abil: Fly               |       |     1 |       |     3 ||     4
Evoke: Wand              |       |     1 |       |       ||     1
 Stab: Sleeping          |     5 |     2 |     2 |       ||     9
       Distracted        |       |     1 |     5 |     9 ||    15
Armor: Robe              |    24 |    26 |    19 |       ||    69
       Leather armour    |       |       |    16 |    18 ||    34
Dodge: Dodged            |    57 |    46 |    83 |    77 ||   263
Block: Buckler           |       |       |     5 |    17 ||    22


I found a +3 ring of evasion (scenario 1) and a +5 ring of protection (scenario 2). Which one should I wear? I tried fsim against a red ugly thing and a wyvern. Here are pictures. The bottom axis is number of auts divided by 10 (can be thought of as a "round"). The left axis is the probability that you are alive after so many rounds.
Attachments
fight-vs-red-ugly-thing-evasion-protection.gif
fight-vs-red-ugly-thing-evasion-protection.gif (5.56 KiB) Viewed 1359 times
fight-vs-wyvern-evasion-protection.gif
fight-vs-wyvern-evasion-protection.gif (5.76 KiB) Viewed 1359 times
Last edited by bel on Thursday, 12th January 2017, 04:01, edited 4 times in total.

bel

Cocytus Succeeder

Posts: 2184

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

Post Thursday, 12th January 2017, 03:52

Re: fsim data dump

Here is the code if anyone wants it. The fight code is in python. Pictures are made in gnuplot. The fight_max_time is the bottom axis multiplied by 100. The bottom axis itself is the number of auts divided by 10.

  Code:
#!/usr/bin/python
#Extracts the death probability in a fight
import sys
import re
import random

if(len(sys.argv) < 5):
    print 'Usage: ./extractDeathProbability input_file fight_min_hp fight_max_hp fight_max_time'
    sys.exit(1)

input_file = sys.argv[1]
output_file = "deathProb-" + sys.argv[1]
fight_min_hp = int(sys.argv[2])
fight_max_hp = int(sys.argv[3])
fight_max_time = int(sys.argv[4])
random.seed()

print "Input: " + input_file
print "Output: " + output_file
print "Fight Min HP: " + str(fight_min_hp)
print "Fight Max HP: " + str(fight_max_hp)
print "Fight Max Time: " + str(fight_max_time)

f_input = open(input_file, "r")
f_output = open(output_file, "w")

fight_number = 0
done = 0
time_step = 100
histogram = []
max_points_in_histogram = int(fight_max_time / time_step)
for i in range(max_points_in_histogram + 1):
    histogram.append(0)

while (not done):
    cumulative_damage = 0
    cumulative_time = 0
    round_pattern = re.compile(r'Round: (\d*) Hit: (\d*), Dam: (\d*), AvTime: (\d*)')
    fight_is_over = 0
    fight_hp = random.randrange(fight_min_hp, fight_max_hp + 1)
    while(not fight_is_over):
        line = f_input.readline()
        if(line == ''):
            fight_is_over = done = 1
        else:
            m = round_pattern.match(line)
            round_number = int(m.group(1))
            damage = int(m.group(3))
            time = int(m.group(4))
            cumulative_damage += damage
            cumulative_time += time
            if(cumulative_damage >= fight_hp or cumulative_time >=
                    fight_max_time):
                fight_is_over = 1
                fight_number += 1
#            print m.group(1) + ": " + str(cumulative_damage) + " in " + str(cumulative_time)
    if(not done):
        index = int(cumulative_time / time_step) - 1
        print "index: " + str(index)
        if(index < 0):
            index = 0
        histogram[index] += 1
        print "Fight number: " + str(fight_number) + " took " + str(cumulative_time) + " round: " + str(round_number) + " hp: " + str(fight_hp)

living_probability = []
current_probability = 1.0
for i in range(max_points_in_histogram):
    living_probability.append(0.0)
    living_probability[i] = current_probability
    probability_step = float(histogram[i]) / fight_number
    current_probability -= probability_step
    print "i: " + str(i) + " living prob: " + str(format(living_probability[i],
        '.3f'))
    f_output.write(str(i) + " " + str(format(living_probability[i], '.3f')) +
    "\n")

f_input.close()
f_output.close()


  Code:
set term gif
set output "compareScenario.gif"
set xrange [1:]
set xlabel "Time"
set ylabel "LiveProb"
set yrange [0:1]
plot "scenario1.txt" u 1:2 title "First Scenario" smooth csplines, "scenario2.txt" u 1:2 title "Second scenario" smooth csplines
set term x11

Return to Dungeon Crawling Advice

Who is online

Users browsing this forum: No registered users and 19 guests

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