Added rule to PDDL translator output to make all unspecified initial state variables false by default.

This commit is contained in:
2016-08-17 19:02:51 +02:00
parent 91019f52aa
commit 7bd483cd7e
2 changed files with 11 additions and 4 deletions

View File

@@ -531,7 +531,17 @@ void TranslatorASP::translateInitialState() const
m_outputStream << ").";
});
m_outputStream << std::endl;
m_outputStream
<< std::endl << std::endl
<< utils::RuleName("initialState") << "("
<< utils::Keyword("variable") << "(" << utils::Variable("X") << "), "
<< utils::Keyword("value") << "(" << utils::Variable("X") << ", " << utils::Boolean("false") << ")) :- "
<< utils::RuleName("variable") << "(" << utils::Keyword("variable") << "(" << utils::Variable("X") << ")), "
<< utils::Keyword("not") << " "
<< utils::RuleName("initialState") << "("
<< utils::Keyword("variable") << "(" << utils::Variable("X") << "), "
<< utils::Keyword("value") << "(" << utils::Variable("X") << ", " << utils::Boolean("true") << "))."
<< std::endl;
}
////////////////////////////////////////////////////////////////////////////////////////////////////