MakeFigure4PURPOSEGenerates Figure 4.
SYNOPSISfunction MakeFigure4
DESCRIPTIONGenerates Figure 4. This figure displays the value for beliefs with only one component. Those beliefs only have two parameters (mean and covariance) and, thus, the value can be displayed as a 3d plot to show how that the value function is not convex in the parameter space. POMDP are sometimes addressed in the parameter space (see the paper by Brooks et al. 2006, cited in our paper) but then value iteration can not take advantage of the convexity of the value function. If the results for Figure 1 are not pre-computed we compute them on the fly (this can be quite time consuming). Even if they are pre-computed, this function takes some time since it computes the value for a large collection of beliefs. CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function MakeFigure4 0002 % Generates Figure 4. 0003 % 0004 % This figure displays the value for beliefs with only one component. 0005 % Those beliefs only have two parameters (mean and covariance) and, thus, 0006 % the value can be displayed as a 3d plot to show how that the value 0007 % function is not convex in the parameter space. 0008 % 0009 % POMDP are sometimes addressed in the parameter space (see the paper by 0010 % Brooks et al. 2006, cited in our paper) but then value iteration can 0011 % not take advantage of the convexity of the value function. 0012 % 0013 % If the results for Figure 1 are not pre-computed we compute them on the 0014 % fly (this can be quite time consuming). Even if they are pre-computed, 0015 % this function takes some time since it computes the value for a large 0016 % collection of beliefs. 0017 % 0018 0019 % means and covariances to use in the plot 0020 mu=-20:0.5:20; 0021 sigma=0.5:0.5:7; 0022 0023 % Nothing to be modified beyond this point 0024 0025 fprintf('Loading/Generating the simulation results\n'); 0026 GenData=@()(TestRep('Test1','Figure2',2)); 0027 Results=GetData('Results/Test1-Figure2-2.mat',GenData); 0028 0029 % Get the las policy of the simulation 0030 Policy=Results.V{end}; 0031 0032 fprintf('Computing the values for 1-Gaussian beliefs from the loaded data\n'); 0033 fprintf('This can take some time....\n'); 0034 0035 nMu=size(mu,2); 0036 nSigma=size(sigma,2); 0037 v=zeros(nSigma,nMu); 0038 a=zeros(nSigma,nMu); 0039 for i=1:nSigma 0040 for j=1:nMu 0041 b=GBelief(GMixture(1,{Gaussian(mu(j),sigma(i)^2)})); 0042 [a(i,j) v(i,j)]=OptimalAction(Policy,b); 0043 end 0044 end 0045 fprintf('....plotting the results\n'); 0046 0047 0048 h=clf; 0049 set(h,'name','C-POMDP Figure 4','numbertitle','off'); 0050 0051 surf(mu,sigma,v,a); 0052 xlabel('\mu'); 0053 ylabel('\sigma'); 0054 zlabel('Value'); 0055 0056 |