Lamarckian Evolution in One Cell, If It's Fast Enough
Last I checked, which was Google, there wasn't much on the subject. The second-to-last I checked, which was 9th-grade biology, Lamarckian evolution was something giraffes might have gone through as they stretched their necks to browse the highest leaves in the tree. Certainly the distention, if any, is not passed on to their offspring: too many specialized mutations needed, in concert, caused directly by the stretching, and as if that weren't too much to ask, this all has to happen RIGHT NOW. But in a monocellular organism, maybe a more esoteric stress can mutate just one pivotal gene, and just in time. Picture the following:
What I say is: this is an interesting problem in kinetics. Darwinian evolution presumes that the mutant got that way well before, or maybe just minutes before, selection pressure was brought to bear. If the selection pressure had never come to town, we might never know about the mutation, which might itself be superseded by another. Lamarckian evolution, I think, requires that the mutation happen only when it's almost too late and that it be immediately advantageous to the mutant. If it isn't, the mutant dies and we're stuck with a bunch of short giraffes.
Thus the following, which I've set up as a brute-force loop-'til-you-droop computational routine, rather than do the decent thing and just solve partial differential equations. I've made a heap of simplifying assumptions, some of which are described below and the rest of which can be glowered at by viewing the source code. Be such assumptions as they be, you set these variables (or reset them - since there are so many and it is not at all obvious to a non-PDE-solver what the most teasing combinations are, I've hardcoded some nontrivial ones):