06-06-2023 02:07 PM
Hello,
I am a student and I have been given a task and wanted to ask for some help. I was asked to create a VI that implements the Game of Life. These were the instructions that were given to me:
Create a VI that implements The Game of Life, i.e., a cellular automaton devised by the British mathematician John H. Conway.
The Game of Life world is an infinite, two-dimensional array of cells, each in one of two states: alive or dead. Each cell interacts with its eight neighbors, i.e., cells with which it shares its edges or corners. At each time step, the following changes occur:
•a cell with fewer than two living neighbors dies of underpopulation
•a cell with two or three living neighbors survives until the next iteration
•a cell with more than three living neighbors dies from overpopulation
•in place of a dead cell with exactly three living neighbors, a living cell is born.
All these changes occur simultaneously, i.e., the next generation of cells is determined uniquely by the preceding generation.
Represent the game world with an LED array control, where the user can add cells by clicking on individual LEDs -both while the VI is running and before it runs.
Additional requirements:
•the game world presented in the array should have the same number of rows and columns;
•the user should be able to choose the size of the presented area of the game world before starting the VI –however, changing the height and width of the control does not have to occur automatically;
•since the game environment should be an infinite two-dimensional array of cells, treat the presented area as infinitely repeating, i.e., touching edges with identical, shifted areas;
•during the VI operation, the user should be able to clear the game world of living cells;
•the game time step should be adjustable from 50 ms to 2 secs in 50 ms increments.
The user should be able to place a sample built-in cell pattern in the game world (include at least three patterns to choose from). Search the Internet for patterns whose evolution is known: e.g., Glider will travel diagonally across the matrix, Boat will remain still, Blinker will oscillate, and Glider gun will fire Gliders.
I attached my VI and if anyone could tell me how to proceed it will be great
Solved! Go to Solution.
06-06-2023 02:11 PM
what is your question about your problem ?
I will assume you don't want us to do the project for you.
06-06-2023 02:17 PM
No, I don't want you to do the project for me. It is just that I'm having trouble in running it, I'm having an error in case structure that I have a wrong type of selector and that for some selector values have no case. I am not that experienced in Labview and I'm having trouble understanding what this means
06-06-2023 02:33 PM
Sounds good, Can you provide the file for version2020 ?
06-06-2023 02:40 PM
Here it is and sorry for the previous confusion I didn't word very well my problem
06-06-2023 02:51 PM
Thank you !
The case structure in your code is wired to an integer number. But the case is using String text : Alive / Dead.
Use the numeric values instead of the text.
It also accepts intervals for example, let's stay that Alive is any number bigger than 10, you would type Case 10..
and Dead is any number bellow 9, use ..9
06-06-2023 03:01 PM
Thank you it is now working