Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Sil

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old November 14, 2013, 23:45   #1
fph
Knight
 
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 970
fph is on a distinguished road
Sil mod: probability to die

I have written a small modification to Sil in which after every attack, trap or probability that the player takes damage the following two things are computed:
1 - distribution of the dealt damage (as in: probability of taking $n$ damage points for each $n$)
2 - probability of being dead as a result of all the risks taken during the game, in millimort (https://en.wikipedia.org/wiki/Micromort). 1000 millimort equals probability 1 of being dead (note that they cannot be simply added).

I think it's interesting because it quantifies exactly how many risks you are taking. By being aware that the last turn raised your probability of dying to from 0.05 to 0.1, you can be more conscious and avoid taking the same action, even if it does not immediately result in death.
This allows also to compare risk-taking and playing style: for instance, at which level does your mortality score normally leave its original value of 0?

The odds are written on stdout for now; probably I should work on a better display, but this is just a proof-of-concept for now.
I encourage you to try it and tell me your opinions. I'd be happy to know that the added knowledge makes you more attentive to risks and tradeoffs.

You can download the source from https://github.com/fph/mortsil/archive/master.zip, or browse the repo at https://github.com/fph/mortsil. It is based on the current version 1.1.1 of Sil.
There is no Windows executable as I only develop on Linux and I have no Windows toolchain abailable; I'd be happy if one of the Windows users could compile a Windows version.

Some technical details:

I check for damage probabilities after every action that can damage the player (attack, trap, and so on). Of course it's impossible to quantify longer-term probabilities, such as the probability of being confused by a brown mold and thrown into a pack of white wolves that just came down the stairs. So the probabilities are underestimated a bit, but I think they are still reasonable and indicative. The only situation when I don't find this very realistic is when a big breather could decide to breathe or not at the next turn. I'm working on doing something better in this case.

Probabilities are not simulated with a Montecarlo approach, they are computed exactly. Some care is taken to avoid instabilities and rounding errors. This is not always trivial; for instance, we need expm1().

I did this for Sil because I think the damage-dealing system is slightly easier to handle. If this is interesting, I can consider porting it to vanilla and/or other variants.

The code will probably contain lots of bug -- don't depend on it for anything mission-critical such as running a nuclear power plant (a use case in which Sil normally shines instead).
__________________
Dive fast, die young, leave a high-CHA corpse.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.
fph is offline   Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hit probability calculation Ycombinator Vanilla 8 May 27, 2010 23:11
Crafting-focused Angband mod under development Optimality Variants 49 November 25, 2009 01:06
Question regarding good/great probability ChodTheWacko Vanilla 4 October 3, 2008 19:28
Feature request: mod for birth_no_artifacts bron Vanilla 7 May 25, 2008 09:16
Probability of using Rods of Teleport Other? Dragonboneman Vanilla 9 February 7, 2008 19:55


All times are GMT +1. The time now is 03:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.