> Or, an improvement over that would be to use a dictionary
> (whose keys form a set anyway) with the value for a
> particular affliction-key is how many skills have been
> used that might cause that affliction (either by
> incrementing for each skill that might cause it, or by
> adding a percentage that relates to how likely that skill > is to give you that affliction .......
Problem with that is that relationships are lost between the afflictions. Some methods of curing can only be performed when you do not have other afflictions, and a 10% chance for that affliction does not properly represent the choice to make. Rspecially once you start dealing with overlapping possible afflictions (which you'll need to remove at a later stage). For example, skill A gives either x, y, or z, so you increase the chances on those, but later on, you do have a hard time determining what x and y their probability should be if said afflictions turns out to be z. Your earlier example suffers from the same dilemma: the longer you go on without a 'fresh start', the more polluted and unreliable your information becomes. (I already tried percentages to death before I arrived at this solution, heh.)
> The problem that I see with the way you're trying is if
> skill A afflicts you with one of (l, j, k) and skill B
> afflicts you with one of (l, k, m) and you cure k did you
> remove the effects of A? or B? (or both?)
Nah, I don't have that problem. For simplicity, I'll show you the output of the prototype I sent you in my email, minus some of the debugging spam.
Welcome to the affliction tester!
Try 'help' for basic instructions.
=>> import (<l, k, m>, <l, k, j>)
Interpreted set succesfully.
=>> show
Current afflictions ( 2 ):
11623696:set(['k', 'm', 'l']) (unknown range)
11623632:set(['k', 'j', 'l']) (unknown range)
=>> help identify
Forcefully identify a range into an affliction. Syntax: identify ID AFFLICTION. Or substitute ID with 'some' for the best automatic choice.
=>> identify some k
Performing identification of None into 'k'.
=>> show
Current afflictions ( 2 ):
k
11623632:set(['j', 'm', 'l']) (unknown range)
=>> discard k
Affliction 'k' removed.
This affliction stuck for 80.506 seconds.
=>> show
Current afflictions ( 1 ):
11623632:set(['j', 'm', 'l']) (unknown range)
Succesfully curing something means that you are certain you have it, thus you can identify one of the afflictions as being k. The others are adjusted so any left-over possibilities are not lost. After identification, the k option can be removed.
> A commented game transcript would probably help me :(
Well, I included the log above. A game transcript isn't really useful since I'm primarily dabbling in the higher abstractions of writing a curing system - getting uncertain afflictions, tracking them properly, being able to remove the precise affliction or all mentionings of it - without losing information that can help to better prioritize curing.
Anyhow, I hope I am not confusing you too much and I am very grateful for any (coding) insights/assistance you can offer. |