Saturday, June 4, 2011

Turmites infestation has just broken out

No, not termites. Turmites. That's a new cellular automaton which I've just added to LivingCells. It is quite different from other cellular automata in the app. Other automata have fields of cells, which live, and this one has a field of static cells. However, there are these turmites, which move on the field and change cells.

How they affect a cell depends on the color of the cell and on the turmite state. All the actions are specified in the rule, and every combination of a cell and a turmite state has its set of actions. Actions which a turmite performs are as follows: it sets the cell to a new color, changes its state, makes a turn and walks one or more steps in the current direction. The results are some cool patterns.

One other nice thing about this cellular automaton is that it suits live wallpaper very well. Turmites eat the same amount of device resources regardless of the cell size or speed. I fact, it is better to set high speed for turmites and small cell size, this automaton sits particularly well with these settings. I've even made a new "very fast" speed setting for this.

So, hope you like this new automaton, and as always, if you have any suggestions, feel free to leave them in the comments.


  1. I don't know if the app is written in a way which would allow this, but I would like to make a suggestion that an option be added to apply the life rules every n cycles, or coluored life rules every c cycles, and the generations rules every x cycles while running Turmites, where c=0 would mean do not apply the coloured life rules, n=0 would mean do not apply the life rules, and x=0 would mean do not apply the generations rules. Setting c or n or x to 1 would mean to apply the respective rules every generation. This would allow the "static cells" to act as "live cells" while running Turmites. The way this would work is that for n and x and c (in whichever order you program it) if the value is greater than 0, the modulus of the cycle count for that value would be calculated and if equal to 0 then the respective rules would be applied before the Turmites do their calculations and actions. For example, if c=7, then the coloured life rules would be applied on cycle 0, cycle 7, cycle 14, cycle 21, etc., or on the 7th, 14th, 21st, 28th, and so on... depending on how you have it programmed. The idea being to allow dynamic inerations between live cells and turmites. I do not know how this will work for life or generations as you have them programmed, but an example of how I envision this for colored life is that a turmite could leave a trail of live cells on an otherwise blank board for c cycles and then the rules of coloured life would be applied. For example, if c=0, n=0, and x=0, with Conway's Life rules and a single turmite set to turn left on colour 0, change it to colour 1 and step forward 1 cell, starting with all cells set to colour 0, then every 4 cycles you would see the turmite walk a tiny square with a single colour 1 cell behind it (which would of course die from lack of neighbors in the next cycle). Three turnmite starting out side-by-side could leave a row of three colour 1 cells side-by-side, which in the next generation would "flip" (if Conway's Life rules are applied) before the Turmites got to calculate and perform their actions.

  2. I don't know if the comment I just posted went through (about turmite direction and screen orientation) but I thought I should clarify. Currently, a Turmite going "down" in a straight line continues to go "down" when the screen is rotated... causing it to turn. A solution to this would be to add an option to lock absolute directions to poitrait mode or to landscape mode... although also allowing the option of the current behavior (not locked with screen orientation) could be cool as well, since it allows for a type of "interaction" by tilting the screen to change the direction all turmites are traveling in. In face, really cool, in my opinion, would be to have a global default setting of locked to starting orientation, but allow rules to over-ride the default to allow interaction through tilting or to lock direction at the time the rule is applied... but that may be harder. You decide. I like the program. :)

    1. I am really sorry I took such a long time, for some reason I didn't get any email notifications about the comments on my blog, and also I don't get a lot of comments, as you might have noticed, so I don't check for them regularly.

      The ideas you have presented are quite valuable, I will consider adding something like this. I can't know whether this will be cool or not, of course, but I appreciate the feedback. Right now I'm working on other applications, but I may get to this application as well, so that's great that I have some ideas to think over.

      Also I'm glad that you like my app! It has kind of lost its popularity when Google changed something in the search mechanism in Android Market in the middle of 2011.

  3. This comment has been removed by a blog administrator.