Post by chriscrawford on Sept 29, 2016 13:54:57 GMT -8
As a demonstration of the problems of writing scripts for Siboot, I shall walk through an example. I have the verb "What's new?", in which Subject asks DirObject for anything interesting to say. In the role of DirObject, I have four options: "No news"; "Gossip"; "declare"; and "disclose". For the option "declare" (which means "Subject discloses to DirObject that he (Subject) believes that 4Actor possesses 5ActorTrait in magnitude 6Quantifier with certainty 7Certainty. I must write the Acceptable and Desirable scripts for every one of these WordSockets. Herewith the process:
DirObject: easy peasy.
Acceptable is AllActorsWho of {AreSameActor of {CandidateActor, ThisSubject}}
Desirable is 0.0, because there's only one actor who meets the Acceptable requirement
4Actor: much more difficult. Must select one of the three Actors who is NOT present. How to choose? It shouldn't be arbitrary; the ReactingActor should select somebody who is important to talk about. Here I shall take advantage of two Custom Operators I have created: Esteem and Threat. The first is the sum of all three perceived values (pTrust, pHonest, -pPowerful); the second is a long complicated formula that determines the likelihood that the actor in question could defeat the ReactingActor in Dream Combat. Hence:
Acceptable: all actors who aren't Subject or DirObject
Desirable: random selection between Esteem and -Threat.
5ActorTrait: This could be done cleverly, but I decided to base it on a random choice between any auras that have not yet been told. This really should use IHaventDoneThisSince{x} instead of IHaventDoneThisBefore, where x is about a day or two.
Acceptable: AllActorTraitsWhich of {AND of {isAura of {CandidateActorTrait}, IHaventDoneThisBefore}
Desirable: random
6Quantifier: Once again, I'm going to pass up an opportunity to be clever. My actors should be able to strategically lie, but right now I just want to get things working, so I'll skip that opportunity for the moment. Instead, I just tell the truth. I rely on the special operator Suitability, which produces a value corresponding to how closely a Quantifier's value matches the value of the expression in the second position of the operator.
Acceptable: AllQuantifiersWhich of true (in other words, all quantifiers are acceptable.)
Desirable: Suitability of {CandidateQuantifier, CorrespondingPActorTrait of {ReactingActor, Chosen4Actor, Chosen5ActorTrait}}
7Certainty: This is handled the same way that 6Quantifier is handled, except that it calculates a Certainty value using CorrespondingUActorTrait. I ran into a nasty little problem here: the operator CandidateCertainty was not available on the menus. Apparently the menu populating algorithm had a problem with CandidateCertainty. This is one of the advantages of being the programmer: I broke into the XML file for the storyworld and manually inserted CandidateCertainty.
But now comes the killer problem: how to assign a Desirable value to the Option? That is, what should incline the actor to select this option over any of the others? This is where I hit the brick wall. I don't know where to begin here. I'll be back when I come up with some ideas.
DirObject: easy peasy.
Acceptable is AllActorsWho of {AreSameActor of {CandidateActor, ThisSubject}}
Desirable is 0.0, because there's only one actor who meets the Acceptable requirement
4Actor: much more difficult. Must select one of the three Actors who is NOT present. How to choose? It shouldn't be arbitrary; the ReactingActor should select somebody who is important to talk about. Here I shall take advantage of two Custom Operators I have created: Esteem and Threat. The first is the sum of all three perceived values (pTrust, pHonest, -pPowerful); the second is a long complicated formula that determines the likelihood that the actor in question could defeat the ReactingActor in Dream Combat. Hence:
Acceptable: all actors who aren't Subject or DirObject
Desirable: random selection between Esteem and -Threat.
5ActorTrait: This could be done cleverly, but I decided to base it on a random choice between any auras that have not yet been told. This really should use IHaventDoneThisSince{x} instead of IHaventDoneThisBefore, where x is about a day or two.
Acceptable: AllActorTraitsWhich of {AND of {isAura of {CandidateActorTrait}, IHaventDoneThisBefore}
Desirable: random
6Quantifier: Once again, I'm going to pass up an opportunity to be clever. My actors should be able to strategically lie, but right now I just want to get things working, so I'll skip that opportunity for the moment. Instead, I just tell the truth. I rely on the special operator Suitability, which produces a value corresponding to how closely a Quantifier's value matches the value of the expression in the second position of the operator.
Acceptable: AllQuantifiersWhich of true (in other words, all quantifiers are acceptable.)
Desirable: Suitability of {CandidateQuantifier, CorrespondingPActorTrait of {ReactingActor, Chosen4Actor, Chosen5ActorTrait}}
7Certainty: This is handled the same way that 6Quantifier is handled, except that it calculates a Certainty value using CorrespondingUActorTrait. I ran into a nasty little problem here: the operator CandidateCertainty was not available on the menus. Apparently the menu populating algorithm had a problem with CandidateCertainty. This is one of the advantages of being the programmer: I broke into the XML file for the storyworld and manually inserted CandidateCertainty.
But now comes the killer problem: how to assign a Desirable value to the Option? That is, what should incline the actor to select this option over any of the others? This is where I hit the brick wall. I don't know where to begin here. I'll be back when I come up with some ideas.