We study how animal select the right actions at the right time at level of circuits, neurons, molecules and genes.