function Mind()
{
this.getAction = function ( x )
{
var ai = x[0];
var aj = x[1];
var ei = x[2];
var ej = x[3];
if (ej < aj) return(AB.randomPick(ACTION_UP, AB.randomPick3(ACTION_RIGHT, ACTION_LEFT, AB.randomPick(ACTION_UP, ACTION_DOWN)))); //e below a
if (ej > aj) return(AB.randomPick(ACTION_DOWN, AB.randomPick3(ACTION_RIGHT, ACTION_LEFT, AB.randomPick(ACTION_UP, ACTION_DOWN)))); //e above a
if (ei < ai) return(AB.randomPick(ACTION_RIGHT, AB.randomPick3(ACTION_UP, ACTION_DOWN, AB.randomPick(ACTION_RIGHT, ACTION_LEFT)))); //e left of a
if (ei > ai) return(AB.randomPick(ACTION_LEFT, AB.randomPick3(ACTION_UP, ACTION_DOWN, AB.randomPick(ACTION_RIGHT, ACTION_LEFT)))); //e right of a
return(AB.randomIntAtoB (0,3));
};
}