Introduction

Adaptation to environmental change is an important driving force of evolution (Darwin 1859) and is often driven or buffered by behavioural plasticity (Brown 2012). Phenotypic plasticity is central to dealing with short-term environmental change (Price et al. 2003, reviewed in; Ghalambor et al. 2007; Nussey et al. 2007), whereby individuals can adopt new and beneficial responses better suited to contemporary conditions, resulting in increased fitness through novel and plastic behaviours (West-Eberhard 1989; Pigliucci 2001; Dukas 2013). In cases where genotype expression is greatly influenced by biotic or abiotic factors of the environment in which they exist (G × E interactions, Lynch and Walsh 1998), individuals with identical genotypes can exhibit different phenotypes depending on experience. Thus, individuals with similar genotypes raised in different environments, particularly early in life, often vary in their behaviour (Rosenzweig and Bennett 1996).

Typically, behavioural repertoires are underpinned by neurological substrates in the brain, such that brains and behaviour evolve and develop co-dependently. Individuals raised in homogeneous, or otherwise, predictable environments tend to have reduced cognitive capacity and associated brain regions compared to those raised in dynamic and structurally complex environments (Clayton and Krebs 1994; Healy et al. 1996; Mathews et al. 2005; Kihslinger et al. 2006). For example, caching avian species demonstrate enlarged hippocampi relative to their non-caching cousins, having to deal with increased visuospatial demands of recalling hidden caches (e.g., Krebs 1990; Krebs et al. 1996; Shettleworth 1995; Shettleworth and Hampton 1998). Similar findings have been reported in fish (reviewed in Kotrschal et al. 1998), where size of the telencephalon (analogous to the hippocampus) shows a positive correlation with structural complexity of environmental origin (e.g., Näslund et al. 2012; Park et al. 2012). In guppies (Poecilia reticulata), for example, the telencephalon in lab reared individuals showed a 19% size decrease compared to those from wild populations (Burns et al. 2009).

As environmental complexity influences brain morphology, it will invariably lead to associated improvements in cognitive capability, and one such way this is demonstrated is through spatial learning. Everyday behaviours, such as foraging and predator avoidance, require an intricate knowledge of the spatial distribution of resources and shelters (Dodson 1988; Odling-Smee and Braithwaite 2003; Odling-Smee et al. 2011), and this should favour an ability to learn. This is especially critical in aquatic environments, where resources may shift, so the need to keep spatial information updated is crucial. Fish occupying structurally complex environments develop enhanced spatial learning abilities when compared to individuals raised in barren settings. For example, zebrafish (Danio rerio) learn food locations faster when reared in heterogenous environments (Spence et al. 2011) and sticklebacks (Gasterosteus aculeatus) from the structurally complex littoral zone demonstrate superior spatial learning skills compared to their sympatric, pelagic counterparts (Odling-Smee et al. 2008). Sticklebacks from these varying habitats also vary in cue use, likely due to the availability of landmarks in the littoral zone, compared to the homogenous, featureless pelagic zone, where individuals must navigate using egocentric information.

Laboratory-based investigations have become increasingly common in cognitive studies involving fish; however, laboratory aquaria are generally devoid of complexity, often leading to abnormal and inflexible behaviour (e.g., Brown et al. 2003; Näslund and Johnsson 2016). Some comparative cognitive studies suggest that habitat enrichment can facilitate cognition to levels observed in wild stocks (Brown and Day 2002; Braithwaite and Salvanes 2005; Odling-Smee et al. 2008). For example, learning ability in the striped knifejaw (Oplegnathus fasciatus) improved when individuals were reared with submerged structures to enhance environmental complexity (Makino et al. 2015), while Mahseer (Tor putitora) shows significantly higher exploratory behaviours and antipredator responses when reared in enriched conditions (Ullah et al. 2017). Thus, there is little doubt that fish show very high capacity for both behavioural and neurophysiological plasticity to changing environments.

Owing to the energetic requirements of the underlying neural mechanisms, the costs of learning are such that they should only be invested in if required by ecological demands (Robinson and Dukas 1999; Mery and Kawecki 2003; Odling-Smee et al. 2008). As phenotypic plasticity is a beneficial adaptation in changing environments, species that inhabit a range of environments make ideal research candidates to investigate the relationship between environmental complexity and cognition. The intertidal zone is one such environment with a number of diverse niches that vary in stability. For example, intertidal rockpools are highly dynamic, and individuals co-ordinate their movements with the changing tides (Martins et al. 2017). The rockpools themselves are physically complex in structure, but relatively stable owing to some protection from the rocky platforms. In contrast, sandy beaches are largely featureless and prone to substratum shifts with the tides.

The family Gobiidae is an extensive group of benthic fishes commonly found along the intertidal zone and in the pools amongst rocky platforms (Thacker and Roje 2011). Early investigations on this group showed that they have incredible navigation abilities (Aronson 1951, 1971; Markel 1994) and subsequent studies have revealed a wide range of behavioural and life-history differences depending on phylogenetic origin (Thacker and Roje 2011). We have previously shown that gobies collected from structurally complex rockpools demonstrate superior spatial learning skills, a preference for different cue types and larger telencephala than gobies from bare, sandy shore habitats (White and Brown 2014a, b, 2015a, b). Although comparisons between species highlight the impact of environmental influence on cognitive function, they cannot differentiate between inherent versus acquired traits.

Here, we investigated how a shift from complex to simple environments from early ontogeny to later life stages impacts the spatial learning capabilities of a ubiquitous marine goby species found along the east coast of Australia. Juveniles were collected from one location and reared under different enrichment regimes to elucidate the degree of behavioural plasticity in the context of spatial learning. Each of the rearing environments mimicked the main micro-habitats, where these fish are found in the intertidal zone, and vary in their degree of physical complexity; sandflats, sea grass beds, oyster beds, and intertidal rock pools. We predicted that prolonged exposure from early ontogeny to these different habitats would result in variation in cognition, such that those fish reared in complex habitats would develop enhanced spatial learning capabilities compared to those raised in homogenous treatments.

Methods

Test animals

The goby species Bathygobius cocosensis is ubiquitous along the NSW coastline, but is particularly abundant in the rockpools in the intertidal zone. Individuals of all life stages can be found in the naturally occurring pools along the rocky platform. Breeding occurs in spring, and larvae enter a 4-week pelagic phase post-hatching, before metamorphosing and settling onto the benthos as juveniles (Thia et al. 2018). Juvenile gobies were collected from Dee Why, NSW, Australia, using small, hand held nets, during January and February of 2017. A total of 56 juveniles were collected, ranging from 7 to 10 mm, and transferred to the Sea Water Facility at Macquarie University in a large bucket (10 l) of aerated seawater. Once there, they were slowly acclimatised to a 70 L opaque-white, plastic holding tub (64.5 × 41.3 × 27.6 cm) linked to a recirculating system with a 3 L/min flow rate. The tub had a 15 mm hose inlet and a 25 mm PVC outlet, covered with 200 μm mesh to prevent gobies escaping. The young gobies were allowed to acclimate in this housing tub 4 weeks, during which they were introduced to a diet of frozen Artemia infused with powdered Polylab Nano Food Roids. They were also given finely crushed commercialised Artemia flakes.

Housing

After the settling period, gobies were randomly assigned to a micro-habitat type and introduced to the tidal tank (n = 14 per treatment). This tank was made of 6 mm glass [144 cm (L) × 50 cm (W) × 40 cm (H)], and divided into five parts, four of which were 33 cm long, separated by four black acrylic partitions [50 cm (L) × 0.5 cm (W) × 45 cm (H)]. Each partition had three holes (diameter 5 cm) covered by 200 μm mesh, fine enough to stop gobies from passing through, but coarse enough to allow sufficient water flow between sections. Each of the four sections formed a micro-niche rearing chamber. Two chambers represented relatively homogenous habitats (fine sand substrate with and without seagrass Zostera muelleri) and the other two rocky platform habitats (a mixture of live oyster formations and broken oyster fragments and a makeshift rockpool on a bed of coarse shell grit, surrounded by larger stones). These chambers mimicked the most common coastal habitats along the NSW coastline: open sand, seagrass beds, oyster reefs, and intertidal rock pool habitats, respectively. A smaller chamber (12 × 50 × 40 cm) on one end of the housing chambers contained the drainage mechanism used to simulate tides. This chamber was fitted with a PVC outlet pipe (5 cm D × 25 cm H) which, at high tide, emptied directly into the sump below (144 × 50 × 40 cm). An additional three holes were fitted with 20 mm solenoids alongside the main outlet, also draining to the sump below. These solenoids were controlled by an automated sprinkler system (Hunter Pro-C 16 Station Modular Controller). The automated system opened all solenoids at a set time and drained the tank for a period of 6 h, after which the water level dropped to 15 cm deep. At high tide, when the solenoids were closed, the water was 35 cm deep.

To minimise interaction with external factors, the tank was surrounded with polystyrene foam and food was provided automatically. An automatic feeder (Jebao DP-4) with four separate pumps was arranged with each pump outlet leading to one of the four micro-niche sections of the tank. Feeding into the pumps was a 1 L flask with a mixture of 800 ml of saltwater, 200 ml of aged freshwater, and approximately 25 g of commercial aquarium foods (Ocean Nutrition Frozen Artemia and Marine Mix). The mixture was kept aerated and agitated to allow easy flow through the automatic feeder. Each pump was programmed to release different amounts of the pre-prepared mix twice daily in the morning and afternoon at the changeover between low (35 ml) and high tide (55 ml).

The gobies were kept in this tank for 12 months until they reached approximately 3–4 cm and were large enough to be tagged easily. Each group of gobies was assigned a different tagging colour and sequence according to the micro-habitat that they were housed in. For tagging procedures, each goby was placed in a bath of MS222 and sodium bi-carbonate (50 mg per 1 L saltwater) for 30–60 s until equilibrium was disrupted. They were then tagged on one of the six possible sites beneath transparent scales along their dorsal surface with elastomer ID tags (VIE: Marine Technology, Inc. 2008) for individual identification. The gobies were also measured for total length (TL) and weighed, then placed in an aerated bucket of saltwater for recovery. This process took less than 2 min per goby, and each individual recovered within 5 min. They were then returned to the tidal tank for 1 week for full recovery.

Test apparatus

The “plus” maze used was of the design described by White and Brown (2014a), which could be arranged to form a t-maze (Fig. 1). The maze contained a fine sand substrate approximately 1 cm thick and was submerged in a large fibreglass tub (120 × 75 × 19 cm) with water 12 cm deep. Four large black barriers were erected around the maze to discourage the gobies from using external cues for orientation. Each of the four ends of the maze had a clear food dish (3 cm diameter, 1.5 cm deep) and a shelter made from halved PVC piping (7 cm long, 1.25 cm radius). One of these shelters was fitted with clear plastic over both ends to block access, and was used as the incorrect choice shelter during the trials. The shelter appeared functional, but the plastic prevented the fish from entering. A camera was mounted above the maze on a steel frame to record all trials, and the footage uploaded to a hard drive. Each group of gobies was introduced to the maze for a 24-h acclimation period, where they had full access to the maze and food inside the food dishes. They were then returned to their respective micro-niche for another 24 h until testing began.

Fig. 1
figure 1

Diagram of the spatial learning task. Letters indicate the sequence of start box positions for 3 consecutive trials starting at position A. The arrow indicates the correct route a right-trained fish had to follow to obtain food and shelter

Trials

To account for possible lateralisation bias, each goby was randomly assigned to left or right side training prior to commencing trials (Brown and Braithwaite 2004). Each goby was tested alone, three times per day, beginning with a 3-min introduction to the start box. For orientation purposes, a landmark (small marble, 1.2 cm diameter) was placed in the junction of the maze. The use of a marble ensured that none of the subjects were familiar with the landmark, and thus, neither group could be at a disadvantage from others. The landmark was placed slightly to the left in trials where the goby was assigned to choose the right arm, and vice versa. This way, the goby had to turn away from the landmark to choose the rewarded arm.

Once the individual was settled in the start box, the separation door was lifted and the trial began. The exit time, the side of choice and total trial time were all noted. The exit time was recorded when at least half of the body was outside of the start box. Trials were finished when a goby entered either the left or right reward box, or a maximum time of 10 min passed. In cases where gobies did not exit in 10 min, they were considered to have failed the trial. When gobies chose the correct side, the removable partition was added to prevent their escape, and they were immediately rewarded with Artemia, delivered via pipette into the food dish. When the incorrect choice was made, gobies were kept isolated for 3 min in their choice box with no food reward and no access to the shelter. They were then gently ushered into the correct reward arm to access the shelter and rewarded with food, though this practice was discontinued after the first 5 days of trials, after which they were only given food if they chose the correct side. When gobies chose the correct side for three trials across five consecutive days successfully (i.e., 15 trials consecutively), they were considered to have learnt the task and trials ceased. Between each trail, the reward location became the new start location, which meant that the fish could not rely on extra-maze cues to solve the spatial task. Rather, they had to use the landmark or egocentric information (i.e. turn direction).

Statistical analyses

In most cases, data were normally distributed and analysed using parametric tests, or log transformed to achieve a normal distribution. Exit time from the start box was used as a measure of motivation. Each goby had three exit times per day, which were then averaged for a daily exit time per individual. We used data from the first, fifth, and tenth days of the spatial task and the data were log transformed to achieve a normal distribution. These days were chosen as a temporal representation of when gobies were new to the maze (day 1), becoming accustomed to the maze and the food reward (day 5) and when the learning curve was well established with only two gobies having reached criteria (day 10). Size class was based on TL, where < 3.49 cm were small fish and > 3.50 cm were large fish. We used a repeated measures ANOVA to analyse exit time against environmental enrichment and size class as independent variables. The same protocol was applied when analysing total trial time, calculated from the exit time value to the moment an individual entered either the correct or incorrect box.

We used ANOVA to examine the effects of environmental enrichment and size class on the number of days to reach criteria and a Fisher’s post hoc test to determine the pairwise differences between the four enrichment treatments.

To analyse performance trends as influenced by enrichment type, each goby was given a binary score (0 or 1) based on correct or incorrect choice in the maze. After three trials per day, each goby was assigned the average of this score for a daily score. We analysed the effect of environmental enrichment and size class on daily scores between treatment groups for the first, fifth, and tenth days of trials using a repeated measures ANOVA. By the tenth day of trials, only two individuals had reached criteria, and were given scores of 100% for analysis purposes. All analyses were performed using StatView Version 232 5·0·1 (SAS Institute Inc. 1998).

Results

Days to reach criteria

There was a significant effect of enrichment in rearing environment on the number of days to reach criteria (F3,24 = 3.804, p = 0.023; Fig. 2). Body size had no effect on the number of days to reach criteria and there was no interaction between rearing environment and body size (p > 0.05). Post hoc analyses showed that fish reared in rockpool and oyster bed environments reached criteria faster than those reared in seagrass (Fisher’s PLSD p = 0.014, p = 0.004, respectively). Gobies reared in the oyster bed environment also reached criteria significantly faster than those in the sand environment (Fisher’s PLSD p = 0.02).

Fig. 2
figure 2

Mean (± SE) number of days to reach criteria per treatment group of gobies

Daily scores

Daily scores indicate how many correct choices the fish made during the day. There was a significant effect of enrichment in rearing environment on daily score (F3,24 = 4.881, p = 0.009; Fig. 3). Body size was not significant, nor was the interaction between rearing environment and body size (p > 0.05 in both cases). There was a significant effect of trial day on mean daily score (F2,48 = 6.362, p = 0.004); scores generally improved with increasing trial number. We also found an interaction between trial day and environmental enrichment (F6,48 = 3.159, p = 0.011; Fig. 4), suggesting that the rate of learning over time varied depending on which rearing environment the fish were exposed to.

Fig. 3
figure 3

Mean (± SE) daily scores for all trials on days 1, 5, and 10 per treatment group

Fig. 4
figure 4

Mean (± SE) daily scores for all trials on days 1, 5, and 10 per treatment group [(diamond) sand, (square) seagrass, (triangle) rockpool, and (cross) oyster]

Post hoc analyses revealed that daily score means on day 1 were similar across treatment groups (Fisher’s PLSD p = 0.310), but showed highly significant differences on days 5 (p < 0.001) and 10 (p = 0.009). In general, fish reared in rockpools and oyster beds showed the greatest improvement over time (Fisher’s PLSD p = 0.043, p = 0.010, respectively). Those reared in sand or seagrass treatments showed little improvement, or in some cases poorer scores, over time (p > 0.05 in both cases).

Motivation

We used exit time as an indicator of the gobies’ motivation to interact with the task. There was a significant effect of rearing environment (F3,24 = 7.701, p < 0.001), with gobies reared in the seagrass environment exiting significantly slower than fish from all other  enrichment treatments (Fisher’s PLSD p < 0.02 in all cases; Fig. 5). Larger gobies were slower to exit the start box than smaller gobies (F1,24 = 4.419, p = 0.046; Fig. 5). The interaction between rearing environment and body size was not significant (p > 0.05). The time to exit the start box decreased with increasing trial number (F2,48 = 22.013, p < 0.001; Fig. 6).

Fig. 5
figure 5

Mean (± SE) exit time for large and small gobies per environmental enrichment treatment across all trials. Size class was based on total length (TL), small < 3.49 cm, large > 3.50 cm

Fig. 6
figure 6

Mean (± SE) exit time for all gobies for trial days 1, 5, and 10

Total trial time

Total trial time was based on the time an individual spent in the t-maze from leaving the start box to choosing either the left or right side. There was no significant effect of rearing environment or size class on total trial time (p > 0.05 in both cases). The interaction between rearing environment and size class was also not significant (p > 0.05). Trial day had a significant effect on total trial time (F2,48 = 7.000, p = 0.002), such that the time to complete the maze declined over time. There was also a significant interaction between trial day and environmental treatment (F6,48 = 2.528, p = 0.033; Fig. 7). There were no other significant interactions.

Fig. 7
figure 7

Mean (± SE) total trial time for days 1, 5, and 10 between treatment groups: [(diamond) sand, (square) seagrass, (triangle) rockpool, and (cross) oyster]

Post hoc analyses revealed gobies reared in the rockpool and seagrass environments showed the greatest improvement over time to complete the task (Fisher’s PLSD p = 0.021, p = 0.035, respectively). Those reared in oyster and sand environments showed little improvement over time (p > 0.05 in both cases).

Treatments and body length

The TL of the fish reared in each of the treatments was not significantly different (F3,28 = 0.494, p = 0.689) nor did they differ in body weight (F3,28 = 0.171, p = 0.915). However, gobies in the oyster treatment group showed less variation in sizes compared to other treatment groups.

Discussion

Previous investigations have reported dramatic differences in the spatial learning skills of fish inhabiting contrasting environments (e.g., Odling-Smee et al. 2008; White and Brown 2014a), but it is unclear to what extent that variation is a result of natural selection operating over generations, or behavioural plasticity resulting from individual experience during ontogeny. Here, we collected juvenile gobies from a rockpool environment and reared them in four artificial habitats modelled after common coastal environments for 12 months. We found that rearing gobies in these contrasting habitats had a profound impact on their ability to solve a novel spatial learning task. Gobies reared in more complex habitats (oyster reef and rocky reef), took fewer trials to reach learning criteria and made more correct choices than those reared in the simple sandy shore and seagrass treatments. Fish reared in the enriched treatments  took longer to leave the start box than those in the sand treatment but not the seagrass treatment. Most importantly, exit times between small and large gobies were most accentuated in the enriched treatments, which indicates how motivated they were to engage in the task, but is also commonly used as a measure of boldness (e.g., Brown and Braithwaite 2004; Toms et al. 2010).

Environmental enrichment has long been associated with changes in the nervous system (Ebbesson and Braithwaite 2012), by posing an increased demand in sensory, motor, and cognitive functions (Dinse 2004; Leggio et al. 2005; Harburger et al. 2007; Strand et al. 2010; Salvanes et al. 2013). Physical complexity also aids in reducing stress (Braithwaite and Salvanes 2005; Millidine et al. 2006; Kistler et al. 2011; Näslund et al. 2013) and encourages exploratory behaviour (Camacho-Cervantes et al. 2015). Here, we report significantly changed cognitive abilities in gobies, whereby those reared in structurally complex environments (oyster bed and rockpool) reached learning criteria significantly faster than those reared in homogenous environments (sand and seagrass). These results agree well with similar enrichment studies on other fish species (e.g., Salvanes and Braithwaite 2005; Salvanes et al. 2007; Spence et al. 2011). The rockpool treatment group was modelled after a rockpool setting from which the juveniles were collected from, thus, this may be the closest representation of how wild caught individuals would perform in a spatial task at the same developmental stage as those used in this study. Interestingly, the seagrass group required more days to reach learning criteria than all other treatments, despite being in a moderately enriched habitat compared to those in the sand treatment.

Daily scores increased significantly in all treatments over the length of the experiment; however, there were also significant differences between gobies reared in the various enrichment treatments. Fish in all treatment groups performed similarly on the first day of trials; however, daily score differences changed significantly on days 5 and 10 as oyster and rockpool groups performed better than sand and seagrass groups. These differences between learning abilities, derived from the change in habitat complexity in early ontogeny to later life stages, indicate that differential experiences play a critical role in the formation of flexible behaviour in later life (Rosenzweig and Bennet 1996; Kotrschal and Taborsky 2010). Juvenile trout show greater spatial learning and problem-solving behaviour when exposed to enriched conditions, followed by individuals that experienced homogeneity early in life then are switched to enriched settings (Bergendahl et al. 2016). Trout in two other treatments, early enrichment/late homogeneity and complete homogeneity, behaved similarly, indicating that the more recent the enrichment, the greater the role in developing flexible behaviour (Bergendahl et al. 2016). Similarly, Atlantic salmon briefly exposed to live prey and structural enrichment showed significantly improved responses to novel, live prey (Brown et al. 2003). Neurologically, this makes sense, as a plain environment would have minimal use for spatial learning and the corresponding neural machinery in the brain. If an individual’s environment does not demand it, there is little point investing energy into neurological structures required for cognitive processes.

Survival in wild conditions requires the collection and interpretation of environmental information (Galef and Laland 2005), which can be enhanced in individuals with bold or exploratory traits, enabling them to collect this information rapidly (Braithwaite and Salvanes 2005). Naturally, boldness may enhance fitness through longer foraging trips; however, there is an associated risk of predation (Sih et al. 2004). Although gobies had no threats of predation in this study, B. cocosensis commonly show heightened levels of aggression, typically between individuals of similar size. We found that smaller gobies were faster to leave the start box than larger gobies on the first day of trials; however, the larger fish showed a decrease in latency by the fifth day, which was maintained until the tenth day. Previous studies have also found  that smaller individuals tend to be bolder than large individuals when emerging from cover into a potentially dangerous environment (Brown and Braithwaite 2004). Small fish have demanding metabolisms and an added incentive to feed frequently in order to reach sizes where they can avoid gape-limited predation and increase their potential in intra-specific competition for resources. In addition, larger fish arguably have more to lose given their greater long-term investment in growth (asset protection principle; Clark 1994). It is interesting to note that as the fish became familiar with the test environment (Brown 2001), the larger gobies’ emergence times converged with that of the smaller individuals, suggesting that they no longer perceived the arena as dangerous.

Brydges and Braithwaite (2009) suggest that sticklebacks from enriched aquaria should display lower levels of neophobia and greater levels of boldness compared to individuals from homogeneous aquaria (e.g., Sherwin 2004; Braithwaite and Salvanes 2005; Fox et al. 2006). These patterns were reported in other studies, for example, cod exposed to spatial heterogeneity during rearing were bolder; however, they are also faster at seeking shelter than fish reared without enrichment (Salvanes and Braithwaite 2005). Bergendahl et al. (2016) admit that while exit time may be a better indicator of motivation rather than learning, their experiment showed that trout reared in enriched treatments learned and exited faster than their homogeneous counterparts. Similarly, mahseer raised in enriched conditions were less neophobic, emerging from a start box faster than those reared in impoverished environments (Ullah et al. 2017). Our results agree with these results to some extent, as shown by the higher exit times in the seagrass treatment group, followed by those in the enriched treatments (oyster and rockpool), perhaps due to their unfamiliarity with open, unsheltered areas in the spatial learning test area. It should be noted, however, that this trend was only observed in the larger gobies. It is likely that they perceived open areas as potentially risky, because they were accustomed to hiding in crevices while in their home tanks. In contrast, smaller gobies in the rockpool treatment were fastest to exit the start box. Despite the fact that larger gobies tended to emerge later than those fish from the less complex sand environment, they still learned the task substantially more quickly. This was not because they moved more quickly through the maze once they had exited the start box, but because they tended to make good decisions when deciding which arm of the maze housed the reward.

Although rearing environment influences exploratory traits (Kelley and Magurran 2003), the reasons behind motivation are often difficult to interpret (Braithwaite and Salvanes 2005). It is possible that hunger would have been one factor to seek out the reward (Colgan 1993), but the cryptic nature of gobies probably influenced their motivation to seek out shelter. In early trials, motivation was perhaps twofold with the reward being food and shelter, seemingly demonstrated when gobies would first move into the shelter and then explore the food dish after some time had passed. After several trial days, and presumably when gobies became accustomed to the maze and lack of predators, individuals immediately searched for a food reward upon entering the correct arm. This may explain why the fish reared in complex environments solved the tasks more rapidly: they were initially highly motivated to seek shelter.

To conclude, environmental changes drive genetic variation in innate behaviours, as environments undergo shifts in complexity, so too do behavioural phenotypes change, such that no phenotypic trait remains completely optimal over time (Mery and Burns 2010). In cases where species experience temporal or spatial heterogeneity on a regular basis, flexible, and reversible plasticity is a favourable trait (e.g., Bloch and Robinson 2001; Relyea 2003; Nussey et al. 2007). Kotrschal and Taborsky (2010) suggest that disturbed regimes in early ontogeny solidify cognitive abilities of individuals, perhaps because it signifies that the individual lives in a dynamic world. Here, we show that gobies reared in enriched environments modelled after their natural habitat were better at solving a spatial task, and it is likely that these environments favour enhanced spatial skills and underlying brain components (telencephalon: White and Brown 2015a). Gobies reared in the seagrass and sand treatments demonstrated reduced cognitive function, as a result of experiencing a low-demand habitat from early ontogeny for a prolonged period. Our data indicate that many of the behavioural variations observed in populations of animals collected from contrasting environments may be largely the result of behavioural plasticity formed during ontogeny.