The little black cube in the center reacts to his environment. He tries to navigate the surroundings without causing himself pain, trying to maximize happiness. Run in turbo mode for increased learning speed, and then disable to see it. The black cube is a simple form of AI. He has a neural network consisting of lists, sight, decision making, and emotions. The longer he learns, the smarter he gets. The Yellow simulates addiction. While it does not heal or help the AI, the AI wants to get to the yellow once it learns how it makes it feel. If you see the Ai rapidly moving back and fourth, it probably just does not see any other logical way to move, or perhaps it is afraid to get out of it's comfort zone.
I have a better version out now! Green: Food (heals) Yellow: Gold (HAPPY) Red: Lava (Kills) Brown: Dirt (Nothing) Blue: Water (Tiring) NOTE: He starts out really stupid, but once he gets around to the 1,000+ iteration he gets really smart