ghjansen / cas

Cellular Automata Simulator
GNU Affero General Public License v3.0
30 stars 3 forks source link

Support for asynchronous update schemes #58

Open mvrozanti opened 5 years ago

mvrozanti commented 5 years ago

Great project, specially for beginners such as me, it helps a lot!

I was wondering if async updates would be a wanted feature. Such as is described here

Thanks!

ghjansen commented 5 years ago

Thank you @mvrozanti I'm glad you like it! It is always good to discover people who appreciate Cellular Automata.

Yes, async is not only wanted but it is a must, I would dare to say. The status quo is explicit time, sequential algorithm and a good number of bottle necks to eliminate, in terms of time complexity and design. There is always room for improvement.

I dare to say also that your question is possibly part of the Parallelism Project, which should take into account the various ways of iterating CA efficiently. I have some ideas on that matter, more like a hybrid conception of time, but I'm focusing at the GUI now, as this is a blocker for all next features.

Perhaps you can hack on the project and share your thoughts :)

mvrozanti commented 5 years ago

I made a few tweaks to the GUI, replacing the JTextField for JSliders on rule number, cell space count and iteration count. Helps me go through the rules more quickly :smile:

As per the async updates, I wasn't actually thinking of adding parallelism but rather a new kind of Rule that adds a priority "rank" for neighbouring cells, updating the space cell-by-cell, from highest priority to lowest (more description here).

ghjansen commented 5 years ago

Cool! I know sliders are used sometimes in that regard.

I see. I apologise my misunderstanding on that. Since I'm not familiar with this concept yet, I will have to study it before anything else.

Supporting such feature is not considered a priority by now, but I surely believe it is something interesting to have in the future. If you feel like trying, feel free to go ahead and let me know if you have any questions I may be able to answer about the project.

I will leave this issue open as it claims a potential contribution ahead. Thank you once again for your interest!