Artificial life in MATLAB?

By alexmbcm

While I was using Simulink (a program that comes with MATLAB) to make a model of a two-wheeled robot (using this equations) I was wondering as I always do: can this be used for making artificial life? After looking for a while on the internet I didn’t anything usefull. Besides EcoLab is supposed to do the same: solve differential equations. And it is made especially for artificial life. But nothing beats “drawing” the differential equations and getting an answer. So I used Simulink to simulate the Predator-Prey equations; otherwise known as the Lotka-Volterra equations. It’s not open-ended alife but it’s the closest I could get to it in an hour in Simulink.

Here is the model:

lotka_volterra3.jpg

The initial condition for Integrator is 15 and for Integrator1 it’s 16. Suprisingly you get a similar solution if you use 15 for both initial conditions; in theory both “species” should remain at 15 but because of rounding error the solutions diverge. For the simulation parameters I used a start time of 0, an end time of 10, a fixed step size of 0.001 and the solver “ode5(Dormand-Prince)”.

Here is the solution from the scope:

lotka_volterra1.jpg

Here is the output from the XY Graph component that graphs what its name says:

lotka_volterra2.jpg

Leave a Reply

You must be logged in to post a comment.