Behavioral Adaptation in Prokaryotes