Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
StochasticTwoPlayerGame.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace storm {
6namespace models {
7namespace symbolic {
8
12template<storm::dd::DdType Type, typename ValueType = double>
13class StochasticTwoPlayerGame : public NondeterministicModel<Type, ValueType> {
14 public:
16
19
22
43 std::shared_ptr<storm::dd::DdManager<Type>> manager, storm::dd::Bdd<Type> reachableStates, storm::dd::Bdd<Type> initialStates,
44 storm::dd::Bdd<Type> deadlockStates, storm::dd::Add<Type, ValueType> transitionMatrix, std::set<storm::expressions::Variable> const& rowVariables,
45 std::shared_ptr<storm::adapters::AddExpressionAdapter<Type, ValueType>> rowExpressionAdapter,
46 std::set<storm::expressions::Variable> const& columnVariables,
47 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>> const& rowColumnMetaVariablePairs,
48 std::set<storm::expressions::Variable> const& player1Variables, std::set<storm::expressions::Variable> const& player2Variables,
49 std::set<storm::expressions::Variable> const& allNondeterminismVariables,
50 std::map<std::string, storm::expressions::Expression> labelToExpressionMap = std::map<std::string, storm::expressions::Expression>(),
51 std::unordered_map<std::string, RewardModelType> const& rewardModels = std::unordered_map<std::string, RewardModelType>());
52
70 StochasticTwoPlayerGame(std::shared_ptr<storm::dd::DdManager<Type>> manager, storm::dd::Bdd<Type> reachableStates, storm::dd::Bdd<Type> initialStates,
72 std::set<storm::expressions::Variable> const& rowVariables, std::set<storm::expressions::Variable> const& columnVariables,
73 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>> const& rowColumnMetaVariablePairs,
74 std::set<storm::expressions::Variable> const& player1Variables, std::set<storm::expressions::Variable> const& player2Variables,
75 std::set<storm::expressions::Variable> const& allNondeterminismVariables,
76 std::map<std::string, storm::dd::Bdd<Type>> labelToBddMap = std::map<std::string, storm::dd::Bdd<Type>>(),
77 std::unordered_map<std::string, RewardModelType> const& rewardModels = std::unordered_map<std::string, RewardModelType>());
78
84 std::set<storm::expressions::Variable> const& getPlayer1Variables() const;
85
91 std::set<storm::expressions::Variable> const& getPlayer2Variables() const;
92
99
106
107 template<typename NewValueType>
108 std::shared_ptr<StochasticTwoPlayerGame<Type, NewValueType>> toValueType() const;
109
113 uint64_t getNumberOfPlayer2States() const;
114
115 private:
119 void createIllegalMasks();
120
121 // A mask that characterizes all illegal player 1 choices.
122 storm::dd::Bdd<Type> illegalPlayer1Mask;
123
124 // A mask that characterizes all illegal player 2 choices.
125 storm::dd::Bdd<Type> illegalPlayer2Mask;
126
127 // The meta variables used to encode the nondeterministic choices of player 1.
128 std::set<storm::expressions::Variable> player1Variables;
129
130 // The meta variables used to encode the nondeterministic choices of player 2.
131 std::set<storm::expressions::Variable> player2Variables;
132};
133
134} // namespace symbolic
135} // namespace models
136} // namespace storm
storm::dd::Add< Type, ValueType > transitionMatrix
Definition Model.h:400
Base class for all nondeterministic symbolic models.
This class represents a discrete-time stochastic two-player game.
std::shared_ptr< StochasticTwoPlayerGame< Type, NewValueType > > toValueType() const
NondeterministicModel< Type, ValueType >::RewardModelType RewardModelType
StochasticTwoPlayerGame & operator=(StochasticTwoPlayerGame< Type, ValueType > &&other)=default
std::set< storm::expressions::Variable > const & getPlayer1Variables() const
Retrieeves the set of meta variables used to encode the nondeterministic choices of player 1.
std::set< storm::expressions::Variable > const & getPlayer2Variables() const
Retrieeves the set of meta variables used to encode the nondeterministic choices of player 2.
storm::dd::Bdd< Type > getIllegalPlayer1Mask() const
Retrieves a BDD characterizing all illegal player 1 choice encodings in the model.
StochasticTwoPlayerGame & operator=(StochasticTwoPlayerGame< Type, ValueType > const &other)=default
StochasticTwoPlayerGame(StochasticTwoPlayerGame< Type, ValueType > &&other)=default
uint64_t getNumberOfPlayer2States() const
Retrieves the number of player 2 states in the game.
storm::dd::Bdd< Type > getIllegalPlayer2Mask() const
Retrieves a BDD characterizing all illegal player 2 choice encodings in the model.
StochasticTwoPlayerGame(StochasticTwoPlayerGame< Type, ValueType > const &other)=default