Premises for a digital twin of the Atlantic salmon in its world: Agency, robustness, subjectivity and prediction

Aquaculture of Atlantic salmon Salmo salar is in transition to precision fish farming and digitalization. As it is easier, cheaper and safer to study a digital replica than the sys-tem itself, a model of the fish can potentially improve monitoring and prediction of facilities and operations and replace live fish in many what-if experiments. Regulators, consumers and voters also want insight into how it is like to be a salmon in aquaculture. However, such information is credible only if natural physiology and behaviour of the living fish is adequately represented. To be able to predict salmon behaviour in unfamiliar, confusing and stressful situations, the modeller must aim for a sufficiently realistic behavioural model based on the animal’s proximate robustness mechanisms. We review the knowledge status and algorithms for how evolution has formed fish to control decisions and set priorities for behaviour and ontogeny. Teleost body control is through genes, hormones, nerves, muscles, sensing, cognition and behaviour, the latter being agentic, predictive and subjective, also in a man-made environment. These are the challenges when constructing the digital salmon. This perspective is also useful for modelling other domesticated and wild animals in Anthropocene environments.

in the North Atlantic Ocean and its rivers (Lennox et al., 2021), where most populations now are at risk (International Council for the Exploration of the Sea [ICES], 2022), predominantly due to anthropogenic changes in the rivers (Lenders et al., 2016) and, more recently, reduced survival in the ocean (Vollset et al., 2022(Vollset et al., , 2023)).Artificial environments combined with artificial selection change the experiences of the fish and their life histories.Conflicts between their naturally evolved physiology, expectations and the environmental conditions in intensive production are important challenges in the industry (Duncan et al., 1999;Martinez et al., 2023).
How salmon now is coping in aquaculture is of great interest not only to the aquaculture industry but also to regulators and, increasingly, also to the public.To satisfy each of these parties, it is insufficient to just have models that are constructed and sometimes tuned to investigate a particular case or question.Rather, we need transparent models based on deep principles that can communicate credibly to all interested parties on a wide range of situations, including new situations the model has not been particularly developed for.This calls for an Atlantic salmon digital twin.
We do not present a digital twin in this paper but point at the need for one, outline an approach for developing it and describe how it may be designed.Here in this section, we point at several challenges that call for the development of a model salmon that behaves quite like live salmon in a wide range of situations.In Section 2, we discuss the most appropriate modelling approach, particularly which level of detail is necessary and fruitful for the digital twin of a salmon or another vertebrate.In Section 3, we roll out the biological mechanisms at this level, describe the evolved decision machinery salmon and other teleosts use and point at algorithms for the digital twin.In Section 4, we sum up and point out approaches that have incorporated some or many of the digital twin concepts.

Challenges in aquaculture
To improve aquaculture productivity and reduce unwanted mortality and environmental impacts, the Atlantic salmon industry strives towards precision fish farming, entailing full operational control based on continuous digital monitoring (Antonucci & Costa, 2020;Bekkozhayeva & Cisar, 2022;Chatziantoniou et al., 2023;Føre et al., 2018;Royer & Pastres, 2023).This effort has led to a snowball of automatically collected data as well as artificial intelligence (AI) tools to aid in their analysis and monitoring (Mustapha et al., 2021).Monitoring aims for better prediction, control and optimization.This has traditionally been done through human intuition.However, formal ver-ifiable models are much more efficient, especially when the production system scales up.Most living systems, such as fish, show complex behaviour that results in a high degree of uncertainty (Parr et al., 2022).
Predicting and controlling their behaviour by purely data-driven AI models requires a large amount of continuously incoming data and still lacks transparency (Pearl, 2019).A theory -domain knowledge of basic causal mechanisms and signalling pathways that control the fish organism -could provide more efficient prediction and control, especially when combined with causal inference, machine learning and AI tools: Big data need big theory (Coveney et al., 2016).The support of relevant mechanistic models greatly reduces the amount of data necessary to make good decisions (Coveney & Highfield, 2023;Coveney et al., 2016).Statistical data-driven reasoning tools of any complexity are fundamentally insufficient for counterfactual, 'what-if' type of questions: This requires causal models (Pearl & Mackenzie, 2018;Pearl et al., 2016).
The future salmon digital twin can be used for monitoring and early warning.The user will be able to import static and dynamic information about the environment within a fish farm (or for a special operation, such as delousing or transportation), run the model of 'the fish from inside' and predict near-future response, including behaviour, space use, feeding, growth, stress and mortality.Simulating alternative scenarios will then help develop the best strategies for management.In future precision fish farming, food production management in salmon and other aquaculture will be monitored and controlled by process and machine learning models.Most of the important decisions will then be assisted through expert systems and tailored decision support tools.
The initial steps in this direction have already been taken.For example, there exist a wide variety of farm-scale models that quantify and predict energy, biomass, feed, waste and economic value in aquaculture (Chary et al., 2022).The design principles for AI-based digital twin for fish farming are under development (Lan et al., 2023;Ubina et al., 2023).However, the current effort focuses on the IT (information technology) 1 , AI, IoT (internet of things) 2 and various other engineering aspects of the technology, viewing the fish as just a mechanistic component of the system, thereby overlooking the essential biological characteristics of fish as a living organism.In contrast to this, fish have evolved life history, behaviour and cognition; they express their own expectations about the environment; they make their own decisions; they can be subject to stress; they learn and display individual differences.Our ambition is to reduce the risk that future intelligent systems are developed only from the mechanistic perspective, with little account of the complex biological nature of the living organism with intrinsic agency and subjectivity.
A salmon digital twin can also be a central component in a wider ments with physical facilities or operations.Combining a digital twin of the engineering and process system with the digital twin of the salmon will make such progress much more efficient and ethical.
More than 80 fish species are used in laboratory research (Mocho & von Krogh, 2022), where the total number of individuals is in the millions annually.Although simulation experiments are faster and cheaper than keeping live fish in physical structures, the replacement of live fish in experiments with a simulation experiment will only be possible if the model is a credible alternative.The digital twin must represent the natural behavioural repertoire of the live salmon in the situations it is exposed to.To be trusted by regulators and the public, a range of experiments and demonstrations will be needed to show that the digital twin has high fidelity to the real organism.In combination with a digital twin of the environment, salmon digital twins can be used to perform initial tests on a range of research and applied questions.As a result, experiments with real fish can be limited to a much smaller range of scenarios.
These may include the most uncertain or the most critical scenarios.

Challenges from the public
Voters and consumers are increasingly interested in health effects of their food, the wellbeing of the fish and the ecological effects of the production (Ankamah-Yeboah et al., 2019;Pulcini et al., 2020;Rickard et al., 2020;Stubbe Solgaard & Yang, 2011).Moreover, the level of trust in science and of scientists impacts consumers attitudes to aquaculture (Rickard et al., 2020).This encourages politicians to set out more transparent regulations of aquaculture (Gismervik et al., 2020), supermarket chains to demand food labels and producers to change production according to market demands (Vormedal & Gulbrandsen, 2020).However, salmon aquaculture is still far away from a situation where food labelling generally works to improve production methods and is trusted by consumers (Gulbrandsen et al., 2022).A digital twin based on fundamental principles for fish physiology and behaviour that are implemented in transparent open source code can be a useful tool for an honest broker (Pielke, 2007) for all these groups.Furthermore, significant improvement in traceability and accountability can be achieved through the use of blockchain technology for labelling (Tolentino-Zondervan et al., 2023).(Way, 2017).By building and using the digital twin, gaps in knowledge will appear.Almost quoting Donald Rumsfeld, the 'unknown unknowns' can become 'knows unknowns' and thus guide experimental research to focus on the important unknowns.

Challenge from science
Our approach to the digital salmon is also valuable for modelling a wide range of other species, both under domesticated conditions as the salmon and in their natural habitats.The methods and philosophy we describe in the following allow for a higher biological realism in the description of cognitive and behavioural abilities and constraints of animals of a given species.Modern advances in computation and simulation allow us to dig into the biology of animals (Budaev et al., 2019;Fawcett et al., 2013;Giske et al., 2013) at a more detailed level than provided by the 'phenotypic gambit' (Grafen, 1984), an overt idealization of ultimate evolutionary perspectives, ignoring phylogeny, ontogeny and mechanisms (Nesse, 2013;Tinbergen, 1963).

Model complexity
The challenge for a salmon digital twin is that salmon evolved to live in a river and the ocean, whereas most now live in a tank or an enclosure and experience situations their recent ancestors never were in.In Section 3, we aim to lay out the deep mechanisms that a salmon will use to determine its behaviour and ontogeny in these new situations.
In this section, we will discuss and define the level of complexity and perspective we need to describe these mechanisms.
Simple models in the form of elegant mathematical equations have traditionally been preferred in biology, following physics as an ideal.
This reflects the historical origin of biology as a descriptive science: An elegant equation can indeed be the best description of the phenomenon.Description of stable, consistent and predictable causal patterns in complex nature fundamentally requires idealizations that are often based on explicit or implicit (sometimes aesthetic) assumptions without regard to whether they are 'true' indeed (Potochnik, 2017).This is expressed in the famous (but imprecise) quote from (Box & Draper, 1987) that 'all models are wrong, but some are useful' .The different requirements of idealization and abstraction inevitably lead to the need to sacrifice either generality, realism or precision of the model (Levins, 1966).A class of models -computer simulations -is based on developing a computational implementation aimed to represent the behaviour of complex systems that are analytically intractable (Duran, 2020;Humphreys, 1990).Simulations involve computational experiments and can tackle interactional and emergent behaviour, but at the cost of higher computation and implementation complexity, lower transparency, more difficult reportability and possible software bugs (Railsback & Harvey, 2020;Winsberg, 2019).In the past, simplicity has been a necessity for lack of data and computation power.Now, biology is shifting to multi-level causal explanations and vast amounts of data.Furthermore, huge computational power is now available from ever more powerful mobile devices and desktop workstations with dozens of CPU cores to cloud server systems with practically unlimited dynamic virtual machine scaling.All this drives interest in digital twins in many areas of biology, such as of organs and bodies (Coveney & Highfield, 2023), fish farms (Su et al., 2023) and ecologies (de Koning et al., 2023).A digital twin is a mechanistic simulation model that accurately represents some object of the physical world for analysing its behaviour for optimal design, control and performance (Barricelli et al., 2019;Singh et al., 2022;Wright & Davidson, 2020).Unlike traditional theoretical models, digital twins are designed to be sophisticated rather than simple, aimed at implementing the complete system with multiple components in a virtual environment, taking advantage of a detailed causal understanding of these components and their interactions (Tao et al., 2019).This gives a digital twin multiple usages: They are not tailored to a specific objective (Coveney & Highfield, 2023).In contrast to other simulation models that run in the batch mode, digital twin can assimilate data during the simulation, allowing for highly dynamic experiments (Coveney & Highfield, 2023;Rasheed et al., 2020).A digital twin is more than a simulation model because it is able to communicate and synchronize with its physical counterpart through continuous real-time data exchange (Barricelli et al., 2019;Coveney & Highfield, 2023).
However, having access to big data is not sufficient for the performance of a digital twin: Rich data and poor theory are a bad combination (Coveney et al., 2016).With the need for appropriate operational models for fish in facilities, experiments or in ecologies, there is a need to develop good theory to combine with the data.Only a good theory can provide sensible predictions in novel situations for which no data is available.

Modelling the Atlantic salmon in its world
Digital twins can illuminate many aspects of being an Atlantic salmon, such as its immune system, endocrinology, digestion and metabolism, locomotion and organs such as the heart or the digestive tract.We here concentrate on the systems of behavioural and developmental decision-making.This aspect cannot be understood only by dissecting the fish because circuits in the brain are difficult to map to decision-making and because the architectures for decision-making are ultimately evolutionary but proximately highly dynamic.
Our working philosophy in this review is the 'Pasteur's Quadrant' (Mangel, 2023;Stokes, 1997) of use-inspired basic research: we approach a practical problem in aquaculture by searching for a deep understanding of what it is to be salmon.This methodology is necessary for arriving at a valid fundament for digital twins that can be used to predict decisions and behaviour in new situations.We also aim to show that it will also be relevant for other species of fish and other vertebrates, and maybe even in robotics (Christov-Moore et al., 2023).
Even a single cell is hugely complex and is neither understood nor can be fully recalculated in supercomputers (Coveney & Highfield, 2023).Further, the brain is a highly interconnected network of cells and signalling pathways.One would also have to model the rest of the body with a similar level of precision, as the functioning of the brain depends on dialogue with the body (Seth, 2013;Soylu, 2016).To model the behaviour of the whole salmon, the fine-grained (sub)cellular level has a huge complexity overhead yet little value.Representing the behaviour of a salmon as a whole individual entity -the digital twinrequires defining a biologically valid representation of its motivation and decision systems at a practically feasible level of complexity.Considering the human body, Coveney and Highfield (2023, p. 16) stated: 'While a brain can be happy, its component neurons are unfettered by emotions' .That is, the body is more than the sum of its parts, and a major challenge when making a digital twin is to implement this 'more' without recourse to all the numerous low-level details.Our task is simplified by the fact that the salmon's machinery evolved to support the organism's Darwinian fitness.Furthermore, the performance characteristics of the fish that are most important for commercial production (e.g.growth rate and body mass) are also crucial fitness indicators.This allows a focus on these integral behavioural and life history traits, decisions and neural and hormonal signals while implementing cellular and other mechanisms as shortcut equations without causal mechanics.
To explain the salmon digital twin rationale, it is useful to consider the young salmon in a river as contrasted with aquaculture, because it is in this environment that salmon evolved.The challenge for understanding parr ontogeny is not so much to account for the typical patterns of sexual maturation or smolt transformation (e.g.Mangel & Satterthwaite, 2008;Railsback & Harvey 2020;Thorpe et al., 1998), but why many individuals in aquaculture deviate from these patterns.It is difficult to explain alternative behaviours in the absence of clear fitness benefits or differences in prior experience.The salmon digital twin shall represent an individual in an environment that differs from the one in which its behavioural mechanisms adapted through evolution (e.g.Janisse et al., 2019), for instance when there is a mismatch between a parr's physiological state and its evolutionary expectation due to cues of photoperiod, temperature, water flow or salinity.Some behavioural and developmental solutions parr find in the new environment would not emerge in life history optimization or bioenergetics models: These decisions are proximate traps rather than responses that are optimal for fitness.Thus, to predict a behaviour or life history pattern unexpected in the environment to which the fish has adapted, we must model it from the fish's own perspective.We need a method that takes the first-person perspective of the salmon, including the stimuli, expectations and decision machinery (Budaev et al., 2019).
Some philosophers argue it is practically impossible to share a nonhuman animal's perspective (Chalmers, 1995): To understand what it is like to be a bat, one needs to become one (Nagel, 1974).Other philosophers (Dennett, 1991;Metzinger, 2009;Searle, 2004) and scientists (Churchland, 1989;Ginsburg & Jablonka, 2019) argued that the firstperson perspective of an organism can be approached by integrating its components.We posit that this task is realistic because we do not Rather, we follow a more applied objective to develop algorithms that represent internal mechanisms with accuracy sufficient to predict observable performance.There are several (partly competing) perspectives on the evolution of experience and decision-making (Baars, 1988;Barrett, 2017;Barron & Klein, 2016;Chittka, 2022;Del Giudice, 2023;Feinberg & Mallatt, 2016;Ginsburg & Jablonka, 2019;Godfrey-Smith, 2017;Gygax, 2017;LeDoux, 2012;Merker, 2007;Reid, 2023;Seth, 2021;Tononi & Edelman, 1998).However, they all share the key components: agency, emotion, attention, prediction and learning (see Box 1 for definitions of terms).These components set the level of explanation and model complexity -above cellular or neuronal mechanisms -sufficient to represent behaviour and performance in a salmon digital twin credibly.This abstraction can be called 'architecture' .

RESULTS: WHAT IT IS LIKE TO BE A TELEOST FISH
Unlike depicted in evolutionary optimization models, where the optimal behaviour is the one that maximizes expected future reproductive rate, live animals, herein Atlantic salmons, make short-sighted decisions.Yet, the capacity to make these decisions has evolved by natural selection so that a wide range of mechanisms promote behaviours which, in the evolutionary environment of the population or species, quite likely would improve the odds of making offspring in the future.
Neither in aquaculture nor in many of the salmon rivers are current conditions (or the challenges) for Atlantic salmon the same as in its evolutionary history.Therefore, understanding salmon behaviour in aquaculture and disturbed environments cannot take the short path via optimization but must focus on these evolved mechanisms for decision-making.We start almost at the beginning.

Adaptive goal-directed behaviour
There is a fundamental difference between digital twins of physical and biological systems.Except for some physical systems controlled by AI, the current behaviour of a physical system is a consequence of its previous state and the forces that work upon it, whereas the behaviour of a cell, an organ or an organism is adapted to improve its own future state.
In his book Physics II, Aristotle used animal behaviour to explain what he called the fourth type of causation: the purpose, telos, which he defined as the end state for change or action (Mix, 2018).This 'final cause' turned redundant during the scientific revolution involving mathematical explanations of the movements in the solar system.But it reappears in the form of top-down causation invoked to account for intrinsically guided, goal-directed behaviour and (human) intentionality (Ellis, 2016).The notion of final causes is consistent with the evolutionary account of the natural selection of evolutionarily fit individuals (Mix, 2018).Dobzhansky (1973) famously stated: 'Nothing in biology makes sense except in the light of evolution' .Here, 'sense' comes from organismic agency: Genes that contribute to more surviving offspring will

Definition of concepts
Agency: the ability of an autonomous entity of adaptive, goaldirected behaviour.
Broadcast: widespread communication in the brain's working memory.
Centralized state: a unified state of the organism, yielding a range of behavioural and physiological responses.
Controlled hallucination: an assessment made by the brain, a best guess constrained and improved by experience.
Degeneracy: the ability of structurally different components to perform the same function so that the absence of one component can be compensated elsewhere.
Efference: outward from a part of the body, especially from the brain.
Experience: a subjective process by which an individual perceives itself and its environment.
Global organismic state (GOS): the organism's centralized state in terms of the specific survival circuit that is dominant.
Global workspace: the currently active, subjectively experienced working memory.
Modularity: the independence and interchangeability of components in an architecture.
Neuronal response: the interpretation in the brain of the strength of sensory data.
Prediction error: the difference between the predicted state of the body or the environment and the later interpretation of the same by the sensory system.
Prediction machine (also called beast machine): a metaphor of the organism as a computational machine that makes decisions and selects actions based on its own predictions about the future states of itself and its environment.
Re-entrance: the brain's reuse of its emotional circuitry to simulate in the body the state it expects following a behavioural option.
Robustness: an organism's ability to remain in a window of favourable states for future reproduction.
Subjective: internal processes and states of the organism that exist from its first-person point of view; their existence is inseparable from and cannot be defined independently of the experiencing organism.

Subjective internal model (SIM): an internal representation
of an aspect of itself or the environment currently held in the brain, available in broadcast.
Survival circuit: an evolutionarily conserved and highly integrated neural pathway that responds to a specific class of stimuli and controls a specific set of neurobiological, physiological and behavioural responses.
Unlimited associative learning: learning of novel behaviours from novel sensory data combinations.
gradually come to dominate the gene pool.After a sufficient number of generations in a given environment, individuals will have inherited traits making them behave as if they were maximizing evolutionary fitness (Lotka, 1925;Williams, 1966).Agency is thus as old as life itself (Kauffman, 2019) and is necessary for producing natural behaviour in a salmon digital twin.
Agency in the theoretical world of optimality can be derived from fitness-maximization by the Euler-Lotka equation (Lotka, 1925) or a derivative of it (Mangel & Clark, 1986;McNamara & Houston, 1986;Maynard Smith & Price, 1973;Williams, 1966).But this is hardly possible for modelling a sophisticated animal in an artificial situation with complex and flexible behaviour that depends not only on the current sensing, cognition and hormonal state but also on previous experience as well as their expectation of the future.For such models, adaptive agency based on proximate cues can be evolved in a genetic algorithm (GA) (Goldberg, 1989;Holland, 1975).The GA needs a unit that can evolve: an artificial gene pool.This gene pool is distributed in modelled organisms in an individual-based model of a population (DeAngelis & Grimm, 2014;Huston et al., 1988), also called an agent-based model (ABM), where the next generation in the GA is established by the offspring from the current individuals in the ABM.Hence, an ABM embedded in a GA evolves much like a biological population under natural selection.Then, unknown parameter values are coded as allele variants of genes, and the gene pool of the population evolves and adapts over many generations in a modelled environment with the desired complexity and variability (Hamblin, 2013;Huse et al., 1999).
ABMs are not restricted to the simplifications of the organism and the environment that are necessary for optimality studies, so that the same ABM can incorporate density-, frequency-, age-and state-dependent dynamics (Giske et al., 1998) and be exposed to all sorts of environmental variation that can be modelled, as natural organisms also can be.
The robustness of a biological agent is its capacity to be purposeful, that is to remain within the range of states favourable for future reproductive success in a range of conditions (Fernandez-Leon, 2011a, 2011b;Kitano, 2004).We now describe some robustness mechanisms that support agency in a salmon and thus should be found in its digital twin.

Sensing for robustness
There exist mathematical formulations for many of the sensory systems in fish (Atema et al., 1988;Giske et al., 1998;von der Emde et al., 2012), which could be included in a salmon digital twin, especially to improve the modelling of stress (e.g.Zhang et al., 2023).Later, we show that sensing serves to detect and correct errors in the ani-mal's current knowledge about itself and its environment.Instead of collecting as much of the available information as possible, sensing focuses on reducing the uncertainty by focusing the sensory systems (Friston et al., 2010) on aspects that the organism finds important at the moment.This facilitates robustness because it allows an agent to efficiently control itself in response to the environment (Seth, 2021).

Hormonal control of ontogeny and behaviour
Endocrine systems are major regulators of development, physiology, and behaviour in most animals.Some hormones adjust agentic priorities throughout the ontogenetic stage (e.g.Husak et al., 2009;Lorenz & Gäde, 2009;McCormick, 2009), whereas others have more transient effects on keeping the animal within a favourable state, such as by influencing appetite (Kalananthan et al., 2020;Rønnestad et al., 2017) or vigilance (Braithwaite & Ebbesson, 2014;Chrousos, 2009).Although the full hormonal system in a teleost is very complex and only partially understood, major hormone functions have been synthesized into dynamic control models (e.g.Jensen et al., 2021;Weidner et al., 2020) that can be included in the digital twin.
Sensory errors can lead to maladaptive hormone profiles (Luttbeg & Grindstaff, 2022).The same can happen when the sensory patterns in the environment differ from those to which the species was adapted during evolution.Atlantic salmon has been under artificial selection in aquaculture for more than 50 years and 20 generations (Besnier et al., 2022).This has led to some genetic modifications in hormonal systems (Bull et al., 2022;Fleming et al., 2002) impacting physiology, behaviour, leading to faster growth (Debes & Hutchings, 2014;Houde et al., 2010;Solberg et al., 2020), higher stress tolerance (Solberg et al., 2013) and reduced vigilance (Fleming, 1998;Mobley et al., 2021).Domesticated and wild fish may thus differ in their propensity to alternative ontogenetic strategies (Harvey et al., 2018).However, 20 generations in aquaculture are insufficient to completely alter the evolved adaptations.As hormonal control of ontogeny is particularly important for the behaviour of the digital twin, we will discuss it in some depth.

Hormonal control of parr ontogenetic decisions
The organism makes decisions given its current priorities based on its interpretation of sensory data from the environment and its body.Hormones mediate the establishment of the priorities by the organism (Table 1).The developmental decisions that follow from these hormonal changes, such as the diversion of resources from growth to reproduction, lead to further changes in hormone profiles that in turn impact further behaviour.
The life histories of anadromous salmonids require in-advance preparation (vs.instantaneous transition) targeting the seasonal windows of downstream and upstream migration.In late autumn, a newborn fry will initiate its sexual maturation process (1 in Figure 1), F I G U R E 1 Observed life history processes in Atlantic salmon parr in the river, with hormonal and environmental control (see more explanation in Table 1), seen from the researcher's third-person perspective.The timing of events will vary with local conditions.The life cycle is more complex: These are the major events for a parr.Source: Modified from Thorpe et al. (1998).

TA B L E 1
The major hormonal systems involved in ontogenetic changes in Atlantic salmon parr, with cues that activate them.Note: Numbers 2-6 refer to the text and Figure 1.

Ontogenetic transition
which is the default ontogenetic pattern (Thorpe et al., 1998).In the river, assuming photoperiod and climate similar to the Northeast Atlantic, salmon exhibit four ontogenetic patterns (2-5 in Figure 1) and associated hormonal profiles (  Thorpe, 1992;Mobley et al., 2021;Thorpe et al., 1982Thorpe et al., , 1998)).These flexible ontogenetic decisions (Figure 1) are evolutionarily adapted to give high reproductive output, either as large adults returning from the ocean or small fish that mature in the river (Fleming, 1998;Klemetsen et al., 2003).
In addition to parr sexual maturation (3B) and ocean migration (5A), a third overall ontogenetic pathway not seen in nature is now common in intensive aquaculture, often referred to as post-smolt maturation (6 in Table 1).The favourable conditions the individuals (1 sea-winter grilse) find in intensive aquaculture permit them to mature and return to the fresh water in the spring following release (Davidson et al., 2016;Martinez et al., 2023;McClure et al., 2007).With high temperature and high-energy feed, all large males in farming conditions mature in fresh water (Martinez et al., 2023).That is, the evolved plasticity triggers novel life history trajectories in the evolutionarily new conditions of intensive aquaculture (Martinez et al., 2023).However, such early maturation poses a common problem in intensive aquaculture (Duncan et al., 1999;Ebbesson et al., 2007;Stefansson et al., 2007).
Thus, intensive aquaculture gives combinations of cues (Table 1) that salmon may have never encountered during their evolutionary history (Martinez et al., 2023).These combinations trigger hormonal responses that bring about ontogenetic decisions that are both unexpected and unwanted by farmers.Even though early sexual maturation (3B) and smolt transformation (4A) are in developmental conflict (Good & Davidson, 2016;Thorpe, 1994), maturing fish with certain smolt characteristics are now observed (Fjelldal et al., 2011(Fjelldal et al., , 2018;;Martinez et al., 2023).A digital twin model implementing the mechanisms of behavioural and ontogenetic decisions can help understand why this occurs but also help design ways to reduce it.

Behavioural control by survival circuits and centralized state
Female crucian carp (Carassius carassius), when preparing for mating, display a short-term lack of attention towards predators (Lastein et al., 2008).This results from the competition among several survival circuits (LeDoux, 2000(LeDoux, , 2012)).The outcome of this competition mediates the way an organism prioritizes its different adaptive needs (Budaev et al., 2019).A survival circuit is an integrated neural pathway encompassing specific behavioural capacity, from sensing and information processing to the bodily response (Figure 2).For example, a survival circuit for feeding controls the level of hunger and response to food.A circuit detecting and responding to imminent threat requires rapid information flow and leads to fleeing or fighting behaviour.Using bodily and/or environmental information (Table 1), hormones fine-tune a survival circuit to the individual's current situation and priorities, thus reducing carry-over effects from other life stages (Moore & Martin, 2019).
A survival circuit can be invoked by the animal's correct or wrong assumptions about itself or its surroundings, and through competition, it becomes the centralized state of the organism (Anderson & Adolphs, 2014;Barron & Klein, 2016).Each survival circuit processes and represents a class of information that the organism needs to address (Denton et al., 2009).When several circuits are activated simultaneously, they compete, and the winner takes all control over the body's cognitive, physiological and behavioural responses (LeDoux, 2012).
Thus, an animal acquires a full-body intrinsic centralized state, called global organismic state (GOS) by LeDoux (2012).The role of the GOS is to address the current challenge in an appropriate way, given the condition of the organism.This ensures agentic coordination of the brain and the entire body (Chittka, 2022).
Researchers often use the term emotion, referring to concepts similar to survival circuit and centralized state, although there are discussions about what qualifies as an emotion in an animal.We mostly use the wider and looser concepts of survival circuit and centralized state.In other models, similar systems are named motivational systems (Del Giudice, 2023) and primary drives (Sun, 2009(Sun, , 2018)).These are presented in related cognitive/emotional models of decision architectures in psychology: the Connectionist Learning with Adaptive Rule Induction On-line (CLARION) (Sun, 2009(Sun, , 2018;;Sun & Wilson, 2014) and general motivational architecture (GAM) (Del Giudice, 2023).
These concepts owe a debt to the 'drive' ideas of early ethology (Lorenz,

F I G U R E 2
The survival circuit is an integrated pathway between perception and reaction, here shown for hunger and then to feeding.The global organismic state (LeDoux, 2012) is the centralized state.The five small graphs illustrate (individual and inherited) neuronal response functions, where the x-axis is the strength of the sensory data, whereas the y-axis is the strength of the neurobiological state in the brain (Andersen et al., 2016).(The neurobiological states of stomach fullness and energetic state both reduce hunger.)Mutations and natural selection can, due to modularity, modify this chain by changing one component, for example the hormonal modulation, while keeping all else intact.Due to degeneracy, the decision and action can be reached through several pathways.Most animals will have many survival circuits.In their appraisal phases (red, top), they compete through neurobiological states for control of the body (Budaev et al., 2019).Only the winning circuit will become the global organismic state and enter the response phase (green, bottom), with restriction of attention, decision and behaviour.1966).This early attempt to characterize motivation was based on an analogy with hydraulic flow (Lorenz, 1966).This posits that actionspecific energy accumulates over time, generated intrinsically even in the absence of external influence, just as water flows into a reservoir.
The flow from the reservoir, prompting action, is then released by a relevant stimulus.
Based on LeDoux (2000LeDoux ( , 2012)), an algorithm was developed by Giske et al. (2013) and explained by Andersen et al. (2016) and Eliassen et al. (2016) to model survival circuits, competition among them and determine the centralized state of the organism.Its primary objective was to model the pathway from sensing to decision as in Figure 2, evolutionary adaptation and individual variation by evolvable genes.
The two genes in each neuronal response function (Figure 2) convert the strength of sensory data to an intrinsic value that provides a representation for the relevant neurobiological state.This algorithm also contains an adjustable hormonal effect on the strength of a neurobiological state, by up-or down-scaling the signal from a neuronal response to the neurobiological function.This can, for instance, provide a mechanism for female crucian carp to ignore predators when preparing for mating.The genes create a direct link between organismic evolutionary agency and the survival circuits, as individuals with the best allele combinations in their many neuronal response functions (Figure 2) are more likely to find the most appropriate centralized states and be on path for future reproduction.The algorithm was refined by Budaev et al. (2018) to deal with weak activation of the circuits and avoid very quick switching between alternate states.
Additionally, selective top-down attention was added to suppress the circuits that are not relevant to the current global state.
The general architectures of survival circuits are shared across most animal phylogenies, although it can be realized in different neural pathways in the different phyla (Anderson & Adolphs, 2014;Barron & Klein, 2016).The selection for higher agent robustness is facilitated by two architectural properties of survival circuits: modularity and degeneracy (Chen & Crilly, 2014).
Modularity is a characteristic of a system composed of distinct units.
The serial structure in Figure 2 is modular, where a component can be replaced by an alternative formulation without affecting the function of the others (Chen & Crilly, 2014).Modularity increases evolvability and facilitates the evolution of complexity (Clune et al., 2013;Wagner, 1996).
Redundancy is the ability to substitute a module by the function of another module to avoid failure.Degeneracy is a mechanism for redundancy involving parallel structures, enabling the organism to fulfil a specific function via multiple routes (Chen & Crilly, 2014).For example, appetite can be evoked either by sensing food or by cues from the body (Figure 2).

Unified experience
Given survival circuits and the GOS, the next evolutionary step in decision-making was subjective experience: the various processes by which an individual perceives and represents its external and internal environment (Barron & Klein, 2016).Godfrey-Smith (2017) argued that information exchange among survival circuits was the beginning of subjective experience.For example, if the current centralized state is hunger but also includes messages from a survival circuit that senses predators, the centralized state presents a unified experience across sensory modalities.
Exchange among survival circuits in the working memory is called broadcast (Baars, 1988).Broadcast is global if it covers most sensory and representational systems.Before the evolution of broadcast, animals could obtain a centralized state by competition between isolated survival circuits, as many animals still do (Bezares-Calderon et al., 2018;Chalfie et al., 1985).In mammals, the global broadcast mechanism depends on the cerebral cortex (Baars, 1988).In teleosts, its implementation is likely in the optic tectum in the midbrain, which is the major visual centre in the fish brain (Woodruff, 2017).In the optic tectum, nerve cells from the retina create a visual representation of the outer world ('sensory model') (Feinberg & Mallatt, 2016;Meek, 1983;Nevin et al., 2010;Vanegas & Ito, 1983).Other circuits can affect this model through excitation or inhibition, resulting in selective attention (Kardamakis et al., 2015;Nevin et al., 2010).

Selective attention
Attention is the capacity of the nervous system to restrict information processing to only the subset of available sensory stimuli that are relevant to the situation and the demand.Attention is one of the most fundamental characteristics of the nervous system that appeared early in evolution (Krauzlis et al., 2018).Attention temporarily focuses perception and behaviour on what is currently important for the organism (Mendl, 1999).For example, three-spine sticklebacks (Gasterosteus aculeatus) dynamically balance hunger and vigilance through a graded regulation of attention towards prey and predators (Milinski, 1985).
Only organisms having a centralized state can selectively modulate their attention (bottom of Figure 3).Attention selectivity is lower with weak cues (Whyte & Smith, 2021) when the survival circuit is weakly activated (middle of Figure 3) and is graded (Dehaene et al., 2006) by conflicting priorities of strong cues.
The algorithm for competition between survival circuits (Budaev et al., 2018;Giske et al., 2013) also contains selective attention as a consequence of the competition for centralized state.In the Budaev et al. (2018) version, attention selectivity can be weak or strong, which can bring about the two situations described in Figure 3.

Predicting the future
There are mathematical arguments that no living system can survive in a completely unpredictable environment (Zenil et al., 2012).Organisms and their artificial models would be robust only if they are able to predict environmental changes, outcomes of their behavioural options and corresponding new bodily states.In organisms with relatively complex nervous systems, such prediction may have evolved from the efference copy: The capacity to forecast the body's position after a muscle has contracted following instructions from the brain (Vallortigara, 2021).
Prediction allows the organism to determine which sensory changes are caused by the agent itself (Chittka, 2022;Miall & Wolpert, 1996).
Attention simplifies prediction by narrowing the problem to be solved (bottom of Figure 3).

F I G U R E 3
The decision-making loop.The full process, including the global workspace with subjective internal models (SIMs), competing neurobiological states, re-entrant prediction, behaviour, sensing, prediction error and learning, is called the prediction machine by Bubic et al. (2010) and the beast machine by Seth and Tsakiris (2018).Sometimes, competition between neurobiological states from activated survival circuits leads to the formation of a centralized state (shown at the bottom), with attention restriction to improve the evaluation of options relevant for this state.Alternatively (shown in the middle), either no survival circuit is activated, or the arousal of activated survival circuits is too weak to establish a centralized state.In this situation, the animal can attend to many tasks, but with lower efficiency than with attention restriction.Also sometimes, the sensing of changes in neurobiological states, body and environment after a behaviour is executed can lead to the detection of substantial prediction error, which then is a learning opportunity that can lead to change in the SIMs.Particularly in social animals, sensing of what other individuals do can also lead to prediction error and learning.There is no beginning or end to this loop, so the next time step in a simulation may start anywhere.We have found it convenient to end a time step with the execution of the behaviour.
When a predator approaches, the parr brain takes in a variety of sensory data and forms a representation (Gregory, 1980) in its global workspace about what is coming.Thereafter, other representations in the brain predict what may happen according to the actions the parr takes.In many animals, the ability to model the body and the environment has reached a level where behaviour is executed on the basis of simulated predictions (Seth & Tsakiris, 2018), even before receiving sensory confirmation.Cues from the external and internal worlds are captured, communicated through the nervous system and interpreted (Parr et al., 2018) for potential cause (Seth, 2021;Seth & Tsakiris, 2018), then compared with model expectations from the 'prediction machine' (Bubic et al., 2010) in the brain.In a Bayesian framework, the cognitive challenge for the parr is to minimize sensory uncertainty (Ramstead et al., 2018).That is, prediction activates appropriate internal resources before sensing confirms that they are needed (Soylu, 2016), which increases robustness.The hormonal system also functions in a similar prediction-oriented manner, preparing the organism to what is likely to happen in the future (McEwen & Wingfield, 2003;Sterling, 2012).

Sensing reveals prediction errors
Surprises occur when predictions are wrong.With increased sophistication, the sensory system evolved a capacity for reporting prediction errors (Bubic et al., 2010).In organisms lacking prediction, sensing is directly coupled with the action (Figure 2).The capacity to predict fundamentally reverses this: Action is now modulated by the centralized state and induced by subjective internal models that the organism creates as 'controlled hallucinations' (Seth, 2021).After the action, sensing examines the model expectations, thus directing the hallucination towards reality.The linear model (Figure 2) thus becomes an iterative loop (Figure 3).Prediction contributes to learning through prediction error: The organism gains new knowledge about itself and the world when observation differs from expectation (Adams et al., 2013;Bubic et al., 2010).

3.6.2
Future planning: re-entrant simulation of expected centralized state Fish plan ahead (Schuster, 2018), and so must the digital twin.The ability to make predictions and plan are basic requirements for cognitive capacity (Corcoran et al., 2020;Seth, 2013;Soylu, 2016).Planning ability may have come about rather cheaply in animal evolution by utilizing the emotion system to simulate consequences of possible actions (Budaev et al., 2019).To do so, survival circuitry is reengaged repeatedly to simulate the predicted experience and centralized state after an action (Figure 3).This is re-entrant counterfactual information processing (Crump et al., 2020).Organisms lacking this capacity can prioritize bodily needs from competition between survival circuits.However, re-entrance allows future planning (Edelman, 1978).It is one of the most crucial computational mechanisms of sensory recognition, goal-directed decision-making, action selection (Kim et al., 2017;Tang et al., 2018;Wang, 2008) and complex cognition (Edelman et al., 2011).
The algorithm for competition between survival circuits (Budaev et al., 2018;Giske et al., 2013) contains a re-entrant simulation of the expected centralized state for each of the behavioural options available.It is further explained in Budaev et al. (2019).
Fish can survive and reproduce robustly only if they prepare for the changeable future over the long time.This is partly managed via natural selection on hormone systems that shift the fish onto a path to the next or an alternative ontogenetic stage (Table 1 and Figure 4).
The digital twin will also require such capacity.Medium-term planning can be modelled by defining centralized states and accompanying circuits that enable the digital twin to be on track to a medium-term goal, be it 'explore the surroundings' , 'join a group' , 'search for food' , 'prepare an ambush' or 'find out what that sound was' as ways to find food.This is incorporated in the GAM model of Del Giudice (2023), where some survival circuits (which he calls emotions) can potentially activate a suite of related mid-term goals, which after competition narrows into one goal for which the behavioural outcomes are tested.
The same type of three-level decision structure is also in the Adapted Heuristics and Architecture (AHA) model (Budaev et al., 2018), as illustrated with several mid-level ways of dealing with hunger and fear in Figure 5.

Stress
Being stressed is a possible state for an animal with cognitive capacities for prediction.Stress has been defined as a non-specific physiological, behavioural or cognitive state as well as the response of the organism to cope with real or anticipated challenges that may disturb its functioning (Broom & Johnson, 2019;Koolhaas et al., 2011;Peters et al., 2017;Schreck et al., 2016).The digital twin should be able to experience stress, both because it is a natural part of the life of a salmon and can be deadly (Iversen et al., 2005;Svendsen et al., 2021).Indeed, symptoms of stress in a digital twin can be used to mitigate against stress in live salmon.
The capacity for stress is an adaptive robustness mechanism (Del Giudice et al., 2018;Korte et al., 2005;Taborsky et al., 2021).But why do salmon die of it?The allostasis framework (McEwen & Wingfield, 2003;Sterling, 2012) suggests that in-advance physiological preparation for future challenges over medium or long time may be very costly.
Therefore, preparation for a future that has not occurred will waste much of the organism' resources in vain while still not solving the challenge.A key aspect is that while stress is an integral part of life in most species, repeated acute or prolonged stress is a consequence of grossly wrong prediction: It can be detrimental for health and survival (Broom & Johnson, 2019;Kristiansen et al., 2020).Most salmon today often meet situations outside of those that their evolved robustness mechanisms have evolved to deal with.The salmon prediction machinery (Figure 3) strives to anticipate the future in the many evolutionarily novel circumstances in which it finds itself, such as sorting, transporta-tion, vaccination and delousing.The evolved robustness mechanisms may consider these circumstances extraordinary -outside the pathway to future reproduction -and require costly mitigation strategy, that is high levels of stress.Here, experiments with a digital twin pre-evolved to a different environment could be used to find better solutions for live fish.
There have so far been few attempts to develop integrated computational models of stress (Del Giudice et al., 2018) , and stress has not received much attention in behavioural ecology until recently (Taborsky et al., 2021(Taborsky et al., , 2022)).This has hampered the understanding of its evolutionary history, mechanisms and adaptive value.Prediction under uncertainty has been emphasized in the Bayesian framework (Friston et al., 2017;Pezzulo et al., 2015) and applied to stress (Peters et al., 2017).Here, the overall challenge for the cognitive system of an organism living in a variable environment is to minimize uncertainty.This can occur either (a) by updating the brain's internal model of the environment to fit with the sensory data, (b) by actions that give more sensory information to update the internal models or (c) through active inference: an action that moves the organism into an environment that better agrees with its pre-existing internal models (Friston et al., 2017;Ramstead et al., 2018).Minimizing this uncertainty is costly.An organism unable to manage it properly finds itself persistently in a high uncertainty state irrespective of its own actions.
This increasingly depletes its energy, burdening the allostatic load and for it and what to do about it.Stress therefore must be understood as any other complex behavioural system.For the digital twin, it may be necessary to develop a general process-based mechanistic understanding of stress in a salmon, with control systems, feed-forward and feedback loops and related processes (Del Giudice et al., 2018), and then implement these algorithms into the forward-running digital twin model.

Unlimited associative learning
The ability to learn is well studied in fish (e.g.Bshary et al., 2002;Kelley & Magurran, 2003;Brown & Laland, 2011;Griffith & Ward, 2011;Brown, 2023).Mosquitofish (Gambusia holbrooki) can learn to distinguish between 100 and 200 objects with the same ease as between 4 and 8 (Agrillo et al., 2010).The electric fish (Gnathonemus petersii) is capable of recognizing objects with both its visual and electric senses (Schumacher et al., 2016).Population differences in learning in threespined stickleback G. aculeatus reflect the reliabilities of cues in their respective environments (Bensky & Bell, 2018).These are examples F I U R E 4 First-person perspective of decision-making in parr ontogeny and behaviour.Decision-making in the emotional system (bottom half) is embedded in ontogeny, which modifies agency through hormone systems (top half).There is continuity in the subjective internal models (SIMs) in the global workspace (blue).These SIMs are continuously challenged by activated survival circuits, either already present in memory or from prediction error from new sensory data.This leads to competition between neurobiological states where the winner defines the global organismic state (GOS) with attention, prediction and response, which again may lead to learning and updating of the appraisal phase of survival circuits via prediction error.The alternative, with no clearly defined GOS (middle of Figure 3), is not shown here.
UAL involves flexibility, combining the repertoire of stimuli and actions, and reflectivity, which is an organism's ability to continue learning based on previous learning outcomes (Ginsburg & Jablonka, 2019).
Fish brains have much higher rates of cell proliferation and neurogenesis during adulthood than most land vertebrates (Zupanc, 2006), and all parts of the fish brain continue to develop through life.Hence, expe-riences (or lack thereof) and learning may be particularly important for behavioural plasticity in fish (Ebbesson & Braithwaite, 2012;Dunlap, 2016) and change brain anatomy, survival circuits and behaviour (Kihslinger et al., 2006;Salvanes et al., 2013;Mes et al., 2019;Näslund et al., 2019).Thus, current and future decisions will depend on past experiences (Jonsson & Jonsson, 2014).
Social learning -learning from the experience of others -is also important in fish (Brown & Laland, 2011;Brown, 2023; Wilson & Giske,  (Budaev et al., 2018).Here, the simulated fish has two competing survival circuits (growth and survival), with sensing, subjective internal models, broadcast, competing neurobiological states, a centralized state (GOS: hunger or fear), attention restriction, re-entrance, and the resulting behaviour.'Up' and 'Down' are vertical swimming directions, 'Walk' is horizontal random walk, 'Dart' is fast evasion, 'Shoal' is to join a group, 'Freeze' means no movement and 'Eat' means to eat a prey item.The figure covers a period of 40 s, during which the fish encounters two prey items and one predator.Fear remains high a while after the predator encounter.
The updating of memory in models of behaviour is usually done with a linear operator (McNamara & Houston, 1987;Mangel, 1990), where the current estimate of an unknown parameter can be modified by giving a fixed weight α to the most recent observation while the current estimate is weighted 1-α.In the learning algorithm of Eliassen et al. (2007), α was coded as an evolvable gene.When considering sensing as potential detection of prediction errors, one could consider a nonlinear operator in which α is small when an observation is within a genetically defined range around the current estimate but large (giving high weight) to experiences that have high prediction errors.
For a predictive agent, it is not sufficient to update the model of the world.It is also important to update the expected consequences of actions.This will at least be to associate the combination of the arousal in the previous centralized state, the chosen action, the arousal in the reward and the prediction error.

Decision-making and behaviour
We can now return to the question of building agency into the digital twin.From the researcher's objective third-person perspective, the common currency for assessing decisions (McFarland & Sibly, 1975;McCleery, 1978) is their contribution to the organism's future reproductive value (Williams, 1966;Houston et al., 2023).From the subjective first-person perspective of the organism, the common currency is provided by the competition and information exchange (Godfrey-Smith, 2017) between the evolved survival circuits (Cabanac, 1992;McNamara & Houston, 2009;Mendl & Paul, 2020) in the global workspace.They can be used to predict, compare, prioritize, and even plan ad hoc (Figure 3).However, the survival circuits do not directly consider the ultimate perspective of grandchildren, which is mediated post hoc through natural selection over many generations in the GA (Giske et al., 2013).Thus, one can construct a population of digital twins where behaviour is executed from proximate competition between survival circuits influenced by hormones (Figure 4), whereas the underlying genetic structure is evolved by natural selection on the classical offspring and grandchildren criterion (Giske et al., 2013(Giske et al., , 2014)).

Model output
Digital twins shall be constructed to be general rather than targeted to a specific research question and may thus serve a wide range of purposes (Tao et al., 2019) For the latter cases, we describe in the Supplementary file S1 how the digital twin can deliver population growth and survival rates.

Algorithms for robustness in agency
An important feature of a valuable digital salmon twin would be its ability to display credible behaviour in situations the modellers did not have in mind in its construction.Case-specific models predominate in ecology (Grimm, 1999;Getz et al., 2018), and one should not be surprised that models can reproduce the case they were built for.
A digital twin must implement a more generalizable algorithm for the fish, where credible behaviour in a range of situations can be generated from agency and robustness mechanisms.This is not impossible because mathematical elegance and computational simplicity are not required.Arriving at credible behaviour can now be explored in two different ways, by deep-learning neural networks with a myriad of tuned parameters with no known biological interpretation, where we may never understand why a digital twin behaved as it did, or, as we here have advocated: by mechanisms that resemble how natural fish produce behaviour.We quote the title of the Coveney et al. (2016) paper: 'Big data need big theory too' .The modeller may need parameters which have never been measured or studied, but they could be inferred from theoretical considerations or intuition and analysed using the uncertainty and sensitivity analysis methods (Saltelli et al., 2004;Kleijnen, 2005;Grimm & Berger, 2016).
The robustness of a fish is taken care of by the many bodily mechanisms that constrain it to remain on a path to future reproduction, and all these mechanisms must ultimately be understood as robustness instruments for Darwinian agency (Kitano, 2004;Fernandez-Leon, 2011a, 2011b).Considering the brain as a prediction machine (Bubic et al., 2010;Seth & Friston, 2016;Seth & Tsakiris, 2018) connects the many aspects of robustness discussed in this paper into a unified supporting system for the organismic agency in teleosts.
Engineering a digital fish based on the available biological causal mechanisms helps both better understand the Atlantic salmon and build the applied computational tool.Brains have evolved to prepare the body for future challenges (Sterling, 2012;Barrett, 2017;Seth, 2021), which again explains the roles of sensing, survival circuits, stress, memory, learning and hormonal cascades in ontogeny.Building the behavioural algorithms of the digital twin on agency and robustness thus opens a focus on interconnected bodily phenomena and thus promises considerable advance in aquacultural science and practice.
Other aspects of a digital twin, such as salmon growth, the heart functioning, or diseases and the immune system, can be seen as quite separate problems from modelling behaviour, yet they are deeply connected through the perspective of the robustness of an evolved agent.

Algorithms for ontogeny and behaviour
To be successful, a salmon digital twin driven by evolved agency and robustness systems should reproduce salmon behaviour and both the well-known life history patterns and the new life histories seen in intensive aquaculture.The digital twin must also account for the hormonal dynamics that underlie the competition between alternative ontogenetic stages (Figures 1 and 5).Evolutionary adaptation probably utilized only a few environmental and physiological cues for decision-making (Table 1).These cues were likely cheaply reused by modularity and degeneracy due to seasonality and other environmental predictability.For example, day length and the direction of its change reliably predict the season, whereas changes in temperature and water flow may fine-tune decisions to the current year.Finally, the sensation of saltiness confirms that the estuary has been reached.Certain cues vanished in intensive aquaculture, whereas others, including body physiology, appeared in different combinations or contexts than in the natural environment.This confuses the salmon and should also similarly confuse the digital twin.
The biological mechanisms that kept previous salmon generations on paths to future reproduction may not work in intensive aquaculture.Certain challenges in intensive aquaculture stem from sensory data combinations that confuse the salmon and lead them to conflicting life history decisions (Duncan et al., 1999;Martinez et al., 2023).In these new situations, evolved robustness mechanisms (Kitano, 2004;Fernandez-Leon, 2011a, 2011b) may fail to keep the animal inside the evolved window of states and stages that lead to successful reproduction.Managers of both aquacultural and natural situations will benefit from acknowledging how these mechanisms minimize uncertainty in the sensory environments (Friston et al., 2010) to facilitate the desired survival, development and growth.To our knowledge, the AHA model (Giske et al., 2013;Andersen et al., 2016;Eliassen et al., 2016;Budaev et al., 2018Budaev et al., , 2019) ) is the only simulation framework that is built specifically for resolving the motivation architecture for behaviour in a model of a population of developing animals in an ecological scenario.In this, it is distinct to the alternative implementations, for example, based on CLARION or GAM, which were focused on humans specifically, and are not implemented with ecology and evolutionary theory, and therefore may not present the same opportunities to fine-tune computational models to particular species.Only by implementing the model as a computer programme can we reduce the degrees of freedom in the structures we expect in nature and thereby generate a model that is both inferential and predictive.
AHA can implement digital twins with multiple survival circuits with competing neurobiological states, subjective internal models, global broadcast and centralized state, attention restriction, re-entrance and prediction error (Figures 3 and 5).Alternative implementations, for example, based on CLARION or GAM, are also possible.Such evolutionary simulation models of sensing, emotion, cognition and behaviour, combined with agentic models of hormonal dynamics (e.g.Weidner et al., 2020;Jensen et al., 2021), can provide a starting point for a population of agentic, robust and experience-based digital twins in a natural or artificial environment and make predictions about expected responses of survival circuits that are adapted or not adapted to the environment in which they find themselves.
Early in this paper, we claimed that another approach than optimization was necessary for modelling the digital twin.The strength of ultimate perspectives, such as state-dependent life history theory (Houston & McNamara, 1999;Clark & Mangel, 2000), is to reveal the optimal solution.As the optimization approach in evolutionary ecology stems from rational choice theory, some authors indicated that optimization models explain not only what animals would do but even what they should do (see, e.g.Okasha, 2017).This is, however, a misunderstanding, as the optimization approach in evolutionary ecology is a mathematical simplification of the consequence of natural selection, which is not a goal-seeking rational process.In this paper, we have described some of the mechanisms fish use to make decisions; thus, we have revealed some aspects of the 'phenotypic gambit' (Grafen, 1984;Fawcett et al., 2013) that optimization models for simplicity ignore.We then see that what may be described as rational choice in simpler models becomes emotional choice in living fish, impacted by prediction errors and learning.Such, (Lotka, 1925), after deriving the Euler-Lotka equation, hinted at these proximate mechanisms: 'What guides a human being, for example in the selection of his activities, are his tastes, his desires, his pleasures and pains, actual or prospective' (p.352).Similarly, when Emlen (1966) introduced the optimal foraging theory, he made it clear that 'the physical and nervous limitations of a species' (p.611) were not considered in the model.Evolutionary simulations driven from the proximate first-person perspective (Budaev et al., 2019) will thus help us understand how and why modelled organisms deviate from the ontogenetic solution the aquacultural managers want them to find.Further, it is possible to find adaptive solutions to the orchestration of the many internal mechanisms with a GA.As with natural populations, the evolving digital twin will also capture frequency-dependent selection and individual state variation (Giske et al., 2013), and the individual agents will make both small and severe errors.Once artificial evolution has arrived at a quasi-stable genetic diversity in the environment of the evolutionary adaptation (Giske et al., 2014), it can be used to model the salmon in nature and in aquaculture.

CONCLUSIONS
We have outlined a mid-level modelling framework for salmon and other teleosts, with relevance for other kinds of animals.To build the behaviour of a digital twin on emotion is even called for as the first step for building empathic robots (Christov-Moore et al., 2023).The optimization approach pioneered by Lotka (1925) does not consider the bodily mechanisms that may prevent an animal from making optimal choices.Neither does it describe what an animal can be expected to do in novel situations and when correlation to Darwinian fitness is lacking.Here we have focused on decision-making, which is closely linked to both production characteristics relevant to aquaculture and to fitness.The building blocks and units of the algorithms -sensing, endocrinology, physiology, emotions, motivation, learning and memory -are where we have good intuition (Hebb, 1946) and experimental data.A more detailed level implementing processes in and among brain cells is not yet available.However, when the need for a deeper level appears, an appropriate implementation can be integrated as submodels using the object-oriented methodology.

AUTHOR CONTRIBUTIONS
Salmo salar now live in captivity (Food and Agriculture Organization [FAO], 2023), where living conditions have changed profoundly over only 20 generations.Atlantic salmon evolved model system: a digital aquaculture laboratory with ability to perform efficient simulation experiments to guide decision-making.The industry is in transition to semi-closed and recirculating systems and to ever larger facilities.It cannot afford wasteful and risky large-scale experi-1 Information technology 2 Internet of things 26938847, 2024, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/aff2.153 by UNIVERSITY OF BERGEN, Wiley Online Library on [21/02/2024].See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions)on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License 26938847, 2024, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/aff2.153 by UNIVERSITY OF BERGEN, Wiley Online Library on [21/02/2024].See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions)on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License 26938847, 2024, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/aff2.153 by UNIVERSITY OF BERGEN, Wiley Online Library on [21/02/2024].See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions)on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License aim to enter into private phenomenal experiences of the other species.
Photoperiod, temperature Body mass Skilbrei (1991), Baker et al. (2000), Bromage et al. (2001), Schulz et al. (2010), Taranger et al. (2010), Zohar et al. (2010), Good and Davidson (2016), Martinez et al. (2023) 26938847, 2024, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/aff2.153 by UNIVERSITY OF BERGEN, Wiley Online Library on [21/02/2024].See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions)on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License 26938847, 2024, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/aff2.153 by UNIVERSITY OF BERGEN, Wiley Online Library on [21/02/2024].See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions)on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License 26938847, 2024, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/aff2.153 by UNIVERSITY OF BERGEN, Wiley Online Library on [21/02/2024].See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions)on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License brings about systemic pathology(Peters et al., 2017)  .One way to avoid serious detrimental consequences is then to habituate to the adverse environment by altering the goal state of the cognitive system(Peters   et al., 2017)  .Budaev et al. (2020) described a computational framework for stress based on these considerations.Here, subjective experience and decision-making (Figure3) are keys to stress, uncertainty and prediction, as they involve what to expect about the future, how to prepare 26938847, 2024, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/aff2.153 by UNIVERSITY OF BERGEN, Wiley Online Library on [21/02/2024].See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions)on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License F I G U R E 5 A report from the inside.A short piece of a simulation of a fish in the open pelagic.The simulation is built on the Adapted Heuristics and Architecture (AHA) model 26938847, 2024, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/aff2.153 by UNIVERSITY OF BERGEN, Wiley Online Library on [21/02/2024].See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions)on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License of degeneracy in the behavioural architecture (Giske et al., 2014) and of sexual reproduction.Inherited differences will in turn lead to different subjective experiences of individuals who are sensitive to different kinds of information, have experienced different locations and may have different episodes of social learning(Cote et al., 2010).Individuality can be implemented in the digital twin model of salmon by a range of ways, from genetic variation, hormonal differences to longterm differences in the previous experience and interactions with the environment.

Table 1
(Fraser et al., 2019;nter anorexia(Fraser et al., 2019; Metcalfe & . A digital salmon constructed as described above can be used in what-if simulations of operations, such as stress during transportation or delousing, appetite and ingestion in feeding experiments or salmon stress and behaviour in different aquaculture environments.It can also be used in long-term experiments of growth and survival in a planned regime in a facility and for simulations of growth and survival of wild salmon in rivers, estuaries and the ocean.