Purposeful Behavior in Cartesian Automata