Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
ECE 4122/6122 Lab 4: CUDA-based John Conway’s Game of Life
Objective:
Game Description:
The Game of Life (an example of a cellular automaton) is played on an infinite two-dimensional rectangular grid of cells. Each cell can be either alive or dead. The status of each cell changes each turn of the game (also called a generation) depending on the statuses of that cell's 8 neighbors. Neighbors of a cell are cells that touch that cell, either horizontal, vertical, or diagonal from that cell.
The initial pattern is the first generation. The second generation evolves from applying the rules simultaneously to every cell on the game board, i.e. births and deaths happen simultaneously. Afterwards, the rules are iteratively applied to create future generations. For each generation of the game, a cell's status in the next generation is determined by a set of rules. These simple rules are as follows:
• If the cell is alive, then it stays alive if it has either 2 or 3 live neighbors
There are, of course, as many variations to these rules as there are different combinations of numbers to use for determining when cells live or die. Conway tried many of these different variants before settling on these specific rules. Some of these variations cause the populations to quickly die out, and others expand without limit to fill up the entire universe, or some large portion thereof.
Turn-In Instructions
Grading Rubric:
AUTOMATIC GRADING POINT DEDUCTIONS PER PROBLEM:
Element |
Percentage
Deduction
|
Details |
Does Not Compile |
40% |
Code does not compile on PACE-ICE! |
Does Not Match Output |
Up to 90% |
The code compiles but does not produce correct outputs. |
Runtime and efficiency of code setup |
Up to 10%
extra credit
|
Top quartile 10 pts, Second quartile 5 pts, Third quartile 2 pts. |
Clear Self-Documenting
Coding Styles
|
Up to 25% |
This can include incorrect indentation, using unclear variable names, unclear/missing comments, or compiling with warnings. (See Appendix A)
|
LATE POLICY
Element |
Percentage Deduction |
Details |
Late Deduction Function |
score – 0.5 * H |
H = number of hours (ceiling function) passed deadline
|
j = j + i;
if (i < 5){
counter++;k -= i;
}else{
k +=1;
}j += i;
This applies for functions and member functions as well!
The main exception to this is class names, where the first letter should also be capitalized.
Variable and Function Names:
Your variable and function names should be clear about what that variable or function represents. Do not use one letter variables, but use abbreviations when it is appropriate (for example: “imag" instead of “imaginary”). The more descriptive your variable and function names are, the more readable your code will be. This is the idea behind self-documenting code.
File Headers: