The game of life

Assignment Help C/C++ Programming
Reference no: EM13808631

The game of Life, invented by the mathematician John H. Conway, is intended to model life in a society of organisms. Consider a rectangular array of cells, each of which may contain an organism. If the array is viewed as extending indefinitely in both directions, then each cell has eight neighbors, the eight cells surrounding it. In each generation, births and deaths occur according to the following rules.

- An organism is born in any empty cell having exactly three neighbors.

- An organism dies form isolation if it has fewer than two neighbors.

- An organism dies from overcrowding if it has more than three neighbors.

- All other organisms survive.

Use a 20 x 20 array to test your program. Print out each generation (i.e. 20 x 20 array) for the first 6 generations. Be sure to printout generation 0.

The data for the above is as follows where each subscript (row,col) represents a life form:

Start life in col 3, 4, 5 and col 20 ie. (1,1) (2,1) (3,1) ... (20,1) and (1,20) (2,20) (3,20) ... (20,20), row 10, 11 and row 19, and the following other matrix locaitons:

3,6 15,18 4,14 17,10

3,7 15,19 5,15 17,11

3,8 16,19 9,4 18,10

4,6 16,18 13,13 18,11

4,7 16,16 15,14 16,10

5,6 17,15 13,15 17,11

5,8 17,18 13,16 15,6

19,6 19,4 19,6 19,7

6,6 17,19 12,14 15,7

7,6 18,18 13,18 16,6

8,7 18,17 12,15 17,6

8,8 17,9 2,6 18,6

20,20 9,8 2,7 12,6

5,7 12,7 2,2 18,2

2,8 2,9 2,10 19,16

4,10 4,11 2,12 19,18

4,13 3,11 2,13

3,13 3,14 13,17

A life form is represented by an asterisk symbol.

You probably already know this but the instructor said that this program is much easier to write if you add extra rows and columns to the outer perimeter of the array.

Reference no: EM13808631

Questions Cloud

Find variances for both the revenue and expenditures sides : Find the variances for both the revenue and expenditures sides and then discuss two to three problematic areas for the agency.
Social work paper on the movie philadelphia : Social work paper on the movie Philadelphia
Design a class include a constructor and members : Design your own C++ class. Keep it simple but use the readings this week to include a constructor, members and methods. Be sure to test your class by constructing it and using its functionality
Compute the new price of the bond. use appendix b and append : Wilson Oil Company issued bonds five years ago at $1,000 per bond. These bonds had a 25-year life when issued and the annual interest payment was then 15 percent. This return was in line with the required returns by bondholders at that point in time ..
The game of life : The game of Life, invented by the mathematician John H. Conway, is intended to model life in a society of organisms. Consider a rectangular array of cells, each of which may contain an organism
The corresponding odds ratio for girls : If it makes sense to do so, find a point estimate for the summary odds ratio and construct a 95% confidence interval.
City of charlottesville 2010 annual comprehensive plan : Write a review of the article titled "City of Charlottesville 2010 Annual Comprehensive Plan" located in the course shell.
Determine the average length of the waiting : Discuss the quality implications of your results. If you decide that the quality of the service could be improved, indicate what things you might do to improve quality.
Defferentiated instruction : Defferentiated Instruction

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd