If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

A Predator-Prey Simulation

Let there be two fishes named Kernighans and Ritchies. The only fish know to prey on Ritchies and to be able to digest them is the colour-blind Kernighan. The Kernighan has adapted to a diet of Ritchies, and won't prey on any other species. No other fish or sea animal could prey on the Ritchies.

So with he above information, could a simulation be created to calculate the two population at different time intervals. I have done something but i belive that i could be on the wrong track.

Some other information to follow would be:

The population of Kernighans and Ritchies can be fully determined by the population size of Kernighans and Ritchies. Suppose that in a given month the number of Kernighan is pop_k, and the population of Ritchies is pop_r. The population of Kernighans and Ritchies is measured in multiples of 1000. This means a population size of 1.0 corresponds to 1000 fish. For the number of Kernighans in the next month we have:

 The population pop_k decreases by alpha_k  pop_k. This is the number of Kernighans that would starve if there were no Ritchies to eat.
The population pop_k increases by beta_k  pop_k  pop_r. This is the number of new Kernighans because they can feed on Ritchies.
The population pop_k decreases by gamma_k  pop_k2. This decrease in the number of Kernighans is due to competition between Kernighans.

Hence, given a population pop_k, the population in the next month is
pop_k - alpha_k  pop_k + beta_k  pop_k  pop_r - gamma_k.pop_k2
If the result of this computation is smaller than 0.001, then there are no Kernighan fish left

For the number of Ritchies in the next month we have

The population pop_r increases by alpha_r  pop_r. This is the number of new Ritchies, if there were no Kernighan to eat them..
 The population pop_r decreases by beta_r  pop_k  pop_r. This is the number of Ritcchies eaten by Kernighans.
 The population pop_r decreases by gamma_r  pop_r2. This decrease in the number of Ritcchies tis due to competition between Ritchies.

Hence, given a population pop_r the population in the next month is

 pop_r + alpha_r.pop_r - beta_r.pop_k.pop_r - gamma_r.pop_r 2
 If the result of this computation is smaller than 0.001, then there are no Ritchie fish left.

Re: A Predator-Prey Simulation

Actually, this is a math problem. This is't a simulation all the information is static so for a given input there will be a given output.

A simulation would be about having to deal with things like... even if there are enough fish to eat, does a particular predator manage to catch enough of those prey fish to stay alive. Maybe it can't because none of the prey are nearby enough, or maybe it's not fast enough. in other words, some random effect.

Re: A Predator-Prey Simulation

Originally Posted by OReubens

Actually, this is a math problem. This is't a simulation all the information is static so for a given input there will be a given output.

In fact predator-prey simulation is one of the cornerstones of mathematical biology. It gives rise to a system of two differential equations and to study how models like this evolve over time is called a dynamic simulation.

I suggest the OP uses the Lotka-Volterra equations and tries to identify the parameters with the ones of his problem,

Re: A Predator-Prey Simulation

a program that asks the user for the current population of Kernighans and Ritchies, and to compute the population size for the next month. It should take the following into account.
 Use the above formulas to compute the population size for the next month.
 If the computed population size is smaller than 0.001, the result should be 0.

Re: A Predator-Prey Simulation

Originally Posted by rockx

a program that asks the user for the current population of Kernighans and Ritchies, and to compute the population size for the next month. It should take the following into account.
• Use the above formulas to compute the population size for the next month.
• If the computed population size is smaller than 0.001, the result should be 0.

Re: A Predator-Prey Simulation

Originally Posted by nuzzle

In fact predator-prey simulation is one of the cornerstones of mathematical biology. It gives rise to a system of two differential equations and to study how models like this evolve over time is called a dynamic simulation.

I suggest the OP uses the Lotka-Volterra equations and tries to identify the parameters with the ones of his problem,

picking nits... it's not a simulation
if you run the math for a different range of times, It's a mathematical progression.

I doubt this is called a "dynamic simulation" because 1) it's not a simulation and 2) it's not dynamic, the input is entirely static, so the output is as well.

If I'd have to guess, I guess you're fumbling up some of the words here and it should really have been something more akin to:
...and to study how models like this evolve over time is called the dynamics of a (biological) system
dynamics != dynamic
even a static mathimatical progression has evolution dynamics

system != simulation.

I've seen the term "simulation" used incorrectly many times, even by big names, but essentially, if you can do the math in a spreadsheet (like you can here), it's a system, not a simulation.

Simulations are really about systems that are so dynamic that they branch off into 2 or more different possible states every so often, so much so that it is impossible to track EVERY state, so you end up randomly picking one of the states and go with that. You run the sim several times with different branches taken, and then try to infer your solutions/results based out of a small set of possible outcomes.

You could do the above predator/prey with an actual similation having, "playing out the lives of individual predators and prey". But the OP's quesion is really about a static system where you take statistical input about how the populations as a whole behave rather than individuals.

Re: A Predator-Prey Simulation

picking nits... it's not a simulation
if you run the math for a different range of times, It's a mathematical progression.

I doubt this is called a "dynamic simulation" because 1) it's not a simulation and 2) it's not dynamic, the input is entirely static, so the output is as well.

You're wrong.

To model a system (any system, not just biological) using a set of differential (or difference) equations and then follow how it evolves and behaves over time on a computer is called a dynamic simulation. It's an established term.

Simulations are really about systems that are so dynamic that they branch off into 2 or more different possible states every so often, so much so that it is impossible to track EVERY state

This is also wrong.

Dynamic simply means "varying over time" and the opposite is static. The dynamics may vary. It could be simple, complex and even chaotic but a dynamic system is a dynamic system and there is no such thing as more or less dynamic.

You seem to be confusing simulation with the concept of a statistical ensemble which is a theory to describe the overall behaviour of a system from its micro-states. To deal with it on a computer two simulation approaches are commonly used, dynamic simulation and (Markov Chain) Monte Carlo simulation. They're different but equivalent.

Re: A Predator-Prey Simulation

I've seen the term "simulation" used incorrectly many times, even by big names, but essentially, if you can do the math in a spreadsheet (like you can here), it's a system, not a simulation.

I must comment on this because it looks like the worst besserwisser approach I've seen in a long time.

So you've come up with your own oddball definition of what constitutes a simulation. And since you're the centre of the world yours is now the correct definition of simulation. And from this follows that everybody else must be wrong! All off a sudden everybody who are sticking to the standard or orthodox or established or timetested definition of simulation, are wrong!

Before we continue this discussion I would like you to present some support of your view of what is a simulation. Is it something you've cooked up or do you have references in support of it?