AIXI.MC_AIXI_CTW.Playout C# (CSharp) Method

Playout() public method

public Playout ( int horizon ) : double
horizon int
return double
        public override double Playout(int horizon)
        {
            // refrac: do not believe rewards that are further away so much
            double totalReward = 0.0;

            for (int i = 0; i < horizon; i++) {
                int action = this.GenerateRandomAction();

                this.ModelUpdateAction(action);
                var or = this.GeneratePerceptAndUpdate();

                totalReward += or.Item2;

            }
            return totalReward;
        }