Skip to content

Instantly share code, notes, and snippets.

@sauthieg
Created March 14, 2011 13:48
Show Gist options
  • Save sauthieg/869134 to your computer and use it in GitHub Desktop.
Save sauthieg/869134 to your computer and use it in GitHub Desktop.
Pseudo code, it's only the concept, it probably doesn't event compile !
Dialog trainingQuestion = new Dialog(TrainingComponentEvent.TOPIC,
"Do you want to start training?",
new String [] {"Yes", "No"}) {
public void handleAnswer(int answerId) {
IWorkingMemory memory = workingMemoryPool.get("demonstrator");
UserAnswer answer = new UserAnswer(this.getQuestionId(), answerId);
memory.insert(answer);
// fact insertion will trigger the rule evaluation ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment