Contents

  1. Chatter

I made a Perl script (/stats.pl)which simulates a sentient weapon gaining 49 levels.

KhymChanur: Oops, the original table was wrong, because I'd forgotten about this part of the algorithm:

The makes a noticable change to the percentages, especially for the lower realms.

KhymChanur: Oops, part two: I left in some code from when I was experimenting with "what would happed if we did this". This lead to higher percentages for all the realms and less unpsent points.

Simulated 100000 sentient weapons.

Percent of weapons which gained each realm: 
Fire      :  93.705%
Cold      :  93.465%
Lightning :  93.520%
Poison    :  87.866%
Acid      :  79.342%
Air       :  40.313%
Earth     :  40.426%
Mind      :   7.560%
Shield    :   7.634%
Chaos     :   7.659%
Magic     :   0.887%
Antimagic :   0.862%

------------------------------------

       Number of realms gained

Average value is 5.53239

   1:   0.190%
   2:   1.360%
   3:   4.216%
   4:   9.634%
   5:  25.054%
   6:  43.232%
   7:  16.030%
   8:   0.283%
   9:   0.001%

------------------------------------

       Pval maxed out at level...

Average value is 11.55729

   2:   0.100%
   3:   0.655%
   4:   2.007%
   5:   3.951%
   6:   6.003%
   7:   7.995%
   8:   8.702%
   9:   9.212%
  10:   8.837%
  11:   8.544%
  12:   7.754%
  13:   6.705%
  14:   5.849%
  15:   4.871%
  16:   3.981%
  17:   3.277%
  18:   2.621%
  19:   2.063%
  20:   1.641%
  21:   1.281%
  22:   0.984%
  23:   0.755%
  24:   0.560%
  25:   0.444%
  26:   0.301%
  27:   0.244%
  28:   0.179%
  29:   0.133%
  30:   0.100%
  31:   0.075%
  32:   0.046%
  33:   0.036%
  34:   0.023%
  35:   0.025%
  36:   0.008%
  37:   0.016%
  38:   0.006%
  39:   0.004%
  40:   0.002%
  41:   0.004%
  43:   0.002%
  44:   0.001%
  45:   0.001%
  46:   0.001%
  48:   0.001%

------------------------------------

       to_h gained 

Average value is 40.42615

  22:   0.007%
  23:   0.006%
  24:   0.030%
  25:   0.034%
  26:   0.081%
  27:   0.151%
  28:   0.279%
  29:   0.509%
  30:   0.776%
  31:   1.208%
  32:   1.818%
  33:   2.554%
  34:   3.430%
  35:   4.433%
  36:   5.562%
  37:   6.477%
  38:   7.261%
  39:   8.037%
  40:   8.226%
  41:   8.116%
  42:   7.791%
  43:   7.128%
  44:   6.191%
  45:   5.245%
  46:   4.127%
  47:   3.310%
  48:   2.449%
  49:   1.760%
  50:   1.102%
  51:   0.758%
  52:   0.498%
  53:   0.282%
  54:   0.163%
  55:   0.098%
  56:   0.060%
  57:   0.021%
  58:   0.013%
  59:   0.006%
  60:   0.002%
  62:   0.001%

------------------------------------

       to_d gained 

Average value is 16.17218

   4:   0.006%
   5:   0.015%
   6:   0.053%
   7:   0.194%
   8:   0.451%
   9:   1.074%
  10:   2.050%
  11:   3.610%
  12:   5.642%
  13:   8.027%
  14:   9.903%
  15:  11.545%
  16:  12.097%
  17:  11.513%
  18:  10.174%
  19:   8.096%
  20:   5.930%
  21:   4.058%
  22:   2.556%
  23:   1.534%
  24:   0.767%
  25:   0.395%
  26:   0.192%
  27:   0.068%
  28:   0.035%
  29:   0.015%

------------------------------------

       Number of points acquired over 49 level gains

Average value is 16.17172

   4:   0.002%
   5:   0.016%
   6:   0.062%
   7:   0.166%
   8:   0.492%
   9:   1.004%
  10:   2.072%
  11:   3.688%
  12:   5.647%
  13:   7.878%
  14:   9.994%
  15:  11.387%
  16:  12.141%
  17:  11.616%
  18:  10.079%
  19:   8.230%
  20:   5.944%
  21:   4.171%
  22:   2.565%
  23:   1.440%
  24:   0.763%
  25:   0.365%
  26:   0.171%
  27:   0.062%
  28:   0.027%
  29:   0.009%
  30:   0.006%
  31:   0.002%
  34:   0.001%

------------------------------------

       Total number of points left unspent

Average value is 3.41568

   0:   8.752%
   1:  14.850%
   2:  16.694%
   3:  16.698%
   4:  15.658%
   5:  10.121%
   6:   6.488%
   7:   4.153%
   8:   2.599%
   9:   1.618%
  10:   0.999%
  11:   0.602%
  12:   0.349%
  13:   0.205%
  14:   0.118%
  15:   0.054%
  16:   0.020%
  17:   0.010%
  18:   0.005%
  19:   0.003%
  20:   0.003%
  22:   0.001%

------------------------------------

Weapons with only one of Fire, Cold or Lightning:   3.244%
Weapons with two of Fire, Cold or Lightning:  12.387%
Weapons with all of Fire, Cold and Lightning:  84.224%
Weapons with only one of Air or Earth:  49.291%
Weapons with both Air and Earth:  15.724%
Weapons with only one of Mind, Shield or Chaos:  21.851%
Weapons with two of Mind, Shield or Chaos:   0.501%
Weapons with all of Mind, Shield and Chaos:   0.000%
Weapons with only one of Magic or Antimagic:   1.749%
Weapons with both Magic and Antimagic:   0.000%

##########################################

       Number of powers acquired

Average value is 14.95222

   2:   0.001%
   3:   0.002%
   4:   0.014%
   5:   0.248%
   6:   0.336%
   7:   0.627%
   8:   1.136%
   9:   2.257%
  10:   3.879%
  11:   6.124%
  12:   8.044%
  13:  10.258%
  14:  11.800%
  15:  11.948%
  16:  11.843%
  17:   9.724%
  18:   7.752%
  19:   5.642%
  20:   3.728%
  21:   2.314%
  22:   1.206%
  23:   0.629%
  24:   0.301%
  25:   0.134%
  26:   0.036%
  27:   0.013%
  28:   0.004%

------------------------------------

       Number of power gain attempts which failed 

Average value is 1.7053

   0:  40.035%
   1:  22.704%
   2:  13.422%
   3:   8.071%
   4:   5.250%
   5:   3.322%
   6:   2.137%
   7:   1.534%
   8:   1.100%
   9:   0.730%
  10:   0.544%
  11:   0.381%
  12:   0.261%
  13:   0.170%
  14:   0.134%
  15:   0.078%
  16:   0.042%
  17:   0.043%
  18:   0.020%
  19:   0.011%
  20:   0.002%
  21:   0.005%
  22:   0.001%
  23:   0.001%
  24:   0.002%

---------------------------

Powers gained (alphabetical): 

Acid Brand            :  28.289%
Add to Blows          :   6.696%
Add to Charisma       :  35.616%
Add to Constitution   :   6.635%
Add to Dexterity      :   1.557%
Add to Infravision    :   6.592%
Add to Intelligence   :   1.264%
Add to Life           :   0.113%
Add to Light          :  53.819%
Add to Mana           :   0.155%
Add to Searching      :   1.306%
Add to Speed          :   6.763%
Add to Spellpower     :   0.173%
Add to Stealth        :   6.734%
Add to Strength       :   6.478%
Add to Tunnelling     :  30.955%
Add to Wisdom         :   6.695%
Anti-magic shell      :   0.122%
Antimagic field 1     :   0.117%
Antimagic field 2     :   0.121%
Blessed               :   6.662%
Chaos Brand           :   1.922%
Cloning Brand         :   0.169%
Cold Brand            :  52.890%
Drain Experience      :  35.600%
Earthquake Brand      :  32.008%
Electric Aura         :  53.718%
Electricity Brand     :  54.016%
Fire Aura             :  53.593%
Fire Brand            :  53.998%
Flight                :   0.164%
Free Action           :   6.556%
Hold Life             :   1.612%
Invisibility          :  53.180%
Levitation            :   6.651%
No Teleportation      :   0.133%
Poison Brand          :  35.261%
Precognition          :   0.166%
Random Teleportation  :  53.861%
Reflection            :   1.755%
Regeneration          :   9.683%
Resist Acid           :  28.404%
Resist Blindness      :   6.744%
Resist Chaos          :   1.954%
Resist Cold           :  52.720%
Resist Confusion      :   1.302%
Resist Dark           :   6.562%
Resist Disenchantment :   1.946%
Resist Electricity    :  53.924%
Resist Fear           :   7.761%
Resist Fire           :  53.791%
Resist Light          :   6.652%
Resist Nexus          :   1.576%
Resist Poison         :  35.455%
Resist Shards         :   6.576%
Resist Sound          :   1.598%
See Invisible         :   6.803%
Sense Animals         :   1.313%
Sense Demons          :   1.262%
Sense Giants          :  37.784%
Sense Good            :   6.748%
Sense Orcs            :   1.264%
Sense Spiders         :   1.284%
Sense Trolls          :  37.995%
Sense Uniques         :   1.283%
Slay Animal Brand     :  44.418%
Slay Demon Brand      :  52.753%
Slay Dragon Brand     :  52.783%
Slay Evil Brand       :  53.881%
Slay Giant Brand      :   6.523%
Slay Troll Brand      :   6.473%
Slay Undead Brand     :  53.884%
Slow Digestion        :  52.677%
Sustain Charisma      :  35.516%
Sustain Constitution  :   6.374%
Sustain Dexterity     :   1.504%
Sustain Intelligence  :   1.254%
Sustain Strength      :   6.616%
Sustain Wisdom        :   6.563%
Telepathy             :   1.775%
Vampiric Brand        :  35.577%
Wraithform            :   0.152%

Powers gained (frequency):

Add to Life           :   0.113%
Antimagic field 1     :   0.117%
Antimagic field 2     :   0.121%
Anti-magic shell      :   0.122%
No Teleportation      :   0.133%
Wraithform            :   0.152%
Add to Mana           :   0.155%
Flight                :   0.164%
Precognition          :   0.166%
Cloning Brand         :   0.169%
Add to Spellpower     :   0.173%
Sustain Intelligence  :   1.254%
Sense Demons          :   1.262%
Add to Intelligence   :   1.264%
Sense Orcs            :   1.264%
Sense Uniques         :   1.283%
Sense Spiders         :   1.284%
Resist Confusion      :   1.302%
Add to Searching      :   1.306%
Sense Animals         :   1.313%
Sustain Dexterity     :   1.504%
Add to Dexterity      :   1.557%
Resist Nexus          :   1.576%
Resist Sound          :   1.598%
Hold Life             :   1.612%
Reflection            :   1.755%
Telepathy             :   1.775%
Chaos Brand           :   1.922%
Resist Disenchantment :   1.946%
Resist Chaos          :   1.954%
Sustain Constitution  :   6.374%
Slay Troll Brand      :   6.473%
Add to Strength       :   6.478%
Slay Giant Brand      :   6.523%
Free Action           :   6.556%
Resist Dark           :   6.562%
Sustain Wisdom        :   6.563%
Resist Shards         :   6.576%
Add to Infravision    :   6.592%
Sustain Strength      :   6.616%
Add to Constitution   :   6.635%
Levitation            :   6.651%
Resist Light          :   6.652%
Blessed               :   6.662%
Add to Wisdom         :   6.695%
Add to Blows          :   6.696%
Add to Stealth        :   6.734%
Resist Blindness      :   6.744%
Sense Good            :   6.748%
Add to Speed          :   6.763%
See Invisible         :   6.803%
Resist Fear           :   7.761%
Regeneration          :   9.683%
Acid Brand            :  28.289%
Resist Acid           :  28.404%
Add to Tunnelling     :  30.955%
Earthquake Brand      :  32.008%
Poison Brand          :  35.261%
Resist Poison         :  35.455%
Sustain Charisma      :  35.516%
Vampiric Brand        :  35.577%
Drain Experience      :  35.600%
Add to Charisma       :  35.616%
Sense Giants          :  37.784%
Sense Trolls          :  37.995%
Slay Animal Brand     :  44.418%
Slow Digestion        :  52.677%
Resist Cold           :  52.720%
Slay Demon Brand      :  52.753%
Slay Dragon Brand     :  52.783%
Cold Brand            :  52.890%
Invisibility          :  53.180%
Fire Aura             :  53.593%
Electric Aura         :  53.718%
Resist Fire           :  53.791%
Add to Light          :  53.819%
Random Teleportation  :  53.861%
Slay Evil Brand       :  53.881%
Slay Undead Brand     :  53.884%
Resist Electricity    :  53.924%
Fire Brand            :  53.998%
Electricity Brand     :  54.016%

Chatter

TheFury: So that is why I never have seen anythingwith the magic or antimagic realms. :)

NeilStevens: Fascinating. I suspect some of us will be referencing this when designing ToME 3 sentient artifacts.

ShrikeDeCil What's the chance of the dreaded 'Earthquake' flag? ;) Just from glancing at the _realms_ it seems like... a very high percentage.

KhymChanur: I don't know, my simulator currently doesn't keep track of powers, only points (the internal counter) and realms.

NeilStevens: I just implemented my own simulator /tome2sentience.cpp and I'm not getting the same percentages here:

Acid: 79.310% 
Air: 41.610%
Antimagic: 0.790%
Chaos: 7.880%
Cold: 93.670%
Earth: 40.670%
Fire: 93.570%
Lightning: 93.730%
Magic: 0.870%
Mind: 7.300%
Poison: 88.230%
Shield: 7.020%

So who's wrong here?

KhymChanur: Darn, that was my fault. I'd accidently left in some "what would happen if we did this" type code when I re-ran the simulation.

KhymChanur: Added info on pvals, to_h and to_d. Looks like pval always reaches 5; nothing less than 5 was encountered even once in 100,000 tests. So I guess its just a question of when the weapon reaches 5.

KhymChanur: Info on level at which pval maxed out, since it always eventually gets to 5.

NeilStevens: That's odd, I'd swear my simulation showed some under 5. *checking*

1: 4.390%
2: 14.690%
3: 23.120%
4: 24.210%
5: 33.590%

KhymChanur: I made a Perl script which just simulates the pval gain (/pvals.pl), and it came out with it always being 5, like my full simulator. If there's something wrong with it, I can't see it.

NeilStevens: You put the check condition on the wrong end of the do-while loop. You give it a free pval increment every time. And amusingly enough, the first time I ran your script, I got this:

0: 0.000
1: 0.000
2: 0.000
3: 0.000
4: 0.003
5: 99.997

You're just really really lucky with pvals it seems, even under your incorrect version, if you NEVER get a 4.

KhymChanur: Right you are. Changed it, and got this:

0: 0.000
1: 5.458
2: 16.486
3: 24.504
4: 24.131
5: 29.421

Not exactly the same as your, but a lot closer.

NeilStevens: Well, you're running 10x the number of weapons, so I'm sure the differene is just variance.

KhymChanur: A note on the list of powers: the power list doesn't include "Weapon is undamaged by FOO", because as far as I can tell, artifacts never get those powers (already being indestructible), and I'm primarily interested in stats as they apply to sentient artifacts, and not sentient ego items.

NeilStevens: For the curious, here are the /Old Statistics that were applicable before I did everyone a favor and made Acid more expensive.

KhymChanur: I tried an expirement (/Experiment: powers cost points) in changing how sentient leveling works:

Points being consumed by power acquisition should, on average, be offset by the new source of points, on average leaving the same number of points for buying new realms. However, for any individual weapon, there's a chance that a series of points gains will happen without any attempt to gain a power, thus making it more likely to save up enough points to buy a more expensive realm. It didn't quite work out that way, however. The averag number of realms increased from 5.53239 to 6.0498, and the average number of powers acquired decreased from 14.95222 to 13.00005. However, the frequency of each 7 point realms increased from 7.6% to 17.5%, and the frequency of each 10 point realm increased from 0.88% to 5.4%, so it did its job of making higher-cost realms more likely.

Spoilers/Sentient Weapons/Statistics (last edited 2006-03-10 21:09:47 by KhymChanur)