Using the NEAT package (described at http://bit.ly/2CoCaFO ) the behaviour of a group of pigs is defined. NEAT (NeuroEvolution of Augmenting Topologies) is a neuroevolutionary technique that allows to find a topology and a set of weights for an Artificial Neural Network using genetic algorithms.
The pigs' simple goal is to avoid falling in canyons and to find a zone with trees where they can spend their lives eating fruits. Due to the simplicity of the task, the Artificial Neural Networks need just a few generations to get trained.
Once obtained the behaviour we desire we can just extract the neural network of the individuals and apply it to the entire population.
Modeling the behaviour of a group of individual is just a silly example of what the NEAT can do.
The NEAT is particulary good in this task: it can adapt the NNs of the pigs to the environment changes, granting a constant evolution and learning of the pigs.