Library/Interface

This section details the interface and functions provided by POMDPStressTesting.jl.

Contents

Index

Modules

GrayBox

POMDPStressTesting.AST.GrayBox.transition!Function
transition!(sim::Union{GrayBox.Simulation, GrayBox.Simulation})::Real

Given an input sample::EnvironmentSample, apply transition and return the transition log-probability.

source
transition!(sim::GrayBox.Simulation)::Real

Apply a transition step, and return the transition log-probability (used with ASTSeedAction).

source

BlackBox

POMDPStressTesting.AST.BlackBox.evaluate!Function
evaluate!(sim::GrayBox.Simulation)::Tuple{logprob::Real, miss_distance::Real, isevent::Bool}
evaluate!(sim::GrayBox.Simulation, sample::GrayBox.EnvironmentSample)::Tuple{logprob::Real, miss_distance::Real, isevent::Bool}

Evaluate the SUT given some input seed and current state, returns logprob, miss_distance, and isevent indication. If the sample version is implemented, then ASTSampleAction will be used instead of ASTSeedAction.

source

AST

POMDPs.rewardFunction
reward(mdp::ASTMDP, logprob::Real, isevent::Bool, isterminal::Bool, miss_distance::Real)::Float64

Reward function for the AST formulation. Defaults to:

R_E       if isterminal and isevent (1)
-d        if isterminal and !isevent (2)
log(p)    otherwise (3)

1) Terminates with event, collect reward_bonus (defaults to 0)
2) Terminates without event, collect negative miss distance
3) Each non-terminal step, accumulate reward correlated with the transition probability

For epsidic reward problems (i.e. rewards only at the end of an episode), set mdp.params.episodic_rewards to get:

(log(p) - d)*R_E    if isterminal and isevent (1)
log(p) - d          if isterminal and !isevent (2)
0                   otherwise (3)

1) Terminates with event, collect transition probability and miss distance with multiplicative reward bonus
2) Terminates without event, collect transitions probability and miss distance
3) Each non-terminal step, no intermediate reward (set `mdp.params.give_intermediate_reward` to use log transition probability)
source
POMDPs.genFunction

Generate next state and reward for AST MDP (handles episodic reward problems). Overridden from POMDPs.gen interface.

source
POMDPs.isterminalFunction

Determine if AST MDP is in a terminal state. Overridden from POMDPs.isterminal interface.

source
POMDPs.discountFunction

AST problems are (generally) undiscounted to treat future reward equally. Overridden from POMDPs.discount interface.

source
POMDPs.actionFunction

Randomly select next action, independent of the state. Overridden from POMDPs.action interface.

source
Missing docstring.

Missing docstring for actions. Check Documenter's build log for details.

POMDPStressTesting.AST.rolloutFunction

Rollout simulation for MCTS; used by the MCTS DPWSolver as the estimate_value function. Custom rollout records action trace once the depth has been reached.

source
POMDPStressTesting.AST.rollout_endFunction

Rollout to only execute SUT at end (p accounts for probabilities generated outside the rollout)

User defined:

feed_gen Function to feed best action, replaces call to gen when feeding

feed_type Indicate when to feed best action. Either at the start of the rollout :start, or mid-rollout :mid

best_callback Callback function to record best miss distance or reward for later feeding during rollout

source

AST Types

Metrics

POMDPStressTesting.print_metricsFunction
print_metrics(planner)
print_metrics(mdp::ASTMDP)
print_metrics(metrics::ASTMetrics)

Print failure metrics including:

  • iteration of first failure
  • number of failures
  • failure rate
  • highest log-likelihood of failure
source

Visualizations/Figures