function Mind(){ this.newRun=function(){ } this.getAction=function(A){ if(A.stuckfor > 2) return AB.randomIntAtoB(0,3) x1 = 0 x2 = 2 y1 = 1 y2 = 3 if(AB.randomBoolean()){ // i if(A[x2]<A[x1]) return 1; // ei < ai -- right if(A[x2]>A[x1]) return 0; // ei > ai -- left if(A[y2]<A[y1]) return 2; // ej < aj -- up if(A[y2]>A[y1]) return 3; // ej > aj -- down } return AB.randomIntAtoB(0,3) } this.endRun=function(){ } }