The geographical distribution and production of the Barents Sea capeli
n (Mallotus villosus, Osmeridae) is modelled by the use of a state-var
iable optimization technique (dynamic programming), where the main obj
ective of individuals always is re, maximize fitness, or total expecte
d reproduction (R(o)), by selecting the most profitable habitats throu
gh time. Fitness is gained by successful reproduction (a function of s
ize) during the spawning season on the breeding grounds off northern N
orway. The environment (predators, temperature and zooplankton prey) i
s determined by a meteorologically forced circulation model for the ye
ar 1980, creating a spatial and seasonal fluctuation in the environmen
t. Predation from cod is the main source of mortality, and the distrib
ution of the cod (Gadus morhua) stock is assumed to vary with temperat
ure. Growth is predicted from a bioenergetic model, incorporating the
cost of swimming between feeding areas and spawning grounds. Field dat
a of the capelin stock recorded during autumn cruises from 1979 is imp
lemented at the start of the model, and then this stock is modelled th
rough 1980 and the first months of 1981. Model predictions are compare
d with the observed distribution of capelin in autumn 1980. Habitat se
lection has consequences for the dynamics of the population and growth
of individuals, demonstrating the importance of combining external (e
nvironmental) and internal (evolutionary) forcing to understand and pr
edict the dynamics of fish populations. This study is the first applic
ation of dynamic programming to model the dynamics and ecology of hori
zontal fish migration, and we suggest that the method may be developed
into a useful tool for the management of short-lived species.