Add one or multiple states. Allows to specify action spaces, payoffs and state transitions via functions

rel_states(
  g,
  x,
  A1 = NULL,
  A2 = NULL,
  pi1,
  pi2,
  A.fun = NULL,
  pi.fun = NULL,
  trans.fun = NULL,
  static.A1 = NULL,
  static.A2 = NULL,
  static.A.fun = NULL,
  static.pi1,
  static.pi2,
  static.pi.fun = NULL,
  x.T = NULL,
  pi1.form,
  pi2.form,
  ...
)

rel_state(
  g,
  x,
  A1 = NULL,
  A2 = NULL,
  pi1,
  pi2,
  A.fun = NULL,
  pi.fun = NULL,
  trans.fun = NULL,
  static.A1 = NULL,
  static.A2 = NULL,
  static.A.fun = NULL,
  static.pi1,
  static.pi2,
  static.pi.fun = NULL,
  x.T = NULL,
  pi1.form,
  pi2.form,
  ...
)

Arguments

g

a relational contracting game created with rel_game

x

The names of the states

A1

The action set of player 1. A named list, like A1=list(e1=1:10), where each element is a numeric or character vector.

A2

The action set of player 2. See A1.

pi1

Player 1's payoff. (Non standard evaluation)

pi2

Player 2's payoff. (Non standard evaluation)

A.fun

Alternative to specify A1 and A2, a function that returns action sets.

pi.fun

Alternative to specify pi1 and pi2 as formula. A vectorized function that returns payoffs directly for all combinations of states and action profiles.

trans.fun

A function that specifies state transitions

x.T

Relevant when solving a capped game. Which terminal state shall be set in period T onwards. By default, we stay in state x.

pi1.form

Player 1's payoff as formula with standard evaluation

pi2.form

Player 2's payoff as formula with standard evaluation

Value

Returns the updated game

Functions

  • rel_state: rel_state is just a synonym for the rel_states. You may want to use it if you specify just a single state.