25 if (domainModel ==
nullptr)
27 throw std::runtime_error(
"Domain model not set");
29 std::shared_ptr<ActionSpace> space(
new ActionSpace);
30 space->domainModel = domainModel;
31 std::vector<Action*> actionVector;
32 if (dimensions.size() == 0)
34 actionVector = actions;
40 std::vector<unsigned int> counterValue;
41 for (
long long int i = 0;
i < nbActions;
i++)
44 counterValue = actionDimensionCounter.
getValue();
45 for (
unsigned int j = 0; j < dimensions.size(); j++)
47 Action *action = dimensions[j]->getAction(counterValue[j]);
49 complexAction->
actions.push_back(action);
51 actionVector.push_back(complexAction);
55 space->actions = actionVector;
56 space->setDomainModelOfActions();
62 actions.push_back(action);
74 dimensions.push_back(dim);
void setDomainModel(std::shared_ptr< DomainModel > model)
sets the domain model used by the actions to act on the environment
void addAction(Action *action)
add an action to the actino space
std::shared_ptr< DomainModel > domainModel
std::shared_ptr< ActionSpace > getActionSpace()
get the action space
std::vector< unsigned int > getValue()
void addWheel(unsigned int base)
long long unsigned int getNumberOfValues()
void addActionDimension(ActionDimension *)
std::vector< Action * > actions