public override void ModelUpdatePercept(int observation, int reward)
{
Debug.Assert(this.LastUpdate == ActionUpdate);
int[] perceptSymbols = this.encode_percept(observation, reward);
if ((this.LearningPeriod > 0) && (this.Age > this.LearningPeriod))
{
this.ContextTree.update_tree_history(perceptSymbols);
}
else {
this.ContextTree.update_tree(perceptSymbols);
//this.context_tree.update_tree(percept_symbols);
}
this.TotalReward += reward;
this.LastUpdate = PerceptUpdate;
}