The AI has a invisible stick coming out of his face and when that stick touches the color red the AI will turn right and if it touches green it will turn left so it will solve the simple maze for you. Aren't AIs so fascinating?
Also if you remix this and change the length of the stick you will see that it will take another path