I was given a chance to write an overview article on game theoretic pragmatics for the Oxford Research Encyclopedia of Linguistics. I tried to present side by side:

  1. evolutionary game theory,
  2. “classical” game theory, and also
  3. probabilistic approaches in the style of the rational speech act model.

In doing so, I wrote a few R functions that might be of use to others as well. It can all be found here. There are a few innovative things, but the overview article was not really the place to go into this at any lenght. So, here’s a little rundown of what’s in the code and what might be interesting about it.

Game models

The article discusses six game models. Some are meant to show how game theoretic approaches could provide an explanation for patterns of pragmatic language use (e.g., scalar, M-, I- or free-choice implicatures). Others are meant to show what game theoretic context models could do in addition (e.g., having rather specific utility functions that may encode specific assumptions about what counts as how communicatively successful).

Here’s the game for I-implicatures:

I_implicature_game
## $states
## [1] "cow"  "goat"
## 
## $messages
## [1] "milk"        "cow's milk"  "goat's milk"
## 
## $semantics
##             cow goat
## milk          1    1
## cow's milk    1    0
## goat's milk   0    1
## 
## $utils
##      cow goat
## cow    1    0
## goat   0    1
## 
## $prior
##  cow goat 
## 0.75 0.25 
## 
## $message_preferences
##        milk  cow's milk goat's milk 
##         1.0         0.8         0.8

The example assumed here is an utterance of a sentence like I had a glass of milk this morning which would usually be taken to mean that the speaker had cow’s milk not goat’s milk, at least in cultures where it is much more common to drink cow’s milk. There are two states: the speaker either drank cow’s milk or goat’s milk. The prior information in I_implicature_game$prior indicates that the former is more likely. Utterance alternatives are the underspecified milk, alongside the fully explicit cow’s/goat’s milk. I_implicature_game$message_preferences encodes preferences for these expressions. These are not the usual costs that are subtracted from the payoffs, but factors by which to multiply the payoffs. The utilities in I_implicature_game$utils are the usual one-zero kind: a payoff of 1 for successful communication and a 0 otherwise. Multiplicative preferences on messages have the effect that they weigh less when chances of communicative success are bleak. This, together with some solution concepts like the replicator dynamic or probabilistic reasoning in the tradition of the Rational Speech Act model, allows for a higher chance of using dispreferred messages in cases where no utterance has a high chance of communicative success. In other words, agents effectively explore more when they are out of options.

So, here’s what might be a fun new idea: why not have utterance preferences depend on expectations of communicative success? It turns out that this avoids some problems, e.g., with M-implicatures in the rational speech act model.

Solution concepts

There are four solution concepts implemented in the code:

  1. replicator dynamic
  2. iterated best response
  3. iterated quantal response
  4. rational speech act

So far only very little work in game theoretic pragmatics has used evoltionary game theory. But it’s an interesting question as well to ask whether a general model of gradual optimization of behavior, such as the replicator dynamic, would lead to behavior that looks like our actual pragmatic use of language. Indeed, for the cases look at here, it does. The key is to make the same assumption as we normally do in iterated best/quantal response models or in the rational speech act model: start off with (hypothetical) literal language use. The replicator dynamic is deterministic. A single simulation run suffices to drive home the main point: startging from literal language use, the replicator dynamic approaches exactly the right behavioral convention.

Here’s how you can check with the code I wrote.

apply_RD(I_implicature_game, iterations = 100)
## $sender
##              milk  cow's milk goat's milk
## cow   1.00000e+00 7.86014e-10           0
## goat 6.73858e-187 0.00000e+00           1
## 
## $receiver
##             cow         goat
## milk          1 2.68226e-196
## cow's milk    1  0.00000e+00
## goat's milk   0  1.00000e+00

This is is the outcome of 100 iterations of the discrete time replicator dynamic in behavioral strategies for the I-implicature game, starting with the literal strategy, which is this:

## $sen
##      milk cow's milk goat's milk
## cow   0.5        0.5         0.0
## goat  0.5        0.0         0.5
## 
## $rec
##             cow goat
## milk        0.5  0.5
## cow's milk  1.0  0.0
## goat's milk 0.0  1.0