regarding pomdp

12 views
Skip to first unread message

meena kumari

unread,
Dec 28, 2023, 10:29:43 PM12/28/23
to PRISM model checker
pomdp

// States and Transitions remain the same
const int a=0;const int g=6;const int succ = 7;const int fail = 8;
 const int b = 1;const int c = 2;const int d = 3;const int e = 4;const int f = 5;


const double pab = 0.9;
const double pac = 0.8;
const double pda = 0.8;
              const double pbc = 0.6;
 const double pdc = 0.65;
const double pgd = 0.75;
const double pbd = 0.5;
             
              const double pge = 0.97;const double pgf = 0.95;

module transport
    s : [0..8] init d;
[ab] (s = a) -> pab : (s' = b) + (1 - pab) : (s' = fail);
[ac] (s = a) -> pac : (s' = c) + (1 - pac) : (s' = fail);
[ad] (s = d) -> pda: (s' = d) + (1 - pda) : (s' = fail);
[da] (s = d) -> pda : (s' = a) + (1 - pda) : (s' = fail);
[dc] (s = d) -> pdc : (s' = c) + (1 - pdc) : (s' = fail);
[dg] (s = d) -> pgd : (s' = g) + (1 - pgd) : (s' = fail);
[gd] (s = g) -> pgd : (s' = d) + (1 - pgd) : (s' = fail);
[ge] (s = g) -> pge : (s' = e) + (1 - pge) : (s' = fail);
[gf] (s = g) -> pgf : (s' = f) + (1 - pgf) : (s' = fail);
[succ] (s = e) -> 1.0 : (s' = succ) ;
[succ] (s = succ) -> 1.0 : (s' = succ) ;
[fail] (s = fail) -> 1.0 : (s' = fail) ;
endmodule

// Extended Observations
module observations
    o : [0..3] init 0; // Different types of observations

    // Observation model with more complexity
    [observe] (s = a) | (s = d) -> (o' = 1); // Type 1 observation
    [observe] (s = b) | (s = e) -> (o' = 2); // Type 2 observation
    [observe] (s = c) | (s = f) -> (o' = 3); // Type 3 observation
    [observe] true -> (o' = 0); // Default observation
endmodule
// Define labels for observations
label "at_a" = (s = a);
label "at_b" = (s = b);
label "at_c" = (s = c);
label "at_d" = (s = d);
label "at_e" = (s = e);
label "at_f" = (s = f);
label "at_g" = (s = g);


I am trying to run this code using pomdp, but it gives an error.
When I write mdp, it runs.
Please help me to run this code using pomdp.

Thanks


Reply all
Reply to author
Forward
0 new messages