Fish exhibit quite a number of learned behaviors that can relate to foraging, recognizing predators, pain, and social organizations. All of these are important for the survival of the individual as well as the species itself. Even everyday human-fish interactions can divulge learned behaviors such as feedings. The fish in both my aquariums swim to the top right-hand front corner of the tank when I enter the room and approach them. That is because I typically feed them from the right corner and they associate me and the location with food. Also, reef fish in popular tourist destinations can be quick to approach snorkelers/divers as many tend to feed them. This type of learning/classical conditioning (i.e. Pavlov’s dog) has also been observed in minnows that recognize other fish as dangerous.
There was a very interesting 2004 article in Current Biology in which the researchers examined the methods by which fish, specifically zebrafish, choose their companions when forming shoals. By genetically selecting the coloration of the fish (blue, gold, or no stripes), they were able to form tank specific populations to determine if preferences were genetic or environmental. Fish were sorted prior to hatching and raised in tanks that contained all of one color type, or in tanks with the opposite color type. After the onset of adult coloration, the researchers then allowed the fish to choose the group they wanted to associate with by placing individuals in tanks subdivided into three sections. The middle section contained the test individual and the sides each contained a certain group made of all one color type. They found that the fish greatly preferred which ever color pattern they had been raised with, irrespective of their own color.
The researchers continued to conclude that this learned social behavior could have a great impact on survival and reproduction of the individual fish.
Reference: Raymond E. Engeszer, Michael J. Ryan, and David M. Parichy. 2004. “Learned Social Preference in Zebrafish”, Current Biology. 14: 881-884.