Storm
A Modern Probabilistic Model Checker
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StochasticTwoPlayerGame.h
Go to the documentation of this file.
1#ifndef STORM_MODELS_SYMBOLIC_STOCHASTICTWOPLAYERGAME_H_
2#define STORM_MODELS_SYMBOLIC_STOCHASTICTWOPLAYERGAME_H_
3
6
7namespace storm {
8namespace models {
9namespace symbolic {
10
14template<storm::dd::DdType Type, typename ValueType = double>
15class StochasticTwoPlayerGame : public NondeterministicModel<Type, ValueType> {
16 public:
18
21
22#ifndef WINDOWS
25#endif
26
47 std::shared_ptr<storm::dd::DdManager<Type>> manager, storm::dd::Bdd<Type> reachableStates, storm::dd::Bdd<Type> initialStates,
48 storm::dd::Bdd<Type> deadlockStates, storm::dd::Add<Type, ValueType> transitionMatrix, std::set<storm::expressions::Variable> const& rowVariables,
49 std::shared_ptr<storm::adapters::AddExpressionAdapter<Type, ValueType>> rowExpressionAdapter,
50 std::set<storm::expressions::Variable> const& columnVariables,
51 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>> const& rowColumnMetaVariablePairs,
52 std::set<storm::expressions::Variable> const& player1Variables, std::set<storm::expressions::Variable> const& player2Variables,
53 std::set<storm::expressions::Variable> const& allNondeterminismVariables,
54 std::map<std::string, storm::expressions::Expression> labelToExpressionMap = std::map<std::string, storm::expressions::Expression>(),
55 std::unordered_map<std::string, RewardModelType> const& rewardModels = std::unordered_map<std::string, RewardModelType>());
56
74 StochasticTwoPlayerGame(std::shared_ptr<storm::dd::DdManager<Type>> manager, storm::dd::Bdd<Type> reachableStates, storm::dd::Bdd<Type> initialStates,
76 std::set<storm::expressions::Variable> const& rowVariables, std::set<storm::expressions::Variable> const& columnVariables,
77 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>> const& rowColumnMetaVariablePairs,
78 std::set<storm::expressions::Variable> const& player1Variables, std::set<storm::expressions::Variable> const& player2Variables,
79 std::set<storm::expressions::Variable> const& allNondeterminismVariables,
80 std::map<std::string, storm::dd::Bdd<Type>> labelToBddMap = std::map<std::string, storm::dd::Bdd<Type>>(),
81 std::unordered_map<std::string, RewardModelType> const& rewardModels = std::unordered_map<std::string, RewardModelType>());
82
88 std::set<storm::expressions::Variable> const& getPlayer1Variables() const;
89
95 std::set<storm::expressions::Variable> const& getPlayer2Variables() const;
96
103
110
111 template<typename NewValueType>
112 std::shared_ptr<StochasticTwoPlayerGame<Type, NewValueType>> toValueType() const;
113
117 uint64_t getNumberOfPlayer2States() const;
118
119 private:
123 void createIllegalMasks();
124
125 // A mask that characterizes all illegal player 1 choices.
126 storm::dd::Bdd<Type> illegalPlayer1Mask;
127
128 // A mask that characterizes all illegal player 2 choices.
129 storm::dd::Bdd<Type> illegalPlayer2Mask;
130
131 // The meta variables used to encode the nondeterministic choices of player 1.
132 std::set<storm::expressions::Variable> player1Variables;
133
134 // The meta variables used to encode the nondeterministic choices of player 2.
135 std::set<storm::expressions::Variable> player2Variables;
136};
137
138} // namespace symbolic
139} // namespace models
140} // namespace storm
141
142#endif /* STORM_MODELS_SYMBOLIC_STOCHASTICTWOPLAYERGAME_H_ */
storm::dd::Add< Type, ValueType > transitionMatrix
Definition Model.h:409
Base class for all nondeterministic symbolic models.
This class represents a discrete-time stochastic two-player game.
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.
std::shared_ptr< StochasticTwoPlayerGame< Type, NewValueType > > toValueType() const
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
LabParser.cpp.
Definition cli.cpp:18