Description Usage Arguments Value Examples
View source: R/SRSA_UttChoiceOptimization_FeatureTypeFocus.R
Simple RSA
Determines the optimal utterance for the best information gain.
These are based on the valid utterances determined from the current objects in the scene.
The inferred listener's object preferences are computed assuming the listener picks a certain object and has certain object preferences.
Utterances of the feature type focus are filtered out (e.g. if you are interested in color preferences - so you are not allowed to utter colors!) validUtterancesFTF correspond to all features present in the current objects except those of the featureTypeFocus!
1 2 3 4 5 6 7 | getSimpleBestInfGainUttPreferencesFTF(
currentObjects,
featureTypeFocus,
softPrefValue,
notObeyInst,
klValueFactor
)
|
currentObjects |
A vector of three values in The target is the first object in the vector |
featureTypeFocus |
A value between 1-3. It specifies the feature the speaker is interested to know more about and is not allowed to utter. (shape = 1, pattern = 2, color = 3). |
softPrefValue |
A parameter value between Value reflects how categorical the listener's preferences are: 0: The listener always picks her preferred object. If the listener prefers red objects, she will always pick the red object in the scene. infinity: It is as likely for the listener to pick green, blue or red objects. |
notObeyInst |
Determines the extent to which the instruction of the speaker is obeyed by the listener. (0 = full obedience, infinity = full instruction ignorance). Example: 0: Listener always picks red objects following the utterance "red". infinity: Listener as likely to pick green, blue or red objects even if the utterance is "red". |
klValueFactor |
A parameter that can be negative, 0 or positive:
|
A vector containing the normalized probability over utterances given the listener's object preference priors.
The utterance with the highest probability is the one that maximizes the information gain for the speaker.
The vector has the same length as the validUtterancesFTF vector.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | In the case of these objects being in a scene:
[shape] [pattern] [color]
[1,] "cloud" "solid" "blue"
[2,] "circle" "solid" "blue"
[3,] "square" "solid" "blue"
and these being the indices for the valid utterances:
[1] 1 2 3 4 7 (cloud, circle, square, solid, blue)
Since you are interested in shape (featureTypeFocus = 1) you are only
allowed to utter "solid" (index = 4) or "blue" (index = 7):
validUtterancesFTF:
[1] 4 7
Then uttering solid or blue would be best in order to gain
information about the shape preferences of the listener:
getSimpleBestInfGainUttPreferencesFTF (currentObjects, featureTypeFocus,
softPrefValue, notObeyInst, klValueFactor)
output:
[1] 0.0 0.0 0.0 0.5 0.5
You can see here that the indices with the highest probability, namely 4 and 5,
correspond to the indices in the validUtterance vector for the feature
values 4 (solid) (index = 4) and 7 (blue) (index = 5).
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.