04-22-2025 02:50 PM
I'll also attach the labview version 2019 .
04-23-2025 12:24 AM - edited 04-23-2025 12:32 AM
04-23-2025 12:34 AM
Tried a lot but still can't figure this one out
04-23-2025 03:12 AM - edited 04-23-2025 03:12 AM
Hi adam and knightrider,
you really should work together when you work on the same task (and probably in the same class)…
@knightrider:
Your VI should look more like this:
You really need to learn more about DATAFLOW, array handling, shift registers, indexing tunnels - in sum: LabVIEW basics!
Hint: when you want to handle all subarrays of your input array then you should NOT work with constants for any array indices…
04-23-2025 09:23 AM
@knightrider3466 wrote:
I'll also attach the labview version 2019 .
When attaching a VI, make sure that all controls have reasonable default values. Here the input is an array of strings, which has an infinite amount of possible values, while there can actually only be two possible values (X, O), so maybe an 2D array of booleans would be more reasonable.
It also helps to list the full rules (e.g. from here).
These are very simple rules and should not require a screenful of code, right? So try to simplify!
04-23-2025 11:48 AM
@knightrider3466 wrote:
Hi...Yamaeda!
Although the logic you made was kinda nice doing DFS on every element and looking for each element whether a X exists or Not and then depending upon that a decision was being made but there is some slight error in the logic i still can't figure out what it is. It was great effort but the outputs are not the same as they should be like if there is O on the boundaries just, the logic in the code is producing Os in the middle of the matrix two where there are supposed to be No Os
That is a different task. Basically you need to check for every O if there is a path to the edge. LabVIEW comes with an example in examples\Synchronization\Queue\Queue Stack Maze Solver.vi
04-23-2025 12:15 PM
Here is a very quick draft for the game of life (as mentioned in the first post). It would be easy to adapt to whatever logic and datatypes (e.g. strings) you are trying to implement.
04-24-2025 04:39 AM
@knightrider well, your original description didn't exactly include the border rules or Regions, did it? 🙂
By logic, all Regions that's not connected to an Edge will be surrounded, right?
So, search for all O's, see if they're connected to another O to create a region and if any O in the region is a border-O they won't flip.