04-14-2025 04:17 PM
Hi i am trying to design the game of life for several days and i am stuck in it badly. Anybody who has solved this core 1 exercise, i could really use your help. I designed the VI but i couldn't get past through the surrounded regions i mean the Os at the borders are successfully converted to Xs but i can't figure out the logic of not making Os into Xs where the region joins the Os in the border.
04-14-2025 05:29 PM
Post your actual VI, instead of screenshots of the problem. We can't see where you've gone wrong otherwise.
And by "actual VI" I mean the VI file itself, not screenshots of it.
If you back-save it to earlier versions (I recommend 2019) then more people can look at it, a lot of us don't update to the most recent version for quite a while.
04-15-2025 04:10 AM
For all squares, check the 8 surrounding ones and calculate the amount of live ones to determine the next State.
04-15-2025 12:39 PM
One small hint: a common way to go astray is to incrementally apply updates into the same 2D dataspace that you're evaluating. This ends up violating the rule that says changes should be applied "simultaenously".
One way to avoid this is at the beginning of each new round, "freeze" the existing state by making a copy. Do all your evaluations on the copy, and all your updates in the primary 2D dataspace.
Have fun!
-Kevin P
04-21-2025 05:46 AM
Hi there LabView community, I have done almost every possible try to resolve the issue where the regions surrounded by Xs are to be converted into Os but I'm stuck in figuring out the logic where the regions that touch the boundary of the matrix are not to be converted into Xs. I have designed the VI where it converts everything except the Os on the border of the matrix but the problem is it is converting even the Os that are linked to the region having Os connected to the borders.
I Thank LabView community in advance for being so quick in response!
04-22-2025 02:12 AM
You'll get better responses if you do a "save fore previous" ((e.g. LabVIEW 2019) before attaching. I cannot open your VI.
04-22-2025 08:40 AM
'Surrounded' as in ortogonally or all 8 surrounding blocks? How are edges considered?
04-22-2025 09:08 AM
With your input, no O is surrounded, so the output would be the same?
04-22-2025 09:16 AM
Something like this maybe?
04-22-2025 02:48 PM
Ok I see that u are trying to traverse in all the 4 directions when ever the loop finds any Os and then if the region is completely consisting of Os alongwith the borders you are not going to change it to Xs and vice versa. Well that's sounds like a fair approach I'll try this one out and let you know! Thanks