Log in

No account? Create an account

Previous Entry

Progress in the predator prey simulation

Since yesterday a lot things improved.

In this example I killed all but one rabbit after 1200 rounds and all but one wolve after 7700 (of 10000) rounds:

Free Image Hosting at www.ImageShack.us

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!



( 9 comments — Leave a comment )
Jul. 3rd, 2009 08:47 pm (UTC)
1 rabbit ?
I'm not really good in biology, but I don't think that one rabbit (or one wolf) could survive and multiply by itself...
Jul. 4th, 2009 08:26 am (UTC)
Re: 1 rabbit ?
Well, yes. But the formulas are ok with 1 rabbit ;-) They would even work with 0.5 rabbits!
A model never gets all aspects of reality.
Jul. 5th, 2009 12:01 pm (UTC)
Re: 1 rabbit ?
Can it plot rabbits on x, wolfs on y ? Then you get a spiral. Easier to see :-)
Jul. 5th, 2009 07:56 pm (UTC)
Re: 1 rabbit ?
Yes, but I have not yet commited that patch. Look again next week.
Jul. 3rd, 2009 09:11 pm (UTC)
Check out the uic Module in PyQt
Was just browsing your code and noticed the build.py. For smaller projects
like this I always use the uic Module of PyQt to directly compile the .ui files on the fly:


So much nicer to be able to see any changes you make in designer without manually compiling the .ui files.
Jul. 3rd, 2009 11:52 pm (UTC)
How does a population build from a single rabbit of wolf? Does it not take two to tango?

Nice effort, hope you can continue building on this.
Jul. 4th, 2009 08:27 am (UTC)
See first comment.

And yes, I will use it in my school and build in the feedback I am getting.

Furthermore, I hope other teachers will use it as well (and give feedback).
Jan. 26th, 2010 09:03 pm (UTC)
I think you have a problem
Hey, I found this interesting, but shouldnt the blue line represent the prey population? as far as I was aware you usually had a herd of prey and a few select predators, not loads of predators hunting a few prey.

Looking at lines 105 & 106 of predatorpreycalculator.py the code seems to be the wrong way round (i.e. appending prey population counts to the predator list and predator population counts to the prey list)
Jan. 27th, 2010 09:46 pm (UTC)
Another Simulator
Hi, just thought I'd let you know I've taken inspiration from your predator prey simulator and written my own (in Python, PyQt4 and Matplotlib).

It features the ability to run a certain amount of iterations, change all the settings then run more iterations, all plotted on one graph.

You can get it at http://code.google.com/p/lotka-volterra-simulator/downloads/
( 9 comments — Leave a comment )