DiscreteTimeSparseModelSimulator

Warning

The stormpy developer API is internal and can be subject to change.

class DiscreteTimeSparseModelSimulator[ValueType](model: stormpy.models.SparseModel[ValueType])

Simulator for sparse discrete-time models

Template arguments:

  • ValueType (type)

Available specializations:

  • DiscreteTimeSparseModelSimulator[float]

  • DiscreteTimeSparseModelSimulator[stormpy.numbers.Rational]

Construction

Create simulator

The specialization can be inferred from the first positional constructor argument (alternatively, the model or original_model keyword argument).

Members

DiscreteTimeSparseModelSimulator.get_current_state(
self: stormpy.developer.DiscreteTimeSparseModelSimulator[ValueType],
) → int

Get the current state

DiscreteTimeSparseModelSimulator.get_last_rewards(
self: stormpy.developer.DiscreteTimeSparseModelSimulator[ValueType],
) → list[ValueType]

Get the rewards obtained in the last step

DiscreteTimeSparseModelSimulator.random_step(
self: stormpy.developer.DiscreteTimeSparseModelSimulator[ValueType],
) → bool

Make a step with a randomly chosen action

DiscreteTimeSparseModelSimulator.reset_to_initial(
self: stormpy.developer.DiscreteTimeSparseModelSimulator[ValueType],
) → bool

Reset to the initial state

DiscreteTimeSparseModelSimulator.set_seed(
self: stormpy.developer.DiscreteTimeSparseModelSimulator[ValueType],
seed: SupportsInt | SupportsIndex,
) → None

Set the seed of the random generator

DiscreteTimeSparseModelSimulator.step(
self: stormpy.developer.DiscreteTimeSparseModelSimulator[ValueType],
action: SupportsInt | SupportsIndex,
) → bool

Make a step with the given action