If this mutation increases inclusive fitness, it will tend to proliferate in the population. However, phenotypic plasticity is typically costly for an individual. For example, learning requires energy and time, and it sometimes involves dangerous mistakes. On the surface, this looks the same as Lamarckian evolution, but there is no direct alteration of the genotype, based on the experience of the phenotype. The Baldwin effect may arise in evolutionary computation when a genetic algorithm is used to evolve a population of individuals that also employ a local search algorithm.
Local search is the computational analog of phenotypic plasticity in biological evolution.
In computational terms, in the first step of the Baldwin effect, local search smooths the fitness landscape, which can facilitate evolutionary search. In the second step, as more optimal genotypes arise in the population, there is selective pressure for reduction in local search, driven by the intrinsic costs associated with the search. The cost of local search may be expressed in various ways. This assumes, of course, that the instinctual trait more reliably increases individual fitness than learned behaviors and that the environment favoring a particular behavior is stable. In a rapidly changing environment, learning can have obvious advantages over instinctual responses.