Entropy and the value of information in strategic games

information-theory
entropy
value-of-information
Apply Shannon entropy to game-theoretic information sets, quantify uncertainty reduction, and compare the value of perfect versus imperfect information using R implementations.
Author

Raban Heller

Published

May 8, 2026

Keywords

Shannon entropy, value of information, information sets, perfect information, imperfect information, game theory, R

Introduction & motivation

In strategic interactions, what you know — and what you know your opponent knows — can be worth more than any payoff in the matrix. Shannon entropy, the foundational measure of uncertainty from information theory, provides a precise language for quantifying this strategic ignorance. When a player faces an information set containing multiple nodes, their uncertainty about the true game state can be measured in bits. The reduction of that uncertainty — through signals, observations, or communication — constitutes the value of information. Game theorists distinguish between perfect information (every information set is a singleton, as in chess) and imperfect information (some sets contain multiple nodes, as in poker). The difference is not merely categorical: entropy lets us place it on a continuous scale. A player holding a hand in poker has partial information — some entropy has been resolved, but residual uncertainty remains about opponents’ holdings. The value of perfect information (VPI) is the expected payoff gain from resolving all uncertainty before acting, while the value of imperfect information depends on the specific signal structure. This tutorial formalises these concepts using Shannon’s entropy, implements them in R, and visualises how information value varies across different game structures. Understanding these foundations is essential for mechanism design (where the principal chooses what information to reveal), Bayesian games (where players update beliefs), and modern applications in algorithmic game theory where information asymmetries are deliberately engineered.

Mathematical formulation

Let \(\Theta = \{\theta_1, \dots, \theta_n\}\) be a finite set of game states (nature’s moves) with prior probability distribution \(p(\theta_i)\). The Shannon entropy of the state uncertainty is:

\[ H(\Theta) = -\sum_{i=1}^{n} p(\theta_i) \log_2 p(\theta_i) \]

with the convention \(0 \log_2 0 = 0\). Entropy is maximised at \(\log_2 n\) when the distribution is uniform and equals zero when the state is known with certainty.

Given a signal \(S\) that induces posterior beliefs \(p(\theta | s)\), the conditional entropy is:

\[ H(\Theta | S) = \sum_{s} p(s) \left[ -\sum_{i} p(\theta_i | s) \log_2 p(\theta_i | s) \right] \]

The mutual information \(I(\Theta; S) = H(\Theta) - H(\Theta | S) \geq 0\) measures how many bits the signal resolves.

In a game-theoretic context, the value of perfect information (VPI) is the expected payoff difference between the informed and uninformed decision:

\[ \text{VPI} = \sum_{i} p(\theta_i) \max_a u(a, \theta_i) - \max_a \sum_{i} p(\theta_i) u(a, \theta_i) \]

where \(u(a, \theta)\) is the payoff from action \(a\) in state \(\theta\). VPI is always non-negative — information never hurts a single decision-maker (though in games, this need not hold).

R implementation

We implement functions to compute Shannon entropy, conditional entropy, mutual information, and the value of perfect versus imperfect information for a simple decision problem embedded in a game-theoretic context.

# Shannon entropy in bits
shannon_entropy <- function(p) {
  p <- p[p > 0]  # remove zeros

  -sum(p * log2(p))
}

# Conditional entropy H(Theta | S)
conditional_entropy <- function(joint) {
  # joint is a matrix: rows = states, cols = signals
  # joint[i,j] = P(theta_i, s_j)
  p_s <- colSums(joint)
  h_cond <- 0
  for (j in seq_along(p_s)) {
    if (p_s[j] > 0) {
      posterior <- joint[, j] / p_s[j]
      h_cond <- h_cond + p_s[j] * shannon_entropy(posterior)
    }
  }
  h_cond
}

# Value of perfect information
value_of_info <- function(prior, payoff_matrix) {
  # prior: vector of state probabilities

  # payoff_matrix: actions x states
  informed <- sum(prior * apply(payoff_matrix, 2, max))
  uninformed <- max(payoff_matrix %*% prior)
  list(vpi = informed - uninformed,
       informed_payoff = informed,
       uninformed_payoff = uninformed)
}

# --- Example: 2-state, 2-action decision problem ---
prior <- c(0.5, 0.5)
payoff_mat <- matrix(c(10, 2, 3, 8), nrow = 2, byrow = TRUE,
                     dimnames = list(c("Attack", "Defend"),
                                     c("State_A", "State_B")))

cat("Prior entropy:", shannon_entropy(prior), "bits\n")
Prior entropy: 1 bits
cat("Payoff matrix:\n"); print(payoff_mat)
Payoff matrix:
       State_A State_B
Attack      10       2
Defend       3       8
voi <- value_of_info(prior, payoff_mat)
cat(sprintf("Uninformed expected payoff: %.1f\n", voi$uninformed_payoff))
Uninformed expected payoff: 6.0
cat(sprintf("Informed expected payoff:   %.1f\n", voi$informed_payoff))
Informed expected payoff:   9.0
cat(sprintf("Value of perfect info:      %.1f\n", voi$vpi))
Value of perfect info:      3.0
# --- Varying prior and computing entropy + VPI ---
results <- tibble(
  p_A = seq(0.01, 0.99, by = 0.01),
  p_B = 1 - p_A,
  entropy = mapply(function(a, b) shannon_entropy(c(a, b)), p_A, p_B),
  vpi = mapply(function(a, b) {
    value_of_info(c(a, b), payoff_mat)$vpi
  }, p_A, p_B)
)

Static publication-ready figure

results_long <- results |>
  pivot_longer(cols = c(entropy, vpi),
               names_to = "measure",
               values_to = "value") |>
  mutate(measure = recode(measure,
    "entropy" = "Shannon entropy (bits)",
    "vpi" = "Value of perfect information"
  ))

p_entropy <- ggplot(results_long, aes(x = p_A, y = value, color = measure)) +
  geom_line(linewidth = 1.1) +
  geom_vline(xintercept = 0.5, linetype = "dashed", color = "grey50", linewidth = 0.4) +
  scale_color_manual(values = c(
    "Shannon entropy (bits)" = okabe_ito[1],
    "Value of perfect information" = okabe_ito[5]
  ), name = NULL) +
  labs(
    title = "Entropy and value of information in a strategic decision",
    subtitle = "2-state game: Attack/Defend against State A/B",
    x = expression(P(theta[A])),
    y = "Value"
  ) +
  theme_publication()

p_entropy
Figure 1: Figure 1. Shannon entropy and value of perfect information as functions of the prior probability of State A in a 2-state, 2-action strategic decision. Entropy peaks at the uniform prior (p = 0.5); VPI peaks where the uninformed decision is most uncertain — the prior at which the optimal uninformed action switches. Okabe-Ito palette.

Interactive figure

# Build an interactive version with signal quality exploration
signal_qualities <- c(0.5, 0.6, 0.7, 0.8, 0.9, 1.0)
signal_results <- bind_rows(lapply(signal_qualities, function(q) {
  tibble(
    p_A = seq(0.01, 0.99, by = 0.01),
    signal_quality = paste0("q = ", q),
    entropy_reduction = mapply(function(pA) {
      prior_h <- shannon_entropy(c(pA, 1 - pA))
      # Signal with quality q: P(s_A | theta_A) = q
      joint <- matrix(c(pA * q, pA * (1 - q),
                         (1 - pA) * (1 - q), (1 - pA) * q),
                       nrow = 2, byrow = TRUE)
      cond_h <- conditional_entropy(joint)
      prior_h - cond_h
    }, p_A),
    text = paste0("P(A) = ", round(p_A, 2),
                  "\nSignal quality: ", q,
                  "\nBits resolved: ", round(entropy_reduction, 3))
  )
}))

p_signal <- ggplot(signal_results,
                   aes(x = p_A, y = entropy_reduction,
                       color = signal_quality, text = text)) +
  geom_line(linewidth = 0.8) +
  scale_color_manual(values = setNames(okabe_ito[1:6], unique(signal_results$signal_quality)),
                     name = "Signal quality") +
  labs(
    title = "Mutual information by signal quality",
    subtitle = "Bits of uncertainty resolved for varying priors and signal accuracy",
    x = expression(P(theta[A])),
    y = "Mutual information (bits)"
  ) +
  theme_publication()

ggplotly(p_signal, tooltip = "text") |>
  config(displaylogo = FALSE,
         modeBarButtonsToRemove = c("select2d", "lasso2d"))
Figure 2

Interpretation

The relationship between entropy and the value of information reveals a fundamental asymmetry in strategic settings. While Shannon entropy is a symmetric function of the prior — maximised at the uniform distribution and decreasing toward both extremes — the value of perfect information is not symmetric in general. VPI peaks at the prior where the uninformed decision-maker is exactly indifferent between actions, the critical threshold where additional information tips the balance. Away from this threshold, even substantial uncertainty (high entropy) may have low value because the optimal action is robust to the remaining ambiguity. This distinction matters profoundly for mechanism design: a principal choosing what to reveal should focus not on maximising entropy reduction in the abstract, but on targeting the specific uncertainty that influences the agent’s action choice. The signal quality analysis reinforces this: a noisy signal (low \(q\)) provides diminishing returns, and the mutual information curve shows that the marginal value of signal accuracy is highest near \(q = 1\). In multi-player settings, information value can become negative — revealing your private information to an opponent may hurt you — breaking the single-agent guarantee that information is always beneficial. This fundamental tension drives much of the theory of strategic information revelation, cheap talk, and signalling games explored elsewhere in #equilibria.

References

Back to top

Reuse

Citation

BibTeX citation:
@online{heller2026,
  author = {Heller, Raban},
  title = {Entropy and the Value of Information in Strategic Games},
  date = {2026-05-08},
  url = {https://r-heller.github.io/equilibria/tutorials/information-theory/entropy-and-strategic-information/},
  langid = {en}
}
For attribution, please cite this work as:
Heller, Raban. 2026. “Entropy and the Value of Information in Strategic Games.” May 8. https://r-heller.github.io/equilibria/tutorials/information-theory/entropy-and-strategic-information/.