Institut de Robòtica i Informàtica Industrial

DiscretizeObsModel

PURPOSE ^

Discretizes the observation model on the observation side.

SYNOPSIS ^

function DS_DO_OM=DiscretizeObsModel(DS_CO_OM,V,AM,nSamples)

DESCRIPTION ^

   Discretizes the observation model on the observation side.

   Implementation of the lossless discretization of the observation model
   defined in Hoey and Poupart IJCAI 2005. 
   The output is an observation model on a discrete state space but on a
   discrete a observation space. The dimensionality of this observation
   space is given by the number of elements in V (number of alpha elements
   in the previous iteration policy).

   None of the experiments actually use this observatio model so it might
   include bugs.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function DS_DO_OM=DiscretizeObsModel(DS_CO_OM,V,AM,nSamples)
0002 %   Discretizes the observation model on the observation side.
0003 %
0004 %   Implementation of the lossless discretization of the observation model
0005 %   defined in Hoey and Poupart IJCAI 2005.
0006 %   The output is an observation model on a discrete state space but on a
0007 %   discrete a observation space. The dimensionality of this observation
0008 %   space is given by the number of elements in V (number of alpha elements
0009 %   in the previous iteration policy).
0010 %
0011 %   None of the experiments actually use this observatio model so it might
0012 %   include bugs.
0013 
0014   nj=size(V); % number of synthetic observations
0015   ns=size(DS_CO_OM.S);  
0016   nm=zeros(ns,nj);
0017   z=zeros(ns,1);
0018   for j=1:ns
0019     b=z;
0020     b(j)=1;
0021     ba=Move(AM,b);
0022     nm=zeros(nj,1);
0023     for i=1:nSamples
0024       o=rand(CS_CO_OM.O);
0025       Os=GetObsModelFixedO(CS_CO_OM,o);
0026       bao=Os.*ba;
0027       [v l]=max(Values(V,bao));
0028       
0029       nm(j,l)=nm(j,l)+1;
0030     end
0031   end
0032   
0033   nm=(1/nSamples)*nm;
0034   oData=cell(1,nj);
0035   for i=1:nj
0036     oData{i}=nm(i,:)';
0037   end
0038   
0039   DS_DO_OM=DS_DO_ObsModel(DS_CO_OM.S,DSpace(nj),oData);
0040


Institut de Robòtica i Informàtica Industrial

Generated on Wed 05-Aug-2009 15:05:21 by m2html © 2003