Post by chriscrawford on Apr 10, 2016 11:56:52 GMT -8
For the last two days I have been paralyzed by a nasty little problem: figuring out the algorithm for calculating certainties of P3 values. These are obtained from statements of the form "Subject discloses to DirObject that 4Actor believes that DirObject has trait 5ActorTrait in quantity 6Quantifier with certainty 7Uncertainty.
An aside: I have oscillated between the terms "certainty" and "uncertainty" throughout the design process. In terms of SympolTalk, we use "certainty", but in terms of the internal calculations, I think in terms of "uncertainty", because that's the way we think about it in statistics. But I really must put an end to this oscillation; it's time to nail down the terminology. On the one hand, it seems good to think of certainty as a positive value, and uncertainty as a negative value. This would require me to call the variable "Certainty". However, in the menus, it's called "Confidence". In the code, it's called "Uncertainty". The sympols are labeled to make certainty positive. Sheesh, what a mess!
OK, so I simply have to go through everything and re-label it to make the variable to be "Certainty".
This turns out to be a horrendous task. Everything associated with this was working perfectly, but somehow, when I refactored the various labels, everything went to hell. I spent several hours trying to track down the problem, but it was buried deep in the obscurities of Java operation. When Java deciphers an XML document, it does not appear to follow any logical path. Even the documentation states that one cannot rely on any particular order of execution.
After much wasted time, I decided to backtrack. I threw away all the work that I have done in the last 24 hours and started over, determined to proceed one tiny step at a time.
I might as well post this message now; I'm not going to solve this problem in a few hours.
Anyway, DirObject has existing values of P3(DirObject, 4Actor, DirObject) and U3(DirObject, 4Actor, DirObject). What makes this calculation difficult is that it also requires DirObject to take into consideration both 7Certainty (Subject's declared certainty in his statement) AND P2Honest(DirObject, Subject) -- how much DirObject trusts Subject.
DirObject must carry out three calculations in response to the statement:
1. the new value of P3(DirObject, 4Actor, DirObject)
2. the new value of U3(DirObject, 4Actor, DirObject)
3. modify P2(DirObject, Subject) in proportion to which Subject's statement deviates from the existing value of P3, and in inverse proportion to 7Uncertainty
Calculation #1 is the easiest of the three. The existing P3 is blended with the new P3 with, with weighting factor based on both 7Uncertainty and P2Honest(DirObject, Subject). Something like this:
P3(DirObject, 4Actor, DirObject) = Blend(P3(DirObject, 4Actor, DirObject), 6Quantifier, BDifference(7Uncertainty, P2Honest(DirObject, Subject)))
An aside: I have oscillated between the terms "certainty" and "uncertainty" throughout the design process. In terms of SympolTalk, we use "certainty", but in terms of the internal calculations, I think in terms of "uncertainty", because that's the way we think about it in statistics. But I really must put an end to this oscillation; it's time to nail down the terminology. On the one hand, it seems good to think of certainty as a positive value, and uncertainty as a negative value. This would require me to call the variable "Certainty". However, in the menus, it's called "Confidence". In the code, it's called "Uncertainty". The sympols are labeled to make certainty positive. Sheesh, what a mess!
OK, so I simply have to go through everything and re-label it to make the variable to be "Certainty".
This turns out to be a horrendous task. Everything associated with this was working perfectly, but somehow, when I refactored the various labels, everything went to hell. I spent several hours trying to track down the problem, but it was buried deep in the obscurities of Java operation. When Java deciphers an XML document, it does not appear to follow any logical path. Even the documentation states that one cannot rely on any particular order of execution.
After much wasted time, I decided to backtrack. I threw away all the work that I have done in the last 24 hours and started over, determined to proceed one tiny step at a time.
I might as well post this message now; I'm not going to solve this problem in a few hours.
Anyway, DirObject has existing values of P3(DirObject, 4Actor, DirObject) and U3(DirObject, 4Actor, DirObject). What makes this calculation difficult is that it also requires DirObject to take into consideration both 7Certainty (Subject's declared certainty in his statement) AND P2Honest(DirObject, Subject) -- how much DirObject trusts Subject.
DirObject must carry out three calculations in response to the statement:
1. the new value of P3(DirObject, 4Actor, DirObject)
2. the new value of U3(DirObject, 4Actor, DirObject)
3. modify P2(DirObject, Subject) in proportion to which Subject's statement deviates from the existing value of P3, and in inverse proportion to 7Uncertainty
Calculation #1 is the easiest of the three. The existing P3 is blended with the new P3 with, with weighting factor based on both 7Uncertainty and P2Honest(DirObject, Subject). Something like this:
P3(DirObject, 4Actor, DirObject) = Blend(P3(DirObject, 4Actor, DirObject), 6Quantifier, BDifference(7Uncertainty, P2Honest(DirObject, Subject)))