Skip to content
Snippets Groups Projects
Commit 5b546740 authored by Franck Dary's avatar Franck Dary
Browse files

Reduced subconfig span to save memory

parent 78a246d7
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ int main(int argc, char * argv[])
config.setState(machine.getStrategy().getInitialState());
config.printForDebug(stderr);
std::vector<std::pair<SubConfig, Transition*>> trainingExamples;
while (true)
{
......@@ -35,8 +35,10 @@ int main(int argc, char * argv[])
if (!transition)
util::myThrow("No transition appliable !");
fmt::print(stderr, "Transition : {}\n", transition->getName());
trainingExamples.emplace_back(config, transition);
transition->apply(config);
config.addToHistory(transition->getName());
auto movement = machine.getStrategy().getMovement(config, transition->getName());
if (movement == Strategy::endMovement)
......@@ -48,10 +50,10 @@ int main(int argc, char * argv[])
if (config.needsUpdate())
config.update();
config.printForDebug(stderr);
}
trainingExamples[10000].first.printForDebug(stderr);
return 0;
}
......@@ -8,7 +8,7 @@ class SubConfig : public Config
{
private :
static constexpr std::size_t spanSize = 100;
static constexpr std::size_t spanSize = 50;
private :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment