You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
570 B

dtmc
module die
// local state
s : [0..7] init 0;
// value of the die
d : [0..6] init 0;
[] s=0 -> 1/2 : (s'=1) + 1/2 : (s'=2);
[] s=1 -> 1/2 : (s'=3) + 1/2 : (s'=4);
[] s=2 -> 1/2 : (s'=5) + 1/2 : (s'=6);
[] s=3 -> 1/2 : (s'=1) + 1/2 : (s'=7) & (d'=1);
[] s=4 -> 1/2 : (s'=7) & (d'=2) + 1/2 : (s'=7) & (d'=3);
[] s=5 -> 1/2 : (s'=7) & (d'=4) + 1/2 : (s'=7) & (d'=5);
[] s=6 -> 1/2 : (s'=2) + 1/2 : (s'=7) & (d'=6);
[] s=7 -> (s'=7);
endmodule
label "end" = s=7;
label "six" = d=6;
rewards "coin_flips"
s<7 : 1;
endrewards