A Tiny Texas Fish Reveals How Generalists Outthink Specialists in Unpredictable Habitats
When the environment changes without warning, survival may depend not only on an animal’s anatomy or physiology, but also on how quickly it can change its behavior. A new study of two closely related Texas fishes suggests that ecological generalists—animals able to exploit many habitats and resources—may possess a behavioral edge in unstable conditions. In laboratory tests, western mosquitofish, Gambusia affinis, were bolder and more successful at solving a navigational challenge than their specialist relative, Gambusia geiseri. The findings, published in Animal Cognition, offer a striking example of how ecological strategy can be reflected in cognition, risk-taking and movement, while also showing that specialists can outperform generalists when conditions match their adapted niche.
The distinction between the two species is unusually informative because they are close relatives living in the same region but following very different ecological strategies. G. affinis is a broad-ranging habitat generalist found in disturbed, artificial and environmentally variable settings. It is also an invasive species in many parts of the world, and the International Union for Conservation of Nature lists it among the 100 worst invasive alien species. G. geiseri, by contrast, is a Texas endemic associated with clear, spring-fed systems in the Guadalupe and San Marcos rivers. It is a specialist adapted to relatively narrow conditions, including the stable temperatures characteristic of spring habitats. Comparing these species allows researchers to examine cognition while minimizing the evolutionary differences that complicate comparisons between distant species such as primates and birds.
The researchers focused on two river populations in central Texas. One was located near the headwaters of the San Marcos River, where strong spring flows produce a relatively stable, stenothermal environment—one with limited temperature variation. Historical median discharge at the site was about 4.686 cubic metres per second, and the water temperature averaged 22.1 °C with comparatively little variation. The population was dominated by the specialist, G. geiseri, which represented about 94 per cent of fish recorded in long-term surveys, while G. affinis accounted for approximately 6 per cent. The second site, in the Old Channel of the Comal River, had lower flow, shallower margins and greater exposure to ambient heating and cooling. There, the two species were present in roughly equal numbers, with G. geiseri making up 55 per cent and G. affinis 45 per cent.
In March and April 2025, the team collected 20 adult females of each species from each river, creating four groups of 20 fish. After transportation to Texas State University, the animals were housed in 38-litre aquariums for 48 hours, allowing them to acclimate to laboratory conditions. The researchers then tested risk-taking, motivation, inhibitory control and swimming performance. The central cognitive test was a delayed detour task, a widely used method for measuring whether an animal can suppress a direct but ineffective response and instead follow an indirect route to a goal. In this case, each fish was placed in a starting chamber separated from a social reward—a conspecific fish—by a transparent plexiglass barrier. To reach the reward, the focal fish had to leave the chamber, approach the barrier, and then swim around it through one of two narrow openings. Blinders temporarily prevented it from seeing the reward while making the detour, increasing the need to remember the goal and persist after the direct path was blocked.
The arrangement separated several aspects of behavior that are often conflated. The time needed to leave the starting chamber served as a measure of risk-taking or boldness: a fish that rapidly entered an unfamiliar area was interpreted as more willing to accept potential danger. The time from leaving the chamber to touching the barrier measured motivation to approach the social reward. The interval between touching the barrier and reaching the fish on the other side represented problem-solving speed and inhibitory control, because the animal had to stop trying to pass directly through the transparent obstacle and redirect its movement around it. Each fish had up to 10 minutes to exit the starting chamber and another 10 minutes to complete the detour. Afterward, the researchers used video tracking to quantify activity in a separate container, including time spent moving, average swimming velocity and maximum acceleration.
The generalist emerged as the more adventurous and effective problem solver. G. affinis was significantly more likely to complete the detour than G. geiseri, although the magnitude of the difference depended on the population. The clearest contrast involved specialist fish from the variable Comal River habitat: they were less likely to solve the task than G. affinis from either river. G. affinis also exited the refuge significantly faster than G. geiseri, regardless of where the fish had been collected. Faster-swimming individuals tended to leave the chamber sooner, but the population of origin itself did not significantly predict exit time. The result supports the idea that generalists may operate with a lower neophobic threshold—the point at which unfamiliar surroundings trigger avoidance—because repeated exposure to diverse conditions may favor exploration rather than hesitation.
The species did not differ significantly in motivation to reach the social reward. This is important because it suggests that G. geiseri did not simply ignore the goal or lack interest in social contact. Both species are shoaling fishes, and both appeared comparably motivated by the presence of another fish. Their difference arose more strongly after the direct route was blocked. G. affinis from both sites solved the detour faster than G. geiseri from the Comal River, while no significant population difference appeared within either species. The pattern indicates that ecological strategy may be linked less to the basic strength of motivation than to the ability to modify behavior when an initially obvious response fails. In cognitive terms, inhibitory control is the capacity to withhold an impulsive or prepotent action and replace it with a more appropriate response.
Swimming tests revealed a more complicated picture than a simple generalist advantage. The effect of habitat depended strongly on species identity. In the lower-flow, more variable Comal River population, G. affinis swam significantly faster than G. geiseri. In the higher-flow San Marcos River population, however, the specialist G. geiseri swam faster than the generalist. G. affinis individuals from Comal were also faster than their counterparts from San Marcos, whereas G. geiseri from Comal were slower than those from San Marcos. This reversal suggests that physical performance is finely tuned to local conditions. A specialist adapted to persistent current may excel in a high-flow environment, while a generalist may maintain stronger performance across shallower and more variable waters. The researchers also found a species effect on maximum acceleration: G. affinis had a higher mean log-transformed acceleration, 2.91 compared with 2.62 for G. geiseri, with no significant effect of population or body size.
The findings illuminate a longstanding debate about why generalists often thrive in disturbed or rapidly changing ecosystems. The “dangerous niche” hypothesis predicts that animals encountering many unfamiliar and potentially threatening conditions should become more wary. The competing “neophobic threshold” hypothesis predicts that repeated experience with novelty can make generalists more willing to investigate it. The behavior of G. affinis favored the second explanation. Its members left shelter quickly, explored an unfamiliar test space and retained high detour-solving performance across both river populations. Such flexibility could help a species exploit new habitats, tolerate human disturbance and establish populations beyond its original range. But boldness is not universally beneficial: exploring unfamiliar environments can increase exposure to predators, pollutants or ecological traps, where an animal’s evolved preferences lead it into poor-quality habitat.
For G. geiseri, the results suggest the potential cost of specialization when local conditions shift away from the environment to which a species is adapted. The specialist population from the stable San Marcos River displayed superior swimming performance, consistent with life in stronger currents, yet the same species from the more variable Comal River showed reduced swimming speed and lower detour success. This does not mean that specialists are generally less capable. Rather, their abilities may be highly effective within a narrower environmental window, while generalists retain a broader portfolio of responses. The two species’ contrasting strengths could also promote coexistence by dividing habitats or resources according to behavioral performance: one excels in predictable, high-flow conditions, while the other is more willing and able to explore variable surroundings.
The authors caution that the study cannot yet determine how much of the difference is inherited and how much develops through experience. Swimming performance may also be influenced by morphology, including body shape and muscle structure, rather than behavior alone. The experiment used wild-caught adult females tested after a short acclimation period, so longer-term effects of captivity, age, individual personality and previous environmental experience remain open questions. Future research could raise both species under identical conditions, test juveniles across development, examine brain structure and function, and measure whether individual fish improve with repeated detour trials. Even with those limitations, the study provides a vivid demonstration that cognition is not an isolated trait floating above ecology. In these small Texas fishes, the breadth and predictability of the habitat appear intertwined with the willingness to take risks, the capacity to inhibit an ineffective response and the ability to keep moving when the world changes.
Subject of Research: Cognition, behavioral flexibility, risk-taking, inhibitory control and swimming performance in generalist and specialist Gambusia fishes across contrasting river habitats
Article Title: Generalist vs. specialist: cognition and behavioral flexibility in Gambusia across habitats
Article References: Irwin, K., Durocher, C., Wilroy, A. et al. “Generalist vs. specialist: cognition and behavioral flexibility in Gambusia across habitats.” Animal Cognition 29, 29 (2026). Original research article
Image Credits: AI Generated
DOI: 10.1007/s10071-026-02052-6
Keywords: Gambusia affinis, Gambusia geiseri, behavioral flexibility, inhibitory control, risk-taking, ecological generalists, ecological specialists, environmental change, animal cognition
Tags: behavioral flexibility in unstable habitatsbehavioral responses to habitat disturbancecognitive advantages of ecological generalistsEcological generalists vs. specialists in fish cognitionGambusia affinis adaptive problem-solvinghabitat exploitation and resourcefulnessimpact of environmental variability on fish behaviorinvasive species and ecological adaptabilitylaboratory navigation tests in fish cognitionrisk-taking behavior in generalist fishspecies-specific ecological strategies and survivalTexas endemic fish cognitive strategies


