simpleBestInfGainUtterance.Rd
Simple RSA
The ultimate function that determines the utterance preferences of a speaker, who wants to learn about the listener's preferences. The speaker considers all relevant utterances given the currentObjects. He also considers all prior feature value preferences (of the listener) and all possible object choices.
NOTE: This can be manipulated to make the speaker focus on one particular feature type preference by setting the other feature value preferences to zero!
The function infers the resulting posterior feature value preferences of the listener in the particular scenario. It computes the Kullback-Leibler divergence between the expected prior and inferred posterior feature value preferences and finally determines the utility value for the considered utterance in the imagined scenario, adding this utility to all scenarios for each considered utterance.
The utility is determined as the expected information gain between prior and posterior of the determined listener's object preferences.
simpleBestInfGainUtterance( preferencesPrior, validUtterances, currentObjects, uttToObjProbs, objectPreferenceSoftPriors, klValueFactor = 1 )
preferencesPrior | A vector of the length the validUtterances vector + 1. It constructed as such:
The vector contains the probability mass over all feature values present in the scenario plus a "no preference" case. Gives a prior preferences distribution over the feature values in the scene. |
---|---|
validUtterances | A vector of utterances that correspond to all feature values present in the current objects in the scene. For example, it only makes sense to utter "red" in a scene if there are red objects present. |
currentObjects | A vector of three values in The target is the first object in the vector |
uttToObjProbs | A matrix. The rows map each possible utterance that corresponds to each present feature value of the current objects. The columns represent the three objects in the scene. This reflects the obedience-parameter and which objects match the respective utterance. The matrix shows the probability that a certain object is chosen following a certain utterance, that is valid in the scene. The number of rows of the matrix match the length of the validUtterances vector. |
objectPreferenceSoftPriors | A list of preference priors for all valid utterances based on the object in the scene. The list has as many rows as the length of the validUtterances vector + 1. Each row in the list contains a vector of length 3, as there are three objects in the scene. The extra row is for the case of no feature preferences whatsoever, i.e. uniform prior over all three objects in the scene. |
klValueFactor | (here set to = 1) 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 validUtterances vector.