Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old October 28, 2010, 03:30   #11
Nate
Rookie
 
Join Date: Mar 2010
Posts: 19
Nate is on a distinguished road
Thanks for the lead PowerDiver. This is an old thread. I'm actually asking a couple new questions at the bottom of the thread re: how the M5 works in the d5M5 part of the ROS calculation. It seemed related to the thread but I probably should have started a new one. Sorry!
Nate is offline   Reply With Quote
Old October 28, 2010, 04:00   #12
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,255
Derakon is on a distinguished road
As the object.txt file notes, "M5" means to call m_bonus with a "max" argument of 5 and a "level" argument of the object's dungeon level. Here's a copy from the comments for that function:
Code:
 * A sample distribution of values from "m_bonus(10, N)" is shown below:
 *
 *   N       0     1     2     3     4     5     6     7     8     9    10
 * ---    ----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----
 *   0   66.37 13.01  9.73  5.47  2.89  1.31  0.72  0.26  0.12  0.09  0.03
 *   8   46.85 24.66 12.13  8.13  4.20  2.30  1.05  0.36  0.19  0.08  0.05
 *  16   30.12 27.62 18.52 10.52  6.34  3.52  1.95  0.90  0.31  0.15  0.05
 *  24   22.44 15.62 30.14 12.92  8.55  5.30  2.39  1.63  0.62  0.28  0.11
 *  32   16.23 11.43 23.01 22.31 11.19  7.18  4.46  2.13  1.20  0.45  0.41
 *  40   10.76  8.91 12.80 29.51 16.00  9.69  5.90  3.43  1.47  0.88  0.65
 *  48    7.28  6.81 10.51 18.27 27.57 11.76  7.85  4.99  2.80  1.22  0.94
 *  56    4.41  4.73  8.52 11.96 24.94 19.78 11.06  7.18  3.68  1.96  1.78
 *  64    2.81  3.07  5.65  9.17 13.01 31.57 13.70  9.30  6.04  3.04  2.64
 *  72    1.87  1.99  3.68  7.15 10.56 20.24 25.78 12.17  7.52  4.42  4.62
 *  80    1.02  1.23  2.78  4.75  8.37 12.04 27.61 18.07 10.28  6.52  7.33
 *  88    0.70  0.57  1.56  3.12  6.34 10.06 15.76 30.46 12.58  8.47 10.38
 *  96    0.27  0.60  1.25  2.28  4.30  7.60 10.77 22.52 22.51 11.37 16.53
 * 104    0.22  0.42  0.77  1.36  2.62  5.33  8.93 13.05 29.54 15.23 22.53
 * 112    0.15  0.20  0.56  0.87  2.00  3.83  6.86 10.06 17.89 27.31 30.27
 * 120    0.03  0.11  0.31  0.46  1.31  2.48  4.60  7.78 11.67 25.53 45.72
 * 128    0.02  0.01  0.13  0.33  0.83  1.41  3.24  6.17  9.57 14.22 64.07
The "N" column here is the dungeon level; hence, at dungeon level 0, the item has only a .03% chance of getting its full bonus, while at dungeon level 128 it has a 64.07% chance of the full bonus.
Derakon is online now   Reply With Quote
Old October 28, 2010, 16:13   #13
Nate
Rookie
 
Join Date: Mar 2010
Posts: 19
Nate is on a distinguished road
Cool. So does the sample distribution apply to ROS where a value generated of 5 or higher becomes 5 since the max is 5 or is there a different chart from 0 to 5 for ROS? Thank you for providing this detailed info.
Nate is offline   Reply With Quote
Old October 28, 2010, 16:34   #14
Omnipact
Rookie
 
Join Date: Jun 2007
Location: Bristol, UK
Posts: 23
Omnipact is on a distinguished road
The whole table would be used.

To get the full 5 bonus at dlv 0 would happen .03% of the time.

Don't forget the additional 'super-charging' code in obj-make.c:

Code:
/* Super-charge the ring */ 
while (randint0(100) < 50) o_ptr->pval++;
A ring of speed has no upper limit.
Omnipact is offline   Reply With Quote
Old October 28, 2010, 16:45   #15
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,255
Derakon is on a distinguished road
Quote:
Originally Posted by Nate View Post
Cool. So does the sample distribution apply to ROS where a value generated of 5 or higher becomes 5 since the max is 5 or is there a different chart from 0 to 5 for ROS? Thank you for providing this detailed info.
The table I quoted would be compressed to have 6 columns instead of 11. So yes, there's a "different chart" for each possible max value. Except that there's no actual chart; the table is simply an example of what running the algorithm with a specific max tens of thousands of times generated. I quoted the table because it was easier than trying to explain the actual distribution used.
Derakon is online now   Reply With Quote
Old October 28, 2010, 17:34   #16
Nate
Rookie
 
Join Date: Mar 2010
Posts: 19
Nate is on a distinguished road
I should be able to generate a chart for the normal distribution from 0-5 from here. Thanks so much Omnipact and Derakon.
Nate is offline   Reply With Quote
Old October 28, 2010, 17:57   #17
Nate
Rookie
 
Join Date: Mar 2010
Posts: 19
Nate is on a distinguished road
No, I can't. I see now that the algorithm isn't just a normal distribution between 0-10 and I wouldn't know the std dev if it was. Anyway, I'll look for the algorithm in the code if I really want to do my own chart. Thanks again.
Nate is offline   Reply With Quote
Old October 28, 2010, 18:24   #18
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,334
AnonymousHero is on a distinguished road
EDIT: ... and now I notice that there are two pages in this topic. Oh well.

My Vanilla Priest also found a +23.

http://angband.oook.cz/ladder-show.php?id=10456
AnonymousHero is offline   Reply With Quote
Old October 28, 2010, 18:43   #19
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Quote:
Originally Posted by Derakon View Post
The table I quoted would be compressed to have 6 columns instead of 11. So yes, there's a "different chart" for each possible max value. Except that there's no actual chart; the table is simply an example of what running the algorithm with a specific max tens of thousands of times generated. I quoted the table because it was easier than trying to explain the actual distribution used.
If you already have the work done to calculate this stuff, would you be willing to produce a table of the probabilities of an amulet of the magi dropped for each depth to have a pval of +4?
PowerDiver is offline   Reply With Quote
Old October 28, 2010, 19:00   #20
Nate
Rookie
 
Join Date: Mar 2010
Posts: 19
Nate is on a distinguished road
After some hunting, mostly in the object folder, I can't find the pval calculation stuff in the source. I'm assuming this is where the chart Derakon mentions is located. Any leads?
Nate is offline   Reply With Quote
Reply


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
Stealth or speed? Sirridan Vanilla 6 March 11, 2010 05:33
Target in range indicator? ChodTheWacko Vanilla 1 November 28, 2009 16:14
r1487 - Stats values randomly exchanged. marteo Vanilla 5 July 15, 2009 04:34
Now that I have speed, what to do? Big Al AAR 3 September 22, 2008 19:49
Speed Zero Vanilla 9 January 9, 2008 02:21


All times are GMT +1. The time now is 04:20.


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