[Mod] Cellular Automata [0.1.2] [automata]
[Mod] Cellular Automata [0.1.2] [automata]
A minetest mod for creating, importing and growing various cellular automata, including Conway's Game of Life and procedural giant trees -- now with pleasing sounds keyed to the pattern growth stats and timing!
This mod adds two new blocks and a tool:
1. an Active and Inactive Automata Cell
2. a Remote Control tool for triggering activation of cells according to 1D, 2D and 3D cellular automata rules, Importing of Game of Life .LIF files, and pausing resuming patterns.
3. a chat command (//owncells) to follow up WorldEdit commands such as //replace, //set. //mix, //load etc. Used to recover orphaned cells, create random fields, save and load patterns, and convert terrain and in-world objects into cells ready to activate with the remote.
Explanatory video at https://www.youtube.com/watch?v=DSBbuvQmhwY and the readme.md included in the mod is also thorough. Most recently a new tab has been added to the remote control to adjust the settings of an example of a non-totalistic 3D automata to create giant trees complete with roots, leaves and fruit.
Mod dependencies: worldedit (optional for certain features)
Mod only tested with Minetest v.0.4.12
Author: bobomb
License of code and textures WTFPL
(Included .LIF file collection by Alan Hensel, Game of Life patterns generally attributed to original discoverers)
repository: https://github.com/bobombolo/automata (has a full readme with screenshots)
zip: https://github.com/bobombolo/automata/a ... master.zip (always current)
This mod adds two new blocks and a tool:
1. an Active and Inactive Automata Cell
2. a Remote Control tool for triggering activation of cells according to 1D, 2D and 3D cellular automata rules, Importing of Game of Life .LIF files, and pausing resuming patterns.
3. a chat command (//owncells) to follow up WorldEdit commands such as //replace, //set. //mix, //load etc. Used to recover orphaned cells, create random fields, save and load patterns, and convert terrain and in-world objects into cells ready to activate with the remote.
Explanatory video at https://www.youtube.com/watch?v=DSBbuvQmhwY and the readme.md included in the mod is also thorough. Most recently a new tab has been added to the remote control to adjust the settings of an example of a non-totalistic 3D automata to create giant trees complete with roots, leaves and fruit.
Mod dependencies: worldedit (optional for certain features)
Mod only tested with Minetest v.0.4.12
Author: bobomb
License of code and textures WTFPL
(Included .LIF file collection by Alan Hensel, Game of Life patterns generally attributed to original discoverers)
repository: https://github.com/bobombolo/automata (has a full readme with screenshots)
zip: https://github.com/bobombolo/automata/a ... master.zip (always current)
Last edited by bobomb on Fri Mar 10, 2023 17:25, edited 18 times in total.
Re: Cellular Automata
Wow, cool! I remember writing and playing life back in the 80's! :)
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: Cellular Automata
But... the game of life uses way too many block modification operations, please use the VoxelManipulator to give low-end computers a chance to display it.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: Cellular Automata
yes i will be learning voxelmanip next. I think it will solve several of my problems.
also game of life entities that enter a steady-state need to be removed from the abm.
there are lots of other optimizations that need to be made, i'm just getting started.
also game of life entities that enter a steady-state need to be removed from the abm.
there are lots of other optimizations that need to be made, i'm just getting started.
- cd2
- Member
- Posts: 562
- Joined: Mon Jun 01, 2015 06:30
- GitHub: cdqwertz
- In-game: cd cd2
- Location: Linux
- Contact:
Re: Cellular Automata
bobomb : try to study paramat`s Mapgen framework/example [noise23]
It helped me a lot!
It helped me a lot!
Re: Cellular Automata
cd2:
I will, though this isn't really a mapgen mod. Even the very large patterns grow a layer at a time and watching them grow is most of the appeal. I am reading up on voxelmanip and planning a rewrite this week. see: https://github.com/bobombolo/automata/issues/2
What parts of that mapgen framework are you specifically thinking I should look at?
I will, though this isn't really a mapgen mod. Even the very large patterns grow a layer at a time and watching them grow is most of the appeal. I am reading up on voxelmanip and planning a rewrite this week. see: https://github.com/bobombolo/automata/issues/2
What parts of that mapgen framework are you specifically thinking I should look at?
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: Cellular Automata
CA need to use the non-mapgen voxelmanip, which uses different code, see my catacomb mod as an example https://github.com/paramat/catacomb of ABMs triggering the processing of defined volumes.
However ABMs have random timing, perhaps better to just loop the code so it runs as fast as it can.
Reading your post in the LVM thread, it's best to not use metadata because the LVM can only read/process/write content-id, param1 or param2. The fastest method would be to have several different CA nodes and process only content-ids.
For detecting the extent of CA nodes, perhaps better to store the limits of the startng volume and just process this plus 1 node on all sides. Each generation: if a node is placed outside the volume them increase that limit by 1 node. This way you will always know the exact volume of CA nodes you need to process with the LVM
However ABMs have random timing, perhaps better to just loop the code so it runs as fast as it can.
Reading your post in the LVM thread, it's best to not use metadata because the LVM can only read/process/write content-id, param1 or param2. The fastest method would be to have several different CA nodes and process only content-ids.
For detecting the extent of CA nodes, perhaps better to store the limits of the startng volume and just process this plus 1 node on all sides. Each generation: if a node is placed outside the volume them increase that limit by 1 node. This way you will always know the exact volume of CA nodes you need to process with the LVM
Re: Cellular Automata
that is what I am doing in my current rewrite. I have some strategies to mitigate lag, i can't really use ABMs. I think I see what you are doing in catacomb. need to study furtherparamat wrote:CA need to use the non-mapgen voxelmanip, which uses different code, see my catacomb mod as an example https://github.com/paramat/catacomb of ABMs triggering the processing of defined volumes.
However ABMs have random timing, perhaps better to just loop the code so it runs as fast as it can.
i tried this already but it means a node type for each combination of rules. I have moved completely away from metadata in the current rewrite except for setting one identifier which i planned to use to persist active patterns to a file. i was under the impression that LVM would deal with meta, so I will find another way. persisting to a file is a secondary objective for me anyway. I have the mod down to two node types and an activator tool.paramat wrote: Reading your post in the LVM thread, it's best to not use metadata because the LVM can only read/process/write content-id, param1 or param2. The fastest method would be to have several different CA nodes and process only content-ids.
Even before I start using LVM I have started to track the pmin and pmax of each pattern at start and each iteration, should make the transition to LVM easy...paramat wrote: For detecting the extent of CA nodes, perhaps better to store the limits of the startng volume and just process this plus 1 node on all sides. Each generation: if a node is placed outside the volume them increase that limit by 1 node. This way you will always know the exact volume of CA nodes you need to process with the LVM
you can see my progress at https://github.com/bobombolo/automata/tree/development
thanks for the input
Re: Cellular Automata
still haven't started using lvm but latest version 0.0.3 has node, tool and formspec definitions that are much more refined and getting towards a final version. Importing of Life entities finally supported, ships with a large collection of .LIF files to play with. Ability to trigger a single node to current location (ie, in the sky). Still no persistence on game exit / restart.
Re: Cellular Automata
version 0.0.4 has some new features, again a much more useful form, management tab, 1D automata, 3D automata, and other new features.
Re: [Mod] Cellular Automata [0.0.4] [automata]
thanks so much, see:paramat wrote:See https://gist.github.com/paramat/389ee65ce9378d9dad25
viewtopic.php?f=9&t=12666
Re: Cellular Automata
This has now been completed. No Advanced Block Modifier is used and VM has been fully implemented.Krock wrote:But... the game of life uses way too many block modification operations, please use the VoxelManipulator to give low-end computers a chance to display it.
Message to all: please test this mod, particularly the multiplayer functionality (manage tab) and how it runs on a server. Also open to any suggestions on improving the efficiency of the growth algorithm.
For version 0.1.0 I plan to have several more features such as persistence, importing / exporting improvements, some form improvements for people used to NKS nomenclature, and possibly an admin tab. Also at this time any rule that uses 0-neighbor birth is inaccurate as 0-neighbor birth is simply ignored. I plan to solve this issue before v.0.1.0.
For those truly interested in cellular automata a recently added feature, stepwise growth (in the manage tab you can add extra generations to any finished pattern, as well as pause/resume) might interest you.
a 3D pattern started from a single cell (18neighbor 0,3,5/1,3,8)
NKS rule 30 in RAINBOW mode... grown in -Y
A 2D pattern finished in mese (8 neighbor, 01234/14) grown in X
Re: [Mod] Cellular Automata [0.0.8] [automata]
Request for education: Re: voxel areas and indexes:
Is it possible to mathematically convert indexes from one extent to a different extent as long as the nodes to be converted are in both extents (the overlapping area)? My intent is to eliminate a costly conversion from area1 indexes, into positions {x,y,z} and then back into area2 indexes. This is due to the fact that the extent of the pattern changes each iteration. I have eliminated as much of this as possible by storing both indexes and positions in the pattern's cell table but I would like to completely eliminate it if possible.
It occurs to me that learning about the .mts format and importing/exporting to that format might be another way to refactor the growth function more efficiently at the same time as accomplishing the goal of providing better import/export functionality...
Is it possible to mathematically convert indexes from one extent to a different extent as long as the nodes to be converted are in both extents (the overlapping area)? My intent is to eliminate a costly conversion from area1 indexes, into positions {x,y,z} and then back into area2 indexes. This is due to the fact that the extent of the pattern changes each iteration. I have eliminated as much of this as possible by storing both indexes and positions in the pattern's cell table but I would like to completely eliminate it if possible.
It occurs to me that learning about the .mts format and importing/exporting to that format might be another way to refactor the growth function more efficiently at the same time as accomplishing the goal of providing better import/export functionality...
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: [Mod] Cellular Automata [0.0.8] [automata]
Wow, nice. I will think on your question.
Re: [Mod] Cellular Automata [0.0.8] [automata]
when an extent is created, what is the base index number, which should be 1, but is always in the thousands, based on?
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: [Mod] Cellular Automata [0.0.8] [automata]
> Is it possible to mathematically convert indexes from one extent to a different extent as long as the nodes to be converted are in both extents
Maybe but it will still be complex, and therefore very slow in lua, it's best to use the c++ voxelarea area.index(p) api as much as possible.
Whenever you work with a particular volume, the actual emerged voxelmanip volume (emin, emax) is the volume of complete mapblocks (16^3 with origin at (0,0,0)) that contains your requested volume.
The voxelmanip index is relative to this volume of complete mapblocks, which is why the index number is large for the first position in your requested volume.
So, the emerged voxelmanip volume only changes it's volume when your structure crosses a mapblock border, so the index for a cell only changes then, you only need too recalculate the index when a border is crossed, not every iteration.
Also, you only need to create a new voxelmanip volume when a border is crossed, because it will be identical until a border is crossed.
Maybe but it will still be complex, and therefore very slow in lua, it's best to use the c++ voxelarea area.index(p) api as much as possible.
Whenever you work with a particular volume, the actual emerged voxelmanip volume (emin, emax) is the volume of complete mapblocks (16^3 with origin at (0,0,0)) that contains your requested volume.
The voxelmanip index is relative to this volume of complete mapblocks, which is why the index number is large for the first position in your requested volume.
So, the emerged voxelmanip volume only changes it's volume when your structure crosses a mapblock border, so the index for a cell only changes then, you only need too recalculate the index when a border is crossed, not every iteration.
Also, you only need to create a new voxelmanip volume when a border is crossed, because it will be identical until a border is crossed.
Re: [Mod] Cellular Automata [0.1.0] [automata]
version 0.1.0 released. active development will largely halt now. please report bugs here. Will post a video within next few days.
Re: [Mod] Cellular Automata [0.1.0] [automata]
help testing processing time:
my standard patterns for testing efficiency are:
singlenode map, start 3 patterns from single cell in space (obviously), growth: 1, destruct mode on, trail: stone, final: mese
1D pattern, rule 30, main axis: x, growth axis z, 100 generations (should end with 103 cells)
2D pattern, 8 neighbors, rule 01234/14 growth axis y 50 generations (should end with 3776 cells)
3D pattern, 18 neighbors, rule 0,3,5/1,3,8, 30 generations (should end with 36460 cells)
- i start these one after the other not waiting for one to finish before triggering the next
the current total growth times (readable from the manage tab) are:
1D: 25145ms
2D: 46831ms
3D: 19770ms
please let me know your results
my standard patterns for testing efficiency are:
singlenode map, start 3 patterns from single cell in space (obviously), growth: 1, destruct mode on, trail: stone, final: mese
1D pattern, rule 30, main axis: x, growth axis z, 100 generations (should end with 103 cells)
2D pattern, 8 neighbors, rule 01234/14 growth axis y 50 generations (should end with 3776 cells)
3D pattern, 18 neighbors, rule 0,3,5/1,3,8, 30 generations (should end with 36460 cells)
- i start these one after the other not waiting for one to finish before triggering the next
the current total growth times (readable from the manage tab) are:
1D: 25145ms
2D: 46831ms
3D: 19770ms
please let me know your results
Re: [Mod] Cellular Automata [0.1.0] [automata]
how do i get this mod to show up in the mod store?
- Blockhead
- Member
- Posts: 1681
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: [Mod] Cellular Automata [0.1.0] [automata]
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
Re: [Mod] Cellular Automata [0.1.0] [automata]
i have submitted this mod for approval
Who is online
Users browsing this forum: No registered users and 29 guests