Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old December 6, 2008, 01:06   #11
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,406
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by PowerDiver View Post
Hey guys, I would really like *specific* proposals. Let me summarize badly, and you can correct me.

First off, none of you believe in statistics.
Well, I'll correct you on this for a start

Quote:
Nick's approach comes down to giving the player access to his precise damage rolls. Unfortunately, for a 4d5 weapon, it will take on average nearly 1000 hits to hit both extremes, but at least it will be down to a range like +2 to +6 pretty quickly and the player will "know" it is most likely +4, just with a messy description.
I was only really trying to answer the 'how to display' question, and chiefly from a UI point of view. My suggestion is to put the info in the 'I' display rather than clutter the one-line item description. What you display there is a matter of quasi-religious preference

Quote:
Here's another question. You get it down to +3 to +4 with 10,000 to 1 odds that it is +3. Do you still output (+3 to +4)? As someone who believes in statistics, I would prefer (+3.0001) or better yet just tell the exact answer once the odds are 10 to 1 or better.
Well, there is an underlying exact value here, which the player is approximating by repeated experiments. I'd be happy with camlost's 95% probability - although if you really believe in statistics you could go nuts and give a sample mean and standard deviation.

On the other hand, you could take the monster memory approach, and just give the exact bonuses after a (variable dependent on whatever you like) number of hits. This actually seems moderately sensible combined with instant pseudo-ID - you get an immediate feeling for how good your weapon is, and then you go and test it out to get a better idea.

In fact, and without thinking it through at all, my first reaction is that maybe magical ID could be removed altogether and replaced with this type of thing, which I guess is what UnAndrew has been trying to do all along. Hmmm.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old December 6, 2008, 08:33   #12
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Quote:
Originally Posted by Nick View Post
Well, there is an underlying exact value here, which the player is approximating by repeated experiments. I'd be happy with camlost's 95% probability - although if you really believe in statistics you could go nuts and give a sample mean and standard deviation.
I presume that I am a true believer, but what I'd use is a dagger(1d4)(+3?,+4?) where the ?s mean that the value is a best guess so far, and has certainty less than some amount like the suggested 95%. When you hit 95%, make it object_known even if your estimate is off. "You get a lucky critical in learning -- more" Extra statistics could be available through the 'I' screen.

However, in order to get there, you have to model how you receive and process information. By far the cleanest method is to use the actual damage inflicted, which generalizes immediately to learning +hit, and can be generalized to +ac if you take the right viewpoint. For the confidence intervals, you need to sum up the variances of your attacks as well as the variance of the monster hps you face and IMO that should be acceptable for estimating the sample standard deviation on damage done.

OTOH, there is a longstanding tradition that giving the exact values is cheating, and should only be done in wizard mode. If someone could come up with a good specific alternative method of gradual learning, I'd be happy to implement it to avoid giving the oldtimers fits. But it's got to be more reasonable than taking 40 hits to learn a 1d4 weapon which is absurdly pessimistic, and it's got to specify exactly how much info is known after say 4 hits.

In game turns, IMO the char should learn much much faster, because he should be able to tell the difference between a good hit and a bad hit, irrespective of total damage, so a single good hit of 5 points with a 1d4 dagger should immediately mean +1 or +2, and a single bad hit of 5 points should mean +3 or +4, or something to that effect. I know I'm off alone in my own private universe here, but those suggestions of requiring huge numbers of hits make me want to vent.
PowerDiver is offline   Reply With Quote
Old December 6, 2008, 09:05   #13
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,406
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by PowerDiver View Post
In game turns, IMO the char should learn much much faster, because he should be able to tell the difference between a good hit and a bad hit, irrespective of total damage, so a single good hit of 5 points with a 1d4 dagger should immediately mean +1 or +2, and a single bad hit of 5 points should mean +3 or +4, or something to that effect. I know I'm off alone in my own private universe here, but those suggestions of requiring huge numbers of hits make me want to vent.
Here's a possible simple means of mimicking the statistical analysis. Have a set number of points needed to determine the to-dam bonus - variable on dice (so a 1d4 weapon needs less points than a 4d5). A hit at the extremes of the damage range gives more points than a hit in the middle of the range. Once you have enough points you learn the bonus. This adapts nicely to criticals, too, since messages already indicate how good a critical is. Should be fairly straightforward to implement, too.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old December 6, 2008, 14:51   #14
Slonk
Rookie
 
Join Date: Sep 2007
Location: Pittsburgh, PA
Posts: 18
Slonk is on a distinguished road
Not to totally derail the thread, buy IIRC, EyAngband has coding that ID's wielded items after a certain amount of use. I'm not quite sure, but I think that turns resting do not help in this regard. I really liked that feature, as it meant I didn't have to waste ID on (good) stuff that was an obvious upgrade for me.
Slonk is offline   Reply With Quote
Old December 6, 2008, 18:13   #15
Mangojuice
Z+Angband Maintainer
 
Join Date: Jun 2008
Posts: 318
Mangojuice is on a distinguished road
Quote:
Originally Posted by PowerDiver View Post
Hey guys, I would really like *specific* proposals. Let me summarize badly, and you can correct me.

Mangojuice wants me to base everything off of health stars. That's more annoying to code and slows the process compared to exact values, but is still doable. I find it most inelegant, and am hoping others prefer something else, but it's better than nothing.
No, I don't. I'm criticizing the idea that you can learn an object's exact bonsus with the information actually available to the user. All you have to go on is health stars, and it doesn't help very much.

Quote:
I keep getting people telling me to "learn it gradually", but the question is how? If you will have exact knowledge after 40 hits, what should you know after 20 hits? Where does the 40 number come from?
I say keep it simple. After 40 hits (or however many) you get to learn the exact bonuses; before that you know nothing, except its pseudo-id level if you knew that.

But I see the goal here as fairly minimal. It's not really the point of this to deemphasize ID, it's to have a system to encourage people like PowerDiver to put down the pencil and just enjoy the game. I think if it was relatively quick to learn an object's bonuses by using it, he wouldn't bother with the sophisticated math, even if doing so would allow him to be a little faster at it.

Obviously, 40 is arbitrary; the number shouldn't be too big, but other than that it doesn't much matter. I suppose warrior-types should be a bit faster at it than others, though, and it could depend on perception somewhat.

EDIT: 40 is probably a bit high in this system. I would say, for a xdy weapon, you should take about O(x y^1.5) hits, say, 1+(x*(y^1.5))/4 hits. My thinking is that if we aren't going to actually keep track of hits and really analyze them, we should recognize that the worst kind of dice to learn are ones like 1d20 (23 hits) since the distribution is flat; ones like 4d4 (9 hits) are much better since you are much more likely to be getting hits of average quality. This would be for a Warrior; a Mage might take 4 times as long.
__________________
-----------------------------------------
Z+Angband: A Zangband evolution
http://tinyurl.com/5pq2bd

Last edited by Mangojuice; December 6, 2008 at 18:24.
Mangojuice is offline   Reply With Quote
Old December 6, 2008, 19:51   #16
Mangojuice
Z+Angband Maintainer
 
Join Date: Jun 2008
Posts: 318
Mangojuice is on a distinguished road
I was thinking about the mathematical problem behind this.

Given K samples from a distribution that is, say, adb+n where n is unknown, but a and b are known, what can you learn about n?

For weapons with 1 die, interestingly, it *only* matters what the maximum and minimum samples are. If you had your 1d10+n produce a bunch of samples in the range, say, 5 to 11, then that behavior is equally likely to come from 1d10+1 as from 1d10+4 or any value in between, no matter how many of the samples there are. The more samples you get the bigger the range is likely to be. For a 1dx + n weapon, it should take about 4(x-1) hits to have a 95% chance of having seen a full interval.

For weapons with 2+ dice, it's trickier. You would learn n for sure when you have seen both extremes, but as has been mentioned, it can take a long time to generate both extremes. For 2d6, for instance, you expect to see both extremes after an average of about 72 hits.

Here's a sample: let's say 2d6+n generated 9, 10, and 15 as its values. We know n >= 3, and n <= 7 for sure. For these particular rolls, the probabilistic estimate would be n ~= 4.6. But what if it was 9, 14, 15? Then the estimate would be n ~= 5.4. So internal values matter; actually, they matter a lot. Also, quantity matters: if the rolls were 9, 9, 10, 10, 15, 15, then things change; we get n ~= 4.4,

Experimenting by hand, I found that with 25 samples for 2d6+n, the most likely n was the correct one about 5/6 of the time. But it was not that unusual to see wrong bonuses getting high percentages, if the rolls were higher or lower than normal. So 25 is probably not high enough, but it's too messy to work out all the way. And then 3 dice will be different, and 4 will be different again.
__________________
-----------------------------------------
Z+Angband: A Zangband evolution
http://tinyurl.com/5pq2bd
Mangojuice is offline   Reply With Quote
Old December 6, 2008, 20:34   #17
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Quote:
Originally Posted by Mangojuice View Post
I would say, for a xdy weapon, you should take about O(x y^1.5) hits, say, 1+(x*(y^1.5))/4 hits. My thinking is that if we aren't going to actually keep track of hits and really analyze them, we should recognize that the worst kind of dice to learn are ones like 1d20 (23 hits) since the distribution is flat; ones like 4d4 (9 hits) are much better since you are much more likely to be getting hits of average quality. This would be for a Warrior; a Mage might take 4 times as long.
The leading term on the variance of xdy is x * y^2 / 12. That makes x * y^2 / 3 a reasonable cutoff for learning if all you do is to look at the average damage. However, for a 1dy weapon learning from average damage is pointless. What you want to do is look at (max - min) - (avg for die). The average time to hit both endpoints is 3 * y / 2, and it is half as much to hit endpoint or off by one on each end. Intelligent estimation combines both approaches.

Your suggestion of 1 + x * y^1.5 /4 is an interesting way to combine them. 5 hits for a 1d4 and 9 for 4d4 seem like reasonable figures for estimating. It's overly pessimistic for 1d20, but maybe that is not a big deal. We still disagree, since I think these are reasonable for a mage and a fighter could learn faster, but we are getting closer together. Also, using exact damage rather health stars speeds up the learning a bit, so perhaps I should just give in to something along these lines.

Should a high level warrior learn faster? Should things be set up so that a level 50 warrior learns the bonus on an 8d4 weapon in one hit instead of 9? I'm not complaining about learning in 9 hits, which is generous, but trying to get at the principle.

I see you posted while I was composing this. Most of what I was talking about is getting > 50% confidence that the estimate is accurate. For 95% confidence that means more trials of course.

Last edited by PowerDiver; December 6, 2008 at 20:39.
PowerDiver is offline   Reply With Quote
Old December 6, 2008, 21:05   #18
Big Al
Swordsman
 
Big Al's Avatar
 
Join Date: Apr 2007
Location: Calgary
Age: 32
Posts: 327
Donated: $18.32
Big Al is on a distinguished road
I knew that the number 40 I threw out there was way too big - on purpose. I picked it because it would give a player a choice: either accept the (small) delay and let the computer tell you what the value is after some time, or figure it out yourself slightly faster. I also picked 40 because it seemed comparable to the arbitrary amount of time that it takes to pseudo-id stuff in the first place (at low levels).

Note that for Eddie's strategy of guessing based on the number of stars a hit reduces to work, it requires the player to know (about) how many hitpoints the monsters start with. This information is only available to players who've killed enough monsters already [ if (kills > 304 / (4 + level)) for non-uniques].

What do we do here for newly created savefiles? Do you base it on only monster memory, and new players never get to be shown the +to_dam automatically? Or do you spoil things and allow the game to know what the monster's health is?

For that matter, once some kind of suitable solution to this +to_dam thing is found, you could do the opposite: change the monster memory code so that it uses stats to calculate the hit points of the monsters quicker than it is now, using stats.

Exams are in full swing right now, so my time is kind of limited at the moment, but in a week or two I'll try to take a look at the code and see if I can come up with anything suitable.
__________________
Come play Metroplexity!
Un, V MX H- D c-- f- PV s- d+ P++ M+
c-- S I++ So+ B+ ac- !GHB SQ RQ+ V+
Big Al is offline   Reply With Quote
Old December 8, 2008, 11:01   #19
andrewdoull
Unangband maintainer
 
andrewdoull's Avatar
 
Join Date: Apr 2007
Location: Sydney, Australia
Age: 45
Posts: 872
andrewdoull is on a distinguished road
Quote:
Originally Posted by Nick View Post
In fact, and without thinking it through at all, my first reaction is that maybe magical ID could be removed altogether and replaced with this type of thing, which I guess is what UnAndrew has been trying to do all along. Hmmm.
As usual I got here years ago (see object_usage() in info.c). However, it appears that I grossly overestimated the number of uses required to estimate weapon bonuses.

For your edification, the estimates UnAngband currently uses:

Code:
    /* Calculate object bonus */
    if (!object_bonus_p(o_ptr) && (o_ptr->usage > 30) && (o_ptr->usage % 30 == 0) && (rand_int(100) < 30))
    {

/* Code to show object to hit/damage bonuses */

    }
    else if ((!o_ptr->feeling) && (!o_ptr->ident & (IDENT_SENSE)) && (o_ptr->usage > 5) && (o_ptr->usage % 5 == 0)
        && (rand_int(100) < 30))
    {

/* Code to sense the item feeling */

}
Big Al - feel free to change these to your more accurate estimates.

Andrew
__________________
The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
In UnAngband, the level dives you.
ASCII Dreams: http://roguelikedeveloper.blogspot.com
Unangband: http://unangband.blogspot.com
andrewdoull is offline   Reply With Quote
Old December 8, 2008, 21:12   #20
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,406
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by andrewdoull View Post
As usual I got here years ago
Yeah, yeah, rub it in. All us mere mortals are just playing catch-up.

I don't think I'm going to go quite that far though - essentially for the reasons of style I talked about on your blog the other day. I'll probably start introducing this sort of stuff a bit at a time, and have a long term goal of phasing out ID if and when it seems like it will work.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick 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
FAA - Druid barehand damage Seany C Variants 3 October 8, 2008 11:55
Extra Damage Die AceRimmer Vanilla 4 October 1, 2008 18:41
Steam - What is that number after my damage dice? ekolis Variants 2 December 31, 2007 02:51
learning not to underestimate monster breath will_asher AAR 5 October 17, 2007 19:16
[FA] Druid melee damage Seany C Variants 5 April 28, 2007 19:22


All times are GMT +1. The time now is 18:28.


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