AIXI.MC_AIXI_CTW.model_revert C# (CSharp) Метод

model_revert() публичный Метод

public model_revert ( CtwContextTreeUndo undoInstance ) : void
undoInstance CtwContextTreeUndo
Результат void
        public void model_revert(CtwContextTreeUndo undoInstance)
        {
            while (this.history_size()>undoInstance.HistorySize){
                if (this.LastUpdate == PerceptUpdate)
                {
                    this.ContextTree.revert_tree(this.Environment.perceptBits());

                    this.LastUpdate = ActionUpdate;
                }
                else {
                    this.ContextTree.revert_tree_history(this.Environment.actionBits());
                    //this.context_tree.revert_tree_history(this.environment.actionBits());

                    this.LastUpdate = PerceptUpdate;
                }
            }

            this.Age = undoInstance.Age;
            this.TotalReward = undoInstance.TotalReward;
            this.LastUpdate = undoInstance.LastUpdate;
        }