We propose a game-theoretic dynamics of a population of replicating individuals.
It consists of two parts: the standard replicator one and a migration between
two different habitats. We consider symmetric two-player games
with two evolutionarily stable strategies: the efficient one
in which the population is in a state with a maximal payoff
and the risk-dominant one where players are averse to risk.
We show that for a large range of parameters of our dynamics,
even if the initial conditions in both habitats are in the basin
of attraction of the risk-dominant equilibrium (with respect
to the standard replication dynamics without migration),
in the long run most individuals play the efficient strategy.