ComputeAlpha_aPURPOSECompute the alpha_i_n-element for the given action and belief.
SYNOPSISfunction Element_a=ComputeAlpha_a(P,V,b,a,Alphas_j_a_o)
DESCRIPTIONCompute the alpha_i_n-element for the given action and belief. Define the alpha-elements to be used in the backup (The \alpha_n^i elements). Actually, this function implements the last equation of section 5.2 in the paper. Note that in this case the Alpha_j_a_o elements can be pre-computed. If they are, the Alphas_j_a_o parameter is a non-emtpy cell array with one entry for each alpha-element (of the previous policy), each action and each observation. If this set is empty, the corresponding alpha elements are computed on the fly inside this function. CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function Element_a=ComputeAlpha_a(P,V,b,a,Alphas_j_a_o) 0002 % Compute the alpha_i_n-element for the given action and belief. 0003 % 0004 % Define the alpha-elements to be used in the backup (The \alpha_n^i 0005 % elements). 0006 % 0007 % Actually, this function implements the last equation of section 5.2 in 0008 % the paper. 0009 % 0010 % Note that in this case the Alpha_j_a_o elements can be pre-computed. 0011 % If they are, the Alphas_j_a_o parameter is a non-emtpy cell array with 0012 % one entry for each alpha-element (of the previous policy), each action 0013 % and each observation. 0014 % If this set is empty, the corresponding alpha elements are computed on 0015 % the fly inside this function. 0016 0017 rj=num2cell(1:size(V)); 0018 O=get(P,'ObsSpace'); 0019 no=dim(O); 0020 gamma=get(P,'gamma'); 0021 noP=isempty(Alphas_j_a_o); 0022 Element_ao=GMixture; 0023 for o=1:no 0024 if noP 0025 Alphas_j=cellfun(@(j)(ComputeAlpha_j_a_o(P,V,j,a,o)),rj,'UniformOutput',false); 0026 else 0027 Alphas_j=Alphas_j_a_o(:,a,o); 0028 end 0029 [v_a_o nAlpha_j]=max(cellfun(@(g)(Expectation(b,g)),Alphas_j)); 0030 Element_ao=Element_ao+Alphas_j{nAlpha_j}; 0031 end 0032 Element_a=GetRewardModelFixedA(P,a)+gamma*Element_ao; 0033 0034 0035 |