In practicals you have implemented and learned about simulations, object-orientation and (soon) how to automate the running of multiple simulations.

computer science

Description

1 Preamble 

In practicals you have implemented and learned about simulations, object-orientation and (soon) how to automate the running of multiple simulations. In this assignment, you will be making use of this knowledge to extend a given simulation to provide more functionality, complexity and allow automation. You will then report on the results generated by the simulation.


2 The Problem 

You have been provided with some basic code to simulate a population of Brine Shrimp. Your task is to extend the code and then conduct an experiment, varying the input parameters, to see how they impact the overall simulation.


The required extensions are: 

1. Life Cycle: Extend to have additional life stages, e.g. egg  hatchling  juvenile  adult. This should be implemented via the object’s methods and attributes. 


2. Visualisation: Enhance the output to vary the representation of animals by their life stage. You may choose an “image” representation, to improve on using coloured dots. 


3. Movement: Movement should vary by life stage and needs to be constrained to the swimming space. The Base code movement is highly unrealistic. You should consider how the shrimp might move, e.g. they keep going in the same direction unless they have a “change direction” event at some level of probability. 


4. Collisions: The animals are swimming in a two dimensional space. Your code should recognise when collisions occur and modify the path of the shrimp accordingly. 


5. Reproduction: Typically, the brine shrimp are purchased as dry eggs, however, their lifecycle changes in a water environment. You may simplify this to be asexual reproduction, but that won’t get full marks


Related Questions in computer science category