Goal: Simulate predation mechanisms at the scorpion scale (a "neural" model)
Required Concepts: classes, constructors/destructors, operator overloading, inheritance, polymorphism
Required Files: partie4.zip
Estimated Coding Duration: 2 supervised lab weeks (from Tuesday of week 10 inclusive, to Tuesday of week 12 exclusive, according to the course schedule)
The provided archive for this step includes a new version of CMakeLists.txt to compile the materials for this part. It also includes:
You will work for this step in the directory ~/Desktop/myfiles/Programmation/cpp/projet/partie4/.
We now want to simulate the scorpion’s predation mechanisms as described in the project brief.
This simulation is largely inspired by the work described in the project description [5][6][7], but we will adopt the following simplifications:
As stated in the project description, population-level and individual-level simulations of predation will not be integrated. To test the neural model independently of population-scale simulation, we will create a special subclass of scorpion — the neuron scorpions — and lizards — the wave-emitting lizards. These subclasses will simulate only the predation and neural model aspects (not including behavior related to reproduction, death, or fleeing).
The provided simulation cores will allow switching between simulation modes.
This part will also require modeling the scorpion’s sensors and the waves emitted by the lizards.
To summarize, here’s the main architecture you should aim for by the end of this step:

Let's now proceed with the initial coding. In your program, be sure to properly encapsulate your classes, particularly by not making your attributes public. Always manage your destructors carefully.
The modules to be created to complete this step are:
At the end of this step, the necessary features to simulate the scorpion’s predation mechanisms will be implemented:
|
← the scorpion’s movement is guided by waves emitted by the mouse (visible here in light)
|