Created
March 14, 2011 13:48
-
-
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 !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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