A genetic approach to behavioral plasticity and rigidity