Running MCell

Has something gone haywire? Let us know about it!
Post Reply
Dr. Monstaa
Posts: 70
Joined: December 5th, 2011, 3:46 pm

Running MCell

Post by Dr. Monstaa » January 15th, 2012, 10:11 am

My Windows 7 PC seems unable to open MCell saying:
Exeception EOleSysError in module MCell.exe at 000FD8D1
Error accessing the OLE registry.

Any way to fix or change the rule tables to run in Golly?
I'm science-ing as fast as I can!- Professor Farnsworth

User avatar
Wojowu
Posts: 210
Joined: October 1st, 2011, 1:24 pm

Re: Running MCell

Post by Wojowu » January 15th, 2012, 12:00 pm

Add a new line to file before #RULE

Code: Select all

#GOLLY rule
Insteand of rule write name of ruletable you will use to run this pattern. Then you can open file using Golly.
First question ever. Often referred to as The Question. When this question is asked in right place in right time, no one can lie. No one can abstain. But when The Question is asked, silence will fall. Silence must fall. The Question is: Doctor Who?

Dr. Monstaa
Posts: 70
Joined: December 5th, 2011, 3:46 pm

Re: Running MCell

Post by Dr. Monstaa » January 15th, 2012, 12:10 pm

Well no because it's the rule tables I want
I'm science-ing as fast as I can!- Professor Farnsworth

User avatar
Wojowu
Posts: 210
Joined: October 1st, 2011, 1:24 pm

Re: Running MCell

Post by Wojowu » January 15th, 2012, 12:15 pm

Sorry! I thought you wanted to run pattern in Golly, not rule table. Can you give this rule table? I don't know Golly can run MCell rule tables
First question ever. Often referred to as The Question. When this question is asked in right place in right time, no one can lie. No one can abstain. But when The Question is asked, silence will fall. Silence must fall. The Question is: Doctor Who?

Dr. Monstaa
Posts: 70
Joined: December 5th, 2011, 3:46 pm

Re: Running MCell

Post by Dr. Monstaa » January 15th, 2012, 12:17 pm

It can't that's sort of why I made this thread
I'm science-ing as fast as I can!- Professor Farnsworth

User avatar
Tim Hutton
Posts: 64
Joined: May 20th, 2010, 7:30 am
Contact:

Re: Running MCell

Post by Tim Hutton » January 15th, 2012, 4:03 pm

MCell's Margolus rules can be converted into Golly rule tables. Use:

Code: Select all

Scripts/Python/Margolus/convert-MCell-string.py
and enter one of the strings from here:
http://psoup.math.wisc.edu/mcell/rullex_marg.html

It would be good to provide more of these scripts for the different Margolus rule types. Is it these rule tables that you are keen to see?
http://psoup.math.wisc.edu/mcell/rullex_rtab.html

Dr. Monstaa
Posts: 70
Joined: December 5th, 2011, 3:46 pm

Re: Running MCell

Post by Dr. Monstaa » January 16th, 2012, 1:43 pm

It's O.K i'm working on converting the other MCell tables into .table files (but if anyone has a solution for all the tables please post). I'll be working on that this week (or so). If anyone reading this topic is intersted in running MCell tables in Golly contact me.
I'm science-ing as fast as I can!- Professor Farnsworth

User avatar
otismo
Posts: 831
Joined: August 18th, 2010, 1:41 pm
Location: Florida
Contact:

Re: Running MCell

Post by otismo » February 14th, 2020, 5:01 pm

one mcell pattern I always wished could run in Golly is "Digital Inkblots"

this pattern is an example of what I mean by being able to do colors "right"
Patterns.zip
Digital Inkblots related files
(952.69 KiB) Downloaded 177 times
the zipfile above only contains the Patterns in the MCell _Must_See directory

and contains the entire directory and all Patterns therein

as well as ALL UserDLLs ( in a zipfile )

and ALL RULES
"One picture is worth 1000 words; but one thousand words, carefully crafted, can paint an infinite number of pictures."
- autonomic writing
forFUN : http://viropet.com
Art Gallery : http://cgolart.com
Video WebSite : http://conway.life

Yoel
Posts: 317
Joined: July 2nd, 2020, 1:02 am
Location: Electronic jungle
Contact:

Re: Running MCell

Post by Yoel » November 3rd, 2020, 2:35 pm

Is there a tool for converting MCell "Rules table" family of rules into Golly rule tables? I have some old pattern collections from 2000-2006, which I can run on Linux under Wine, but I would like to gollyfy them.

BTW, allmost never used MCell under Windows, only Linux, FreeBSD or NetSBD. Never ran into serious problems, although early versions of Wine were often unstable.

I am asking, because this thread is quite old. I hope someone came up with something after 2012.

User avatar
dvgrn
Moderator
Posts: 8931
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Running MCell

Post by dvgrn » November 3rd, 2020, 4:19 pm

Yoel wrote:
November 3rd, 2020, 2:35 pm
Is there a tool for converting MCell "Rules table" family of rules into Golly rule tables? I have some old pattern collections from 2000-2006, which I can run on Linux under Wine, but I would like to gollyfy them.

BTW, allmost never used MCell under Windows, only Linux, FreeBSD or NetSBD. Never ran into serious problems, although early versions of Wine were often unstable.

I am asking, because this thread is quite old. I hope someone came up with something after 2012.
I don't know of any converter script that has been written for Rule Table rules. It wouldn't be a very difficult job, though -- the format is very straightforward.

As an example, one of the Rule Table rules is actually the predecessor for LifeHistory, which is the predecessor for Golly 4.0's generalized RuleHistory:

Code: Select all

#MCell 4.00
#GAME Rules table
#RULE 1,0,1,0,0,0,1,0,0,0,0,0,0,2,2,1,1,2,2,2,2,2,0,2,2,2,1,2,2,2,2,2
#BOARD 340x340
#WRAP 0
#CCOLORS 3
#D This rule duplicates Conway's Life -- all constructions
#D will work identically -- but it leaves a trail of a third type of cell
#D wherever a cell has once been alive.  This is useful for placing still
#D lifes to affect a pattern, without having to backtrack continually to
#D find out whether the still life would have interacted with the pattern in
#D previous generations.
#D 
#D Dave Greene, April 2001
#L .A$3.A$AA..3A
This actually works in Golly because a special exception for "#RULE 1,0,1,0,0,0,1,0,0,0,0,0,0,2,2,1,1,2,2,2,2,2,0,2,2,2,1,2,2,2,2,2" is hard-coded in, so it maps to LifeHistory.

However, it's easy to write out a Golly rule table for any of these strings. It won't be the simplest or shortest way to write a rule table for that rule, but it will work just fine. Here's a quick explanation to start out:

"#CCOLORS 3" is equivalent to "num_states=3" in a Golly rule table or rule tree. The states are 0, 1, and 2.

The numbers in the rule string should be read like this:

1,0,1,
0,0,0,1,0,0,0,0,0,0,
2,2,1,1,2,2,2,2,2,0,
2,2,2,1,2,2,2,2,2
The notation of Rules table has the "N,M,F,S" form, where:
N - specifies the neighborhood type: 1 stands for Moore, 2 for von Neumann neighborhood.
M - specifies activity of the center (middle) cell. 1 is on, 0 is off.
F - specifies if the full 1st bitplane (all odd states) is considered to be firing (can give birth). This flag was introduced in order to provide compatibility with CelLab by Rudy Rucker and John Walker.
S - specifies the whole table, row by row, as one string. Trailing 0s can be removed.
(Here's the source web page.)

So the initial "!, 0, 1" is just N, M, F -- von Neumann neighborhood, middle cell off, all odd states firing. "Middle cell off" just means don't include the center cell in the count, I believe -- i.e., these are outer totalistic counts, not totalistic ones.

The rest is very simple. Each of the red, green, and blue lines above represents the cell transition given starting state 0, 1, or 2, for zero through 9 neighbors in that order. The neighbor count of 9 is impossible with an M value of 0, but a value of zero is always listed by default in that position anyway. It wouldn't matter if the zero changed to something else because you can't get a neighbor count of 9 unless the M value is set to 1.

So the above three colored lines say

"State 0 stays at State 0 unless there are 3 neighbors, in which case it goes to State 1"
"State 1 goes to State 2 unless there are 2 or 3 neighbors, in which case it stays at State 1"
"State 2 stays at State 2 unless there are 3 neighbors, in which case it goes to State 1"

Each number in this rule table string can be converted to a line in a Golly rule table. The trickiest part is that when there are a lot of states and the "odd states are firing" F value is set to 1, you should create eight variables listing all the ON cell states. Then you can do something like this:

symmetry = permute
0, 0,0,0,0,0,0,0,0, 0
0, on1,0,0,0,0,0,0,0, 0
0, on1,on2,0,0,0,0,0,0, 0
0, on1,on2,on3,0,0,0,0,0, 1
0, on1,on2,on3,on4,0,0,0,0, 0
0, on1,on2,on3,on4,on5,0,0,0, 0
0, on1,on2,on3,on4,on5,on6,0,0, 0
0, on1,on2,on3,on4,on5,on6,on7,0, 0
0, on1,on2,on3,on4,on5,on6,on7,on8, 0


where the boldface numbers on the right are the red integers from the MCell Rule Table string above.

If you have to deal with any rules with M=1, I guess you have to do some slightly more annoying conversion work. So for now I hope that there aren't any of those out there, and/or that I've given enough detail that you can figure out how to write a converter successfully.

The actual script-writing is left as an exercise for the reader. Any further questions, feel free to ask here.

Yoel
Posts: 317
Joined: July 2nd, 2020, 1:02 am
Location: Electronic jungle
Contact:

Re: Running MCell

Post by Yoel » November 3rd, 2020, 7:56 pm

Thank you for the detailed explanation!

I know how to translate MCell rule tables by hand. I just hoped that there is a script around that could save me a couple of hours of my time (I plan to translate a whole bunch of rules). Also, doing it by hand requires rechecking and testing the table. It's easy to miss something or make a typo, if the table is sufficiently long. My first Wireworld Golly table from around 2007 was actually a translation from MCell. I don't know, if a standard Golly table already existed back then.

BTW, Weighted Life rules in MCell are usually (always?) translatable into regular non-isotropic rule strings. Not mechanically though. For example, my Fireworld rule was originally saved on MCell as NW10,NN2,NE10,WW2,ME1,EE2,SW10,SS2,SE10,HI3,RS1,RS15,RB12. First I wrote a Golly table that works identically the same, and much later discovered that it corresponds to 03ajkr/2ak/3.

One important detail. Strings like

0, on1,on2,0,0,0,0,0,0, 0
0, on1,on2,on3,0,0,0,0,0, 1


may not work, because in rules with the F flag all even states are considered dead. It should be something like

0, on1,on2,off3,off4,off5,off6,off7,off8, 0
0, on1,on2,on3,off4,off5,off6,off7,off8, 1


for all possible combinations of dead/even states.

User avatar
dvgrn
Moderator
Posts: 8931
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Running MCell

Post by dvgrn » November 3rd, 2020, 9:20 pm

Yoel wrote:
November 3rd, 2020, 7:56 pm
I know how to translate MCell rule tables by hand. I just hoped that there is a script around that could save me a couple of hours of my time (I plan to translate a whole bunch of rules).
Yeah, there has never been a big enough collection of Rule Table rules worth "rescuing", to make it seem worth spending the time to write a generalized translator script. It would probably take me more than a couple of hours to write a script like that and cover all the cases, especially the annoying M=1 one -- and then I don't really have a collection of patterns with known behavior to test the script against. And once your rules are converted, it's a fairly good bet the script would never get used again.

I guess I'd suggest a semi-automated solution -- make a template Golly rule table for each different number of states in your collection of rules, and then just write a custom search-and-replace routine to drop the numbers from each rule string in the correct location in the template. Besides those numbers at the end of each rule line, I think only the rule name will have to change.

Yoel
Posts: 317
Joined: July 2nd, 2020, 1:02 am
Location: Electronic jungle
Contact:

Re: Running MCell

Post by Yoel » November 3rd, 2020, 10:20 pm

dvgrn wrote:
November 3rd, 2020, 9:20 pm
Yoel wrote:
November 3rd, 2020, 7:56 pm
I know how to translate MCell rule tables by hand. I just hoped that there is a script around that could save me a couple of hours of my time (I plan to translate a whole bunch of rules).
Yeah, there has never been a big enough collection of Rule Table rules worth "rescuing", to make it seem worth spending the time to write a generalized translator script. It would probably take me more than a couple of hours to write a script like that and cover all the cases, especially the annoying M=1 one -- and then I don't really have a collection of patterns with known behavior to test the script against. And once your rules are converted, it's a fairly good bet the script would never get used again.

I guess I'd suggest a semi-automated solution -- make a template Golly rule table for each different number of states in your collection of rules, and then just write a custom search-and-replace routine to drop the numbers from each rule string in the correct location in the template. Besides those numbers at the end of each rule line, I think only the rule name will have to change.
I have a simple script for recursive change of rule names. Board size and topology settings can also be removed, unless one was deliberately running some pattern in torus topology.

By the way, I just checked: Rules without the F flag consider only state 1 firing and the rest are treated as dead. So lines with 0s are not good in any of these rules. If I would have 100 rules, I would definitely write a script, but I am already done with my collection (just 4 rules). Checking them now.

Post Reply