Red Lynx Simulator

Posted 31 July 2010 by

A new version of my Red Lynx simulator has been installed on PT in the "Sims" section. Check it out and give me some feedback.

24 Comments

SWT · 31 July 2010

It doesn't work for me under Firefox 3.6.8/Windows XP Pro. (The original simulation to which you linked runs just fine for me with this configuration.)

Reed A. Cartwright · 31 July 2010

Try doing a full refresh, Ctrl+Shift+R.

Mike Elzinga · 31 July 2010

Wow; that is fast.

Reed; for the non-specialists posting here, could you please provide a list of definitions for those terms used as parameters in the simulation? I think that may help the non-expert better understand just what is being adjusted and how these contribute to the results.

Thanks.

Reed A. Cartwright · 31 July 2010

There is a little help button, that will pop up some descriptions about the parameters.

Wheels · 31 July 2010

Works fine for me in FF 3.6.8/Win7 32bit.

Mike Elzinga · 31 July 2010

Reed A. Cartwright said: There is a little help button, that will pop up some descriptions about the parameters.
Ah; thank you. I missed that.

Joe Felsenstein · 31 July 2010

Things work (yes, you need some explanation of what the selection coefficient and the dominance parameter mean). The one problem I saw was that sometimes when you click repeatedly on Run Simulation, the new curve is added but all, or most, of the previous curves disappear.

Mike Elzinga · 31 July 2010

Joe Felsenstein said: Things work (yes, you need some explanation of what the selection coefficient and the dominance parameter mean). The one problem I saw was that sometimes when you click repeatedly on Run Simulation, the new curve is added but all, or most, of the previous curves disappear.
I noticed that also, but concluded that it was because I had increased the number of generations and did not erase the previous run.

Reed A. Cartwright · 31 July 2010

Joe Felsenstein said: Things work (yes, you need some explanation of what the selection coefficient and the dominance parameter mean). The one problem I saw was that sometimes when you click repeatedly on Run Simulation, the new curve is added but all, or most, of the previous curves disappear.
Every 12 runs the screen clears.

SWT · 31 July 2010

Reed A. Cartwright said: Try doing a full refresh, Ctrl+Shift+R.
Problem solved, thanks.

Reed A. Cartwright · 31 July 2010

I've made some cosmetic changes. I've moved the help button around. Hopefully, it is easier to spot. I've also added the equations in the help for how the fitnesses are calculated.

Joe Felsenstein · 31 July 2010

I really suggest the fitnesses be 1 + 2s : 1 + (1+h)s : 1 so that the exponential exp(s) does not scare people -- anyway this is a discrete-generations model, not a continuous-time model. Another (closely similar) possibility that might leave people able to see what "h" means would be 1+s : 1+hs : 1-s.

BTW in the Help it says "domiant" at one point.

People wanting to compare with another program might look at my program PopG which is generally similar but is downloadable executables (not a Java program that runs in your browser). It is at
its web site here.

Reed A. Cartwright · 31 July 2010

I decided to use an exponential configuration because I think the parameters are easier to understand, even if the math is more complicated.

What I mean by this is that for an exponential, 's' can of from -infinity to +infinity. There is now lower or upper limit. The same idea applies to the dominance parameter. Also -s and +s produce the same results.

In other words, there is a trade off. On one hand, you have a model that has simpler algebra, but more complicated requirements on the parameters. On the other hand, you can make the algebra more complicated, but simplify the parameters. Since the focus of this app is exploring the parameter space, I opted for the second one.

Of course, at low values of 's', both models are approximately equal, so it is possible to teach without doing the exponentials.

Reed A. Cartwright · 1 August 2010

Joe,

After considering your comments a bit more I decided to change the help documentation to show the approximate values of the fitnesses. I also decided to go the 2*s instead of s as well.

Jeff Webber · 1 August 2010

I think I'm missing something. On the dominance scale if -1 is recessive and 1 is dominant why does the slider go from -2 to 2?

Joe Felsenstein · 1 August 2010

Reed A. Cartwright said:
Joe Felsenstein said: The one problem I saw was that sometimes when you click repeatedly on Run Simulation, the new curve is added but all, or most, of the previous curves disappear.
Every 12 runs the screen clears.
It would be less mystifying if, when you clear the screen, the counter that controls this resets to zero, so that only after 12 curves are on the screen are any erased.

Reed A. Cartwright · 1 August 2010

Jeff Webber said: I think I'm missing something. On the dominance scale if -1 is recessive and 1 is dominant why does the slider go from -2 to 2?
d > 1 is overdominance. This is where the heterozygote has a higher fitness than either homozygote. d < -1 is underdominance. This is where the het has a lower fitness than either homozygote. Note is s < 0, these two regions swap.

Reed A. Cartwright · 1 August 2010

Joe Felsenstein said: It would be less mystifying if, when you clear the screen, the counter that controls this resets to zero, so that only after 12 curves are on the screen are any erased.
I don't follow. Are you suggesting that instead of removing all curves, I just replace the oldest with the most recent?

Joe Felsenstein · 2 August 2010

Reed A. Cartwright said:
Joe Felsenstein said: It would be less mystifying if, when you clear the screen, the counter that controls this resets to zero, so that only after 12 curves are on the screen are any erased.
I don't follow. Are you suggesting that instead of removing all curves, I just replace the oldest with the most recent?
No, I am suggesting that once the screen is cleared of all curves (when one clicks the button to do that), the count up to 12 should start again. Only after 12 curves have been added should the screen then toss the previous curves and have just the most recent curve showing. Right now, I add curves, and maybe once and a while clear the curves off (I typically do it when I change parameter values). But as new curves are added, the program drops back to one curve showing at what seem like random times. Actually, I am informed, it is not random, it is when we reach 12 curves since the start or 12 curves since the last time it did that. But mostly I tend to be focused on the most recent parameter settings and forget how long it has been since the last auto-cleanup. So it feels startling and random. I suggest that this startling behavior will be eliminated if, when I push the clearing button, the count up to 12 starts again. Then for each parameter set I will have the ability to add 12 curves before it does its own auto-cleanup. In my own program PopG, we clear the screen every time we set new parameter values or start again (but we also have multiple curves on the screen in each run -- you can set the number of them). However your program is superior in using colors to distinguish them.

Reed A. Cartwright · 2 August 2010

I like the ability to plot runs with different parameter values along side one another. So I don't want to change the clearing behavior to be tied to changes in the parameters. However, what I can do is just eliminate the auto-clear behavior completely, and people can just click the clear button when they want to clear the graph.

midwifetoad · 2 August 2010

Is this thing supposed to run with Internet Explorer?

Reed A. Cartwright · 2 August 2010

midwifetoad said: Is this thing supposed to run with Internet Explorer?
It's supposed to run in recent versions, although I haven't checked in a while.

Parse · 3 August 2010

It looks great!
The only thing I would suggest is having some sort of labels for the curves, or some way to go back from a previously graphed curve to the parameters that generated it. Otherwise, unless you've manually recorded which settings go with each color, that data is lost.

Dean Morrison · 9 August 2010

Thanks for this! - it's fun and a great way to test your intuition... :)