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

Added support for oracle eos

parent aa1479b2
Branches
No related tags found
No related merge requests found
......@@ -91,6 +91,22 @@ void Oracle::createDatabase()
return action == "WRITE b.0 POS " + c.getTape("POS").ref[c.head] || c.head >= (int)c.tapes[0].ref.size()-1;
})));
str2oracle.emplace("eos", std::unique_ptr<Oracle>(new Oracle(
[](Oracle *)
{
},
[](Config &, Oracle *)
{
fprintf(stderr, "ERROR (%s) : getAction called on Oracle of trainable Classifier. Aborting.\n", ERRINFO);
exit(1);
return std::string("");
},
[](Config & c, Oracle *, const std::string & action)
{
return action == "WRITE b.0 EOS " + (c.getTape("EOS").ref[c.head] == std::string("1") ? std::string("1") : std::string("0")) || c.head >= (int)c.tapes[0].ref.size()-1;
})));
str2oracle.emplace("morpho", std::unique_ptr<Oracle>(new Oracle(
[](Oracle *)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment