Code viewer for Mind: Complex Mind (clone by Kil...

// Cloned by Kilian C on 25 Oct 2022 from Mind "Complex Mind (clone by Kilian C)" by Kilian C 
// Please leave this clone trail here.
 
AB.mind.getAction=function(n){n[0],n[1],n[2],n[3]}; //manually move


// 	AB.mind.getAction = function ( x )		// x is an array of [ ai, aj, ei, ej ]
// 	{ 
// 		var ai = x[0];
// 		var aj = x[1];
// 		var ei = x[2];
// 		var ej = x[3];

// 		// if strictly move away, will get stuck at wall, so introduce randomness 

// 		 if ( ej < aj ) 	return ( AB.randomPick ( ACTION_UP,		AB.randomPick(ACTION_RIGHT,ACTION_LEFT) 	)); 
// 		 if ( ej > aj ) 	return ( AB.randomPick ( ACTION_DOWN,	AB.randomPick(ACTION_RIGHT,ACTION_LEFT) 	)); 

// 		 if ( ei < ai ) 	return ( AB.randomPick ( ACTION_RIGHT,	AB.randomPick(ACTION_UP,ACTION_DOWN) 		)); 
// 		 if ( ei > ai ) 	return ( AB.randomPick ( ACTION_LEFT,	AB.randomPick(ACTION_UP,ACTION_DOWN) 		)); 

//  		return  ( AB.randomIntAtoB (0,3) );
// 	};