demos an ai script for the bat based on state machines thinking. two states: "hunt" and "dive", with transitions based on whether scratch is under the bat. each state has scripts which run it, to switch states, you just switch the scripts that are running. here he starts by hunting, which also moves him. he repeats this until he's over scratch. Then he dives. but then he hunts again, so also moves. if he's still over scratch, he will dive again, otherwise he will continue the hunting loop. (See inside to see how the states and jumps are coded.)