Institut de Robòtica i Informàtica Industrial

GenerateFigure5Data

PURPOSE ^

Generates the data for Figure 5.

SYNOPSIS ^

function GenerateFigure5Data(fname)

DESCRIPTION ^

   Generates the data for Figure 5.

   In this experiment we compute the time (in seconds) for the first 
   iteration of Perseus using different number of components to represent 
   the beliefs and the alpha-mixtures. 
   This give an idea of the complexity added when incresing the number of
   components in the beliefs or in the alpha-mixtures.
   Figure 6 shows the performace degradation when using too few components
   in beliefs or in alpha-mixtures.

   Parameters:
     fname: file where to store the results.

   See also MakeFigure1, MakeFigure5.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function GenerateFigure5Data(fname)
0002 %   Generates the data for Figure 5.
0003 %
0004 %   In this experiment we compute the time (in seconds) for the first
0005 %   iteration of Perseus using different number of components to represent
0006 %   the beliefs and the alpha-mixtures.
0007 %   This give an idea of the complexity added when incresing the number of
0008 %   components in the beliefs or in the alpha-mixtures.
0009 %   Figure 6 shows the performace degradation when using too few components
0010 %   in beliefs or in alpha-mixtures.
0011 %
0012 %   Parameters:
0013 %     fname: file where to store the results.
0014 %
0015 %   See also MakeFigure1, MakeFigure5.
0016 
0017   cb=4:4:32;
0018   ca=9:3:33;
0019   
0020   stopCriteria=@(n,t,vc)(n>1);
0021   nRep=5; % times we repeat the first iteration to get an average value
0022   
0023   nb=size(cb,2);
0024   tb=zeros(1,nb);
0025   k=1;
0026   for ncBelief=cb
0027     [POMDP P]=GetTest1Parameters(ncBelief,9);
0028     
0029     fprintf('Sampling Beliefs\n');
0030     B=SampleBeliefs(POMDP,P.start,P.nBeliefs,P.dBelief,P.stepsXtrial,P.rMin,P.rMax);
0031     r=0;
0032     for s=1:nRep
0033       [V Val Alpha t]=Perseus(POMDP,B,stopCriteria);
0034       r=r+t(2);
0035     end
0036     tb(k)=r/nRep;
0037     k=k+1;
0038   end
0039   
0040   na=size(ca,2);
0041   ta=zeros(1,na);
0042   k=1;
0043   for ncAlpha=ca
0044     [POMDP P]=GetTest1Parameters(4,ncAlpha);
0045     
0046     fprintf('Sampling Beliefs\n');
0047     B=SampleBeliefs(POMDP,P.start,P.nBeliefs,P.dBelief,P.stepsXtrial,P.rMin,P.rMax);
0048     r=0;
0049     for s=1:nRep
0050       [V Val Alpha t]=Perseus(POMDP,B,stopCriteria);
0051       r=r+t(2);
0052     end
0053     ta(k)=r/nRep;
0054     k=k+1;
0055   end
0056   
0057   save(fname,'cb','tb','ca','ta');


Institut de Robòtica i Informàtica Industrial

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