patrol, chase states

also code to get out of being stuck after running into terrain