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.

20 lines
273 B

  1. mdp
  2. const int N;
  3. const double p = 0.5;
  4. module main
  5. x : [0..N] init N/2;
  6. [right] x<N -> p : (x'=x+1) + (1-p) : (x'=x);
  7. [left] x>0 -> p : (x'=x-1) + (1-p) : (x'=x);
  8. endmodule
  9. rewards "r"
  10. [right] true : 1;
  11. endrewards
  12. rewards "l"
  13. [left] true : 1;
  14. endrewards