/// <summary> /// Constructor. /// </summary> /// <param name="startingCell"> /// the cell that agent(s) are to start from at the beginning of /// each trial within the environment. /// </param> /// <param name="allStates">all the possible states in this environment.</param> /// <param name="tpf"> /// the transition probability function that simulates how the /// environment is meant to behave in response to an agent action. /// </param> /// <param name="r"> /// a IRandom used to sample actions that are actually to be /// executed based on the transition probabilities for actions. /// </param> public CellWorldEnvironment(Cell <double> startingCell, ISet <Cell <double> > allStates, ITransitionProbabilityFunction <Cell <double>, CellWorldAction> tpf, IRandom r) { this.startingCell = startingCell; this.allStates.AddAll(allStates); this.tpf = tpf; this.r = r; }
public MDP(ISet <S> states, S initialState, IActionsFunction <S, A> actionsFunction, ITransitionProbabilityFunction <S, A> transitionProbabilityFunction, IRewardFunction <S> rewardFunction) { this._states = states; this.initialState = initialState; this.actionsFunction = actionsFunction; this.transitionProbabilityFunction = transitionProbabilityFunction; this.rewardFunction = rewardFunction; }