whari do whari does

profileassignmentacer
12259-2020S2FOPAssignmentPaSciRov1.0.pdf

1

Fundamentals of Programming

Assignment Option 1: PaSciRo Simulation Semester 2, 2020 v1.0

Discipline of Computing Curtin University

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 We will be simulating life on the planet PaSciRo, which is inhabited by three lifeforms of interest, each with their own behaviour and interaction rules. You will be given some sample code, simulating the population using arrays. For the assignment, you will convert the code to model the planet creatures using objects, and to add features to the simulation (e.g. more functionality, statistics, graphics, parameter sweeps). 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. Object Behaviour: Extend to have the lifeforms represented as objects. Each type of object will have its own behaviour(s). This should be implemented via the object’s methods and attributes.

2. Visualisation: Enhance the output to vary the representation of animals by their type, and possibly direction of movement. You may choose an “image” representation, to improve on using coloured dots. You should also be able to save the simulation state as an image or a csv file.

3. Movement: Movement should vary by lifeform and needs to be constrained to the space. The Base code movement is highly unrealistic. Prompts: Consider how they might move, e.g. Do the different lifeforms move in different ways? Do they keep going in the same direction unless they have a “change direction” event at …