This is a Lewis signaling game — the canonical toy model behind emergent-communication research in multi-agent RL, and the theoretical ancestor of how modern LLM-agent frameworks (AutoGen, CrewAI) coordinate through structured messages instead of a hand-designed protocol.
Each episode: a random target concept is shown to the Sender. It samples a discrete symbol from its own learned distribution over the vocabulary:
P(symbol | concept) = softmax(L_sender[concept])
The symbol crosses the channel with no built-in meaning. The Receiver samples a guess from its own distribution over concepts, conditioned only on the symbol it heard:
P(guess | symbol) = softmax(L_receiver[symbol])
Reward is 1 if the guess matches the target, else 0. Both agents update with REINFORCE (policy-gradient), nudging the logits of the action they actually took toward higher probability when the round succeeded, and away from it when it failed:
advantage = reward − 0.5
L[state][action] += lr · advantage · ( 1[a=action] − P(a) ) for every action a
Neither agent is told what any symbol "means" — a shared code is not designed, it is discovered purely from the shared incentive to succeed together. Watch the protocol entropy readout: it starts near log₂(V) bits (symbols used almost uniformly at random) and falls toward 0 as the sender's mapping collapses onto one confident symbol per concept — the moment a stable language has emerged.
- Vocabulary size — fewer symbols than concepts forces the agents to reuse a symbol for more than one object, which caps the achievable success rate.
- Learning rate — how aggressively logits move after each round; too high causes the protocol to thrash instead of converging.
- Training speed — episodes simulated per second; the 3D scene replays a sampled recent round so you can watch individual transactions even at high speed.