nhra_gt.subgames.sequential¶
Sequential and Alternating-Offer Bargaining Solvers.
Includes Rubinstein infinite-horizon bargaining and Stackelberg leader-follower equilibrium solvers.
Functions¶
rubinstein_solution(pie_size=1.0, delta_1=0.9, delta_2=0.9, first_mover=0)
¶
Calculates the Subgame Perfect Equilibrium share for the first mover in an infinite-horizon alternating offers bargaining game.
Formula: share = (1 - delta_2) / (1 - delta_1 * delta_2)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pie_size
|
float
|
Total value to split. |
1.0
|
delta_1
|
float
|
Discount factor for Player 1 (First Mover). |
0.9
|
delta_2
|
float
|
Discount factor for Player 2 (Second Mover). |
0.9
|
first_mover
|
int
|
0 for Player 1, 1 for Player 2. (Not used in formula directly, assumes caller handles mapping). |
0
|
Returns:
| Type | Description |
|---|---|
float
|
The share of the pie received by the First Mover. |
Source code in src/nhra_gt/subgames/sequential.py
stackelberg_solution(u_leader, u_follower)
¶
Solves for the Stackelberg Equilibrium where Row is Leader and Col is Follower.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
u_leader
|
ndarray[Any, Any]
|
Payoff matrix for Leader (Row player). |
required |
u_follower
|
ndarray[Any, Any]
|
Payoff matrix for Follower (Col player). |
required |
Returns:
| Type | Description |
|---|---|
tuple[int, int]
|
Tuple (leader_action_idx, follower_action_idx). |