MakeFigure1PURPOSEGenerates Figure 1.
SYNOPSISfunction MakeFigure1
DESCRIPTIONGenerates Figure 1. Displays the two lower plots of Figure 1 in the paper (i.e., the observation model and the reward model). This is an example of how to get and manipulate observation and reward models. See also GetTest1Parameters. CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function MakeFigure1 0002 % Generates Figure 1. 0003 % 0004 % Displays the two lower plots of Figure 1 in the paper (i.e., the 0005 % observation model and the reward model). 0006 % 0007 % This is an example of how to get and manipulate observation and reward 0008 % models. 0009 % 0010 % See also GetTest1Parameters. 0011 0012 [POMDP P]=GetTest1Parameters; 0013 0014 h=clf; 0015 set(h,'name','C-POMDP Figure 1','numbertitle','off'); 0016 0017 subplot(2,1,1); 0018 OM=get(POMDP,'ObsModel'); 0019 plot(GetObsModelFixedO(OM,1),'color','k','linestyle',':'); 0020 plot(GetObsModelFixedO(OM,2),'color','k','linestyle','-.'); 0021 plot(GetObsModelFixedO(OM,4),'color','k'); 0022 plot(GetObsModelFixedO(OM,3),'color','k','linestyle','--'); 0023 0024 legend('Left End','Right End','Corridor','Door'); 0025 0026 axis([-20 20 0 1.1]); 0027 title('Observation Model'); 0028 xlabel('s'); 0029 ylabel('p(o)'); 0030 0031 subplot(2,1,2); 0032 RM=get(POMDP,'RewardModel'); 0033 plot(GetRewardModelFixedA(RM,1),'color','k','linestyle',':'); 0034 plot(GetRewardModelFixedA(RM,2),'color','k','linestyle','-.'); 0035 plot(GetRewardModelFixedA(RM,3),'color','k'); 0036 0037 legend('Move Left','Move Right','Enter Door'); 0038 0039 axis([-20 20 -1.2 0.4]); 0040 xlabel('s'); 0041 ylabel('r(a)'); 0042 0043 title('Reward Model'); 0044 0045 |