Attractor State Transitions And Decision-Making Algorithms Underlying Behavior