DiscretizeRewardModelPURPOSEDiscretizes the reward model on the state side.
SYNOPSISfunction DRM=DiscretizeRewardModel(RM,DS)
DESCRIPTIONDiscretizes the reward model on the state side. Defines a reward function on discrete states and actions from a reward function on continuous states and discrete actions. See also DS_DA_RewardModel. CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function DRM=DiscretizeRewardModel(RM,DS) 0002 % Discretizes the reward model on the state side. 0003 % 0004 % Defines a reward function on discrete states and actions from a reward 0005 % function on continuous states and discrete actions. 0006 % 0007 % See also DS_DA_RewardModel. 0008 0009 ns=dim(DS); 0010 0011 na=dim(RM.A); 0012 r=cell(1,na); 0013 for i=1:na 0014 r{i}=zeros(ns,1); 0015 for j=1:ns 0016 r{i}(j)=Value(RM.r{i},DS(j)); 0017 end 0018 end 0019 0020 DRM=DS_DA_RewardModel(DS,RM.A,r); |