This "toy model" uses a simple but robust and nonlinear way of modeling real-world population growth (and collapse). Given a population p (for mathematical purposes between 0 and 1) and a "biotic potential" r, the population in the next generation will be pnext = rp(1-p) (unless p<0, in which case we simply set p to 0). In a real-world sense, population will grow proportionally from one generation to the next but is eventually checked by dwindling food supply. (We're ignoring things like predators and disease — that's why we call it a "toy model.")
For many values of r, the population will gradually reach an equilibrium or steady state. For some it crashes. For others, it will oscillate between 2 (or more) values; and bizarrely, for some values of r, population never stabilizes at all, but jumps around quite wildly! This behavior is not just a mathematical artifact of our model but echoes what sometimes happens in real-world ecosystems.
Experiment with this phenomenon by trying different starting populations and biotic potentials. To get started, use p0=0.2. 100 generations is a good run to start with, but when you find a system that won't stabilize, you will want to extend the run to see what happens over time.