The source code and dockerfile for the GSW2024 AI Lab.
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

80 lines
1.8 KiB

2 months ago
  1. // integer semantics version of abstract firewire protocol
  2. // gxn 23/05/2001
  3. mdp
  4. // wire delay
  5. const int delay;
  6. // probability of choosing fast and slow
  7. const double fast = 0.5;
  8. const double slow = 1-fast;
  9. // largest constant the clock of the system is compared to
  10. const int kx = 167;
  11. module abstract_firewire
  12. // clock
  13. x : [0..kx+1];
  14. // local state
  15. s : [0..9];
  16. // 0 -start_start
  17. // 1 -fast_start
  18. // 2 -start_fast
  19. // 3 -start_slow
  20. // 4 -slow_start
  21. // 5 -fast_fast
  22. // 6 -fast_slow
  23. // 7 -slow_fast
  24. // 8 -slow_slow
  25. // 9 -done
  26. // initial state
  27. [time] s=0 & x<delay -> (x'=min(x+1,kx+1));
  28. [round] s=0 -> fast : (s'=1) + slow : (s'=4);
  29. [round] s=0 -> fast : (s'=2) + slow : (s'=3);
  30. // fast_start
  31. [time] s=1 & x<delay -> (x'=min(x+1,kx+1));
  32. [] s=1 -> fast : (s'=5) & (x'=0) + slow : (s'=6) & (x'=0);
  33. // start_fast
  34. [time] s=2 & x<delay -> (x'=min(x+1,kx+1));
  35. [] s=2 -> fast : (s'=5) & (x'=0) + slow : (s'=7) & (x'=0);
  36. // start_slow
  37. [time] s=3 & x<delay -> (x'=min(x+1,kx+1));
  38. [] s=3 -> fast : (s'=6) & (x'=0) + slow : (s'=8) & (x'=0);
  39. // slow_start
  40. [time] s=4 & x<delay -> (x'=min(x+1,kx+1));
  41. [] s=4 -> fast : (s'=7) & (x'=0) + slow : (s'=8) & (x'=0);
  42. // fast_fast
  43. [time] s=5 & (x<85) -> (x'=min(x+1,kx+1));
  44. [] s=5 & (x>=76) -> (s'=0) & (x'=0);
  45. [] s=5 & (x>=76-delay) -> (s'=9) & (x'=0);
  46. // fast_slow
  47. [time] s=6 & x<167 -> (x'=min(x+1,kx+1));
  48. [] s=6 & x>=159-delay -> (s'=9) & (x'=0);
  49. // slow_fast
  50. [time] s=7 & x<167 -> (x'=min(x+1,kx+1));
  51. [] s=7 & x>=159-delay -> (s'=9) & (x'=0);
  52. // slow_slow
  53. [time] s=8 & x<167 -> (x'=min(x+1,kx+1));
  54. [] s=8 & x>=159 -> (s'=0) & (x'=0);
  55. [] s=8 & x>=159-delay -> (s'=9) & (x'=0);
  56. // done
  57. [] s=9 -> (s'=s);
  58. endmodule
  59. // labels
  60. label "done" = s=9;
  61. //reward structures
  62. // time
  63. rewards "time"
  64. [time] true : 1;
  65. endrewards
  66. // number of rounds
  67. rewards "rounds"
  68. [round] true : 1;
  69. endrewards