Description Usage Arguments Details Value Examples
View source: R/SRSA_UttChoiceOptimization.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.
1 2 3 4 5 6 | getSimpleBestInfGainUttPreferences(
currentObjects,
softPrefValue,
notObeyInst,
klValueFactor
)
|
currentObjects |
A vector of three values in The target is the first object in the vector |
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, zero or positive:
|
This function uses the function simpleBestInfGainUtterance
.
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 validUtterances vector.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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)
Then uttering solid or blue would be best in order to gain
information about the shape preferences of the listener:
getSimpleBestInfGainUttPreferences(currentObjects, 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.