Each ant reads its own cell, the sobel slope of the 3×3 around it in its own frame, and its heading. Brains are random, never trained. Right-click the canvas to save.