Threat

October 9th, 2016

I have a custom operator called "Threat", which is intended to measure the degree to which one character is perceived by another to be a threat to him in dream combat. Here's the existing script, which I now think is all wrong:



    BSum3

       Number2BNumber

          product

             BNumber2Number

                PRedAuragon

                   ToWhom

                   ByWhom

             BNumber2Number

                GreenAuragon

                   ToWhom

       Number2BNumber

          product

             BNumber2Number

                PGreenAuragon

                   ToWhom

                   ByWhom

             BNumber2Number

                BlueAuragon

                   ToWhom

       Number2BNumber

          product

             BNumber2Number

                PBlueAuragon

                   ToWhom

                   ByWhom

             BNumber2Number

                RedAuragon

                   ToWhom


This just adds up the products of the three dream combat pairings, so we need only look at a single such pairing to understand how the script as a whole functions. It is made a bit confusing by all the "BNumber2Number" and "Number2BNumber" transforms, but the basic idea is to multiply together the auragon counts for circumstances in which the threat perceiver could be beaten by the other person. For example, suppose that Koopie has auragon counts of 3 red, 2 green, and 0 blue, and Koopie thinks that Skordokott has 2.6 red, 1.1 green, and 2.1 blue. Koopie would then perceive Skordokott's threat to him to be 11.5. But this is all wrong: Skordokott's greatest threat lies in his ability to use a green auragon against Koopie. Since Koopie has no blue auragon, he is certain to lose the combat.


Here's how I would rate the individual threats:


Skordokott's 2.6 red against Koopie's 2 green: a bit of a threat, but not much

Skordokott's 1.1 green against Koopie's 0 blue: Skordokott is not likely to use his green, but it's a sure win for him.

Skordokott's 2.1 blue against Koopie's 3 red: here Koopie has a definite advantage over Skordokott.


So I think what we need to do is calculate the probability that Skordokott will use a given auragon against Koopie. We'll start with the simplest possible case: Skordokott knows nothing about Koopie's auragons, so he'll pick solely on the basis of his own auragon counts. In that case, the probabilities look like this:


45% chance of using red

19% chance of using green

36% chance of using blue


Let's now assume that Koopie uses these values to guide his choice of auragon. He would conclude that Skordokott is most likely to use his red, so he would want to play a blue auragon, but he doesn't have any blue auragons. So he would play his red auragon in the expectation of getting a tie. Applying that to Skordokott's probabilities, Koopie gets the following result:


45% chance of a tie

19% chance of a win

36% chance of a loss


counting a tie as worth 0, a win as worth 1, and a loss as worth -1, then the likely outcome of dream combat with Skordokott is -0.17. That's a measure of how much threat Skordokott poses to Koopie.


Now it's time to consider variations on this process. Suppose that Koopie as a blue auragon, and assesses Skordokott as the same as above. Then Koopie wants to use his blue auragon, and the results table looks like this:


45% chance of a win

19% chance of a loss

36% chance of a tie


For a net score of +0.26 -- meaning that Koopie sees little threat from Skordokott.


But there are other considerations. First, in such a battle, he has a 36% chance of losing his only blue auragon, which could be devastating in future combats. Should that be factored into the calculation? I don't see how to do it.


The next consideration is the fact that Koopie cannot assume that Skordokott is completely ignorant of Koopie's auragon counts. The more Skordokott knows about Koopie's auragon counts, the more likely he will be to adjust his probabilities to take advantage of Koopie's weaknesses. I see how to do this. If Skordokott knows Koopie's auragon counts perfectly, then his probabilities will be based on Koopie's values. Let's take the case where Koopie has 3 red, 2 green, and 1 blue. In that case, Skordokott would assume these probabilities of Koopie:


50% chance of using red

33% chance of using green

16% chance of using blue


This would lead Skordokott to conclude that his best choice against Koopie would be his blue auragon -- in which case Koopie's best choice would be his green auragon. 


BUT! Skordokott does not know Koopie's auragon counts perfectly. SO his likely action will be a blend of the two calculations, leaning toward the latter the more confident he is about Koopie's auragon counts.


Which brings up the subject of certainties. I have to completely redesign these algorithms to take into account the certainty values of all these perceived values. Stay tuned.