Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This project involves creating a simulation similar to John Conways Game of Life [1] in Matlab. At the start of the simulation, a board of

This project involves creating a simulation similar to John Conways Game of Life [1] in Matlab. At the

start of the simulation, a board of size (n) should be provided along with the positions of active

cells (you should create your own starter colony of cells). The position cell-array should consist

of the position of an active cell along with its age.

Eg: {1,3},2 --> An active cell of age 2 is present at row 1 and column 3.

You should create your own starter colony of cells. This input can be provided directly as a cell

array or can be read through a file (extra credit). The inputs that should be provided to your

program are:

The size of the board (n).

i. Eg: If n=5, then your board will be of size 5x5

Colonys initial cell positions along with their ages. (a cell array)

Minimum age that is required for a cell to generate a new cell in its neighborhood.

(surrounding 8 cells).

Maximum age, above which a cell cannot generate a new cell in its neighborhood.

(surrounding 8 cells).

The number of time steps to run the simulation.

Note: The programmer should create the simulation function with required inputs. (The

programmer should also create the test file).

Rules for the simulation are:

For an existing cell:

Each cell with one or no neighbors dies, as if by solitude.

Each cell with four or more neighbors dies, as if by overpopulation.

Each cell with two or three neighbors survives and its age is increased by 1.

For a grid position that is 'empty' or 'unpopulated'

Each grid position with exactly three neighbors and whose ages are all between

the provided minimum age and maximum age (inclusive) generates a new cell

with age set at 1.

If there is no change in the colony (positions of cells) from the previous time step to current time

step in the simulation, then the simulation stops.

The program should also keep track of the number of newly generated cells, number of cells that

die, and the total age of the colony (all the cells in the board) at each time step.

At the end of the simulation, the program should generate plots of

The number of newly generated cells with time steps.

The number of deceased cells with time steps.

The total age of the colony with time steps.

Note: You need to test your code extensively, the grade for this project will depend on the

description of your test cases.

Provide your test-cases as comments in your program.

Extra Credit:

Propose an extension to the project and implement it. (10%)

Create a GUI for the program by showing the cells as filled circles on a grid. Add

user interaction to the grid by having a slider to adjust the speed of the simulation

or having an array of buttons to initialize a colony. (10%-20% depending on the

complexity).

Load the start positions of a colony (board) from a file. (10%).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions