ctmc
const int n;
const double mr = 1;
const double mj = 2;
const double cr1 = 1/10;
const double cr2 = 1/2;
formula right = min(1,max(n-x2,0));
formula left = min(1,max(x2-1,0));
formula up = min(1,max(n-y2,0));
formula down = min(1,max(y2-1,0));
formula moves = right+left+up+down;
module robot
x1 : [1..n] init 1;
y1 : [1..n] init 1;
c : [0..1] init 0;
[] x1<n & c=0 & !(x1+1=x2 & y1=y2) -> mr : (x1'=x1+1);
[] x1=n & y1<n & c=0 & !(x1=x2 & y1+1=y2) -> mr : (y1'=y1+1);
[] c=0 -> cr1 : (c'=1);
[] c=1 -> cr2 : (c'=0);
endmodule
module janitor
x2 : [1..n] init n;
y2 : [1..n] init n;
[] !(y2=n | (y2+1=y1 & x2=x1)) -> mj/moves : (y2'=y2+1);
[] !(y2=1 | (y2-1=y1 & x2=x1)) -> mj/moves : (y2'=y2-1);
[] !(x2=1 | (x2-1=x1 & y2=y1)) -> mj/moves : (x2'=x2-1);
[] !(x2=n | (x2+1=x1 & y2=y1)) -> mj/moves : (x2'=x2+1);
endmodule