mdp
const double infect=0.5;
const double detect1=0.5;
const double detect2;
const double detect11=detect1;
const double detect12=detect1;
const double detect13=detect1;
const double detect21=detect2;
const double detect22=detect2;
const double detect23=detect2;
const double detect31=detect1;
const double detect32=detect1;
const double detect33=detect1;
module n11
s11 : [0..2];
[attack11_21] (s11=0) -> detect11 : true + (1-detect11) : (s11'=1);
[attack11_12] (s11=0) -> detect11 : true + (1-detect11) : (s11'=1);
[] (s11=1) -> infect : (s11'=2) + (1-infect) : (s11'=0);
[attack21_11] (s11=2) -> true;
[attack12_11] (s11=2) -> true;
endmodule
module n21
s21 : [0..2];
[attack21_31] (s21=0) -> detect21 : true + (1-detect21) : (s21'=1);
[attack21_22] (s21=0) -> detect21 : true + (1-detect21) : (s21'=1);
[attack21_11] (s21=0) -> detect21 : true + (1-detect21) : (s21'=1);
[] (s21=1) -> infect : (s21'=2) + (1-infect) : (s21'=0);
[attack31_21] (s21=2) -> true;
[attack22_21] (s21=2) -> true;
[attack11_21] (s21=2) -> true;
endmodule
module n31=n11[s11=s31,detect11=detect31,attack21_11=attack21_31,attack12_11=attack32_31,attack11_21=attack31_21,attack11_12=attack31_32] endmodule
module n12=n21[s21=s12,detect21=detect12,attack31_21=attack13_12,attack22_21=attack22_12,attack11_21=attack11_12,attack21_31=attack12_13,attack21_22=attack12_22,attack21_11=attack12_11] endmodule
module n22
s22 : [0..2];
[attack22_32] (s22=0) -> detect22 : true + (1-detect22) : (s22'=1);
[attack22_23] (s22=0) -> detect22 : true + (1-detect22) : (s22'=1);
[attack22_12] (s22=0) -> detect22 : true + (1-detect22) : (s22'=1);
[attack22_21] (s22=0) -> detect22 : true + (1-detect22) : (s22'=1);
[] (s22=1) -> infect : (s22'=2) + (1-infect) : (s22'=0);
[attack32_22] (s22=2) -> true;
[attack23_22] (s22=2) -> true;
[attack12_22] (s22=2) -> true;
[attack21_22] (s22=2) -> true;
endmodule
module n32=n21[s21=s32,detect21=detect32,attack31_21=attack33_32,attack22_21=attack22_32,attack11_21=attack31_32,attack21_31=attack32_33,attack21_22=attack32_22,attack21_11=attack32_31] endmodule
module n13=n11[s11=s13,detect11=detect13,attack21_11=attack23_13,attack12_11=attack12_13,attack11_21=attack13_23,attack11_12=attack13_12] endmodule
module n23=n21[s21=s23,detect21=detect23,attack31_21=attack33_23,attack22_21=attack22_23,attack11_21=attack13_23,attack21_31=attack23_33,attack21_22=attack23_22,attack21_11=attack23_13] endmodule
module n33
s33 : [0..2] init 2;
[attack33_32] (s33=0) -> detect33 : true + (1-detect33) : (s33'=1);
[attack33_23] (s33=0) -> detect33 : true + (1-detect33) : (s33'=1);
[] (s33=1) -> infect : (s33'=2) + (1-infect) : (s33'=0);
[attack32_33] (s33=2) -> true;
[attack23_33] (s33=2) -> true;
endmodule
rewards "attacks"
[attack11_12] true : 1;
[attack11_21] true : 1;
[attack31_21] true : 1;
[attack31_32] true : 1;
[attack13_12] true : 1;
[attack13_23] true : 1;
[attack33_32] true : 1;
[attack33_23] true : 1;
[attack12_13] true : 1;
[attack12_11] true : 1;
[attack12_22] true : 1;
[attack21_31] true : 1;
[attack21_11] true : 1;
[attack21_22] true : 1;
[attack32_33] true : 1;
[attack32_31] true : 1;
[attack32_22] true : 1;
[attack23_33] true : 1;
[attack23_13] true : 1;
[attack23_22] true : 1;
[attack22_32] true : 1;
[attack22_23] true : 1;
[attack22_12] true : 1;
[attack22_21] true : 1;
endrewards