API Reference

Types

HSVIforOSPOSGs.StateType
State

Type for a state of one-sided partially observable stochastic game.

Fields:

  • index::Int - global index of the state
  • partition::Int - partition index to which the state belongs
  • belief_index::Int - in-partition index of the state
  • player2_actions::Vector{Int} - indexes of player2 actions available in this state
  • policy_index::Dict{Int,Int} - mapping from player2 action index to in-policy index
source
HSVIforOSPOSGs.PartitionType
Partition

Type for a partition of one-sided partially observable stochastic game.

Fields:

  • index::Int - global index of the partition
  • states::Vector{Int} - indexes of states that belong to this partition
  • player1_actions::Vector{Int} - indexes of player1 actions available in this partition
  • policy_index::Dict{Int,Int} - mapping from player1 action index to in-policy index
  • target::Dict{Tuple{Int,Int},Int} - mapping from player1 action index and observation index pair to target partition index
  • observations::Dict{Int,Vector{Int}} - mapping from player1 action index to indexes of possible observations
  • transitions::Dict{Tuple{Int,Int,Int},Vector{Tuple{Int,Int,Float64}}} - mapping from state index, player1 action index and player2 action index triple to possible observation index, next state index and probability triples
  • a1o_transitions::Dict{Tuple{Int,Int},Vector{Tuple{Int,Int,Int,Float64}}} - mapping from player1 action index and observation index tuple to possible state index, player2 action index, next state index and probability quadruples
  • gamma::Vector{Vector{Float64}} - vector of α-vectors representing the lower bound LB
  • upsilon::Vector{Tuple{Vector{Float64},Float64}} - vector of belief-value pairs representing the upper bound UB
source

Methods

HSVIforOSPOSGs.saveFunction
save(path::AbstractString, osposg::OSPOSG)
save(io::IO, osposg::OSPOSG)

Writes game osposg in the .osposg format to path or to IO 'io'.

source
HSVIforOSPOSGs.check_neighborhoodFunction
check_neighborhood(osposg::OSPOSG, hsvi::HSVI, epsilon::Float64)

Checks that the hsvi.neighborhood parameter is within bounds for osposg game and gap epsilon.

source
HSVIforOSPOSGs.compute_LBFunction
compute_LB(osposg::OSPOSG, hsvi::HSVI, partition::Partition, belief::Vector{Float64})

Solve LB stage game using linear program primal formulation and return policies of both players along with values of individual states.

source
HSVIforOSPOSGs.compute_UBFunction
compute_UB(osposg::OSPOSG, hsvi::HSVI, partition::Partition, belief::Vector{Float64})

Solve UB stage game using linear program dual formulation and return policies of both players along with value of the game.

source
HSVIforOSPOSGs.presolve_UBFunction
presolve_UB(osposg::OSPOSG, hsvi::HSVI, recorder::Recorder)

Presolve UB by value iteration of the perfect information variant of the game, which can be solved by linear program.

source
HSVIforOSPOSGs.presolve_LBFunction
presolve_LB(osposg::OSPOSG, hsvi::HSVI, recorder::Recorder)

Presolve LB by computing value of the game for fixed uniform policies.

source
HSVIforOSPOSGs.UB_valueFunction
UB_value(osposg::OSPOSG, hsvi::HSVI)
UB_value(::OSPOSG, ::HSVI, partition::Partition, belief::Vector{Float64})

Compute UB value in initial partition and belief of osposg or in specified partition and belief using convex hull linear program.

source
HSVIforOSPOSGs.LB_valueFunction
LB_value(osposg::OSPOSG, hsvi::HSVI)
LB_value(::OSPOSG, ::HSVI, partition::Partition, belief::Vector{Float64})

Compute LB value in initial partition and belief of osposg or in specified partition and belief using dot products of α-vectors with given belief.

source