From 160f9e476f7a6076908968f009b7e50f2d6625f1 Mon Sep 17 00:00:00 2001 From: sjunges Date: Tue, 13 Oct 2015 10:55:15 +0200 Subject: [PATCH] test descr for milp perm sched Former-commit-id: 54dfa2587ef0933461b14d815e123629dae48eb8 --- test/functional/builder/die_c1.nm | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 test/functional/builder/die_c1.nm diff --git a/test/functional/builder/die_c1.nm b/test/functional/builder/die_c1.nm new file mode 100644 index 000000000..9369d24e4 --- /dev/null +++ b/test/functional/builder/die_c1.nm @@ -0,0 +1,33 @@ +// Knuth's model of a fair die using only fair coins +mdp + +module die + + // local state + s : [0..7] init 0; + // value of the dice + d : [0..6] init 0; + + [a] s=0 -> 0.5 : (s'=1) + 0.5 : (s'=2); + [b] s=0 -> 0.2 : (s'=1) + 0.8 : (s'=2); + [] s=1 -> 0.5 : (s'=3) + 0.5 : (s'=4); + [] s=2 -> 0.5 : (s'=5) + 0.5 : (s'=6); + [] s=3 -> 0.5 : (s'=1) + 0.5 : (s'=7) & (d'=1); + [] s=4 -> 0.5 : (s'=7) & (d'=2) + 0.5 : (s'=7) & (d'=3); + [] s=5 -> 0.5 : (s'=7) & (d'=4) + 0.5 : (s'=7) & (d'=5); + [] s=6 -> 0.5 : (s'=2) + 0.5 : (s'=7) & (d'=6); + [] s=7 -> 1: (s'=7); + +endmodule + +rewards "coin_flips" + [] s<7 : 1; +endrewards + +label "one" = s=7&d=1; +label "two" = s=7&d=2; +label "three" = s=7&d=3; +label "four" = s=7&d=4; +label "five" = s=7&d=5; +label "six" = s=7&d=6; +label "done" = s=7; \ No newline at end of file