MCell

What is MCell
Mirek's Cellebration (MCell) is a web application designed for exploring and creating new patterns and rules of 1-D and 2-D Cellular Automata (CA). It is a modern successor to MCell for Windows developed back in 1999. The current version supports 13 different CA families: Life, Generations, Weighted Life, Vote for Life, Rules tables, Cyclic CA, 1-D totalistic CA, 1-D binary CA, General binary, Neumann binary, Larger than Life, Margolus, and Weighted Generations.
MCell supports different neighborhoods (e.g., Moore 8 and 9, von Neumann 4 and 5, Margolus, and others with varying neighborhood ranges). Each family contains many built-in rules, including the well-known Conway's Life, HighLife, Day and Night, Long Life, Diamoeba, Fredkin, Vote 4/5, Brian's Brain, Star Wars, RainZha, Swirl, HGlass, Midges, Sticks, Career, Venus, WireWorld, and many more. Some rules have never been seen in any other software; they were discovered by the author, his family, and MCell users. All rules are illustrated with carefully designed patterns.
MCell handles many popular formats of Cellular Automata patterns (Life 1.03, Life 1.05, Life 1.06, RLE, dbLife, Xlife, MCLife, MCell, and variations of these formats) from both UNIX and Windows, making it a perfect tool for viewing large collections of Cellular Automata patterns available on the Internet.
MCell is open-source software, distributed under the "MIT License with Attribution Requirement." The full source code is available on GitHub.
Selected MCell features
- 1-D and 2-D Cellular Automata.
- 13 different CA families: Life, Generations, Weighted Life, Vote for Life, Rules tables, Cyclic CA, 1-D totalistic CA, 1-D binary CA, General binary, Neumann binary, Larger than Life, Margolus, Weighted Generations
- Support for different neighborhoods: Moore 8 and 9, von Neumann 4 and 5, Margolus, neighborhood ranges.
- Support for many different file formats: Life 1.03, Life 1.05, Life 1.06, RLE, dbLife, Xlife, MCell and variations of the above.
- Many predefined rules for each family.
- 1500+ patterns.
- Works in all major browsers and on mobile devices.
- Rich user interface, zooming, panning, auto-fitting patterns, keyboard shortcuts to many MCell functions.
- Built-in Patterns Explorer.
- Support for up to 256 states/colors of cells.
- Configurable simulation speed, step-by-step simulation, run for/up to a specified number of generations.
- Ability to experiment with custom rules in all supported families (only as text definition a.t.m.).
- Saving and loading patterns via Clipboard.
- Desktop drag-and-drop support for loading local patterns.
- Advanced editing features: scribble; draw dots, lines, rectangles, boxes, circles, discs; select, cut, copy, paste, drag and drop, flip, rotate, invert.
- Interactive drawing without pausing the simulation.
- Randomizing and Seeding patterns.
- Configurable, event-driven Undo and Redo.
- Simple statistics.
- Dark and light themes.
- Diversities: cell stream injection, noise, hot zones, and black holes.
- And more...
History of MCell
My first Cellular Automata program, MLife (Mirek's Life), was born on January 8th, 1999, as a result of one long evening. It supported only the 23/3 Life rule. At the time, I didn't consider rules or cell states beyond this, nor did I anticipate the hundreds of features available in today's version. I never expected this newfound hobby to last so long...
I first read about "Conway's Life" in 1980, in a fascinating Polish scientific periodical called "Problemy." I was deeply intrigued by Life, which preoccupied my mind for quite some time. I filled several chequered notebooks tracing the destiny of small patterns. Since none of my friends shared my interest, Life was quickly forgotten. A note to younger readers: The internet was not available back then.
Nearly 20 (!) years later, on New Year's Eve 1998/1999, I was watching the fireworks and suddenly recalled Life. I thought, "Let's see if this can interest me again." One week later, I sat down and started thinking: "How was it? Were 2, 3, or 4 neighbors necessary to start a new birth?" I remembered the glider well enough and, an hour later, I was sure it must be 23/3. I grabbed the Delphi compiler I always wanted to learn and started programming.
"Let's make a 100x100 grid," I thought. "Yes, so large; computers have ample memory today." "Let's apply rules to random cells." One hour later: "Darn! I need another table in memory. No chance to perform rules on one table. Wow, now it works!" "Let's add a Go button." "Ready. Let's call it Mirek's Life."
That was all I thought was necessary to play with Life. I was proud and happy: "I don't need to waste paper and pencils anymore!" And I played with patterns each evening.
Then I made a mistake. I typed "Life, cell, grid" into Altavista (a search engine used back then) to see if anyone else remembered Life. I found the LifeX program. Wow! So many perfect ideas! Saving patterns! ASCII export! What? Rules? Wait, isn't "23/3" the ONLY possibility? One week later, I had downloaded several different programs and realized that Life was not limited to what I had programmed in MLife. Those programs could do a lot more. I even thought it made no sense to write another one. But... all those programs had such strange user interfaces. I would have had much more fun if I programmed what they could do, but with another interface. It couldn't be much work... And it began.
In two weeks, I was happy again. My app could load and save patterns. I could load most patterns from popular libraries. But then I stumbled upon the CAV program by Jean-Philippe Rennard. "Hey, what's this about?" I thought. Cellular Automata? Colors? States? History? Vote? It couldn't be that my program didn't handle it. And soon, it could. I renamed it to MCLife (Mirek's Colorful Life). I could sit again with my daughters and play with rules and patterns. One evening, we discovered the "Star Wars" rule, the most interesting rule we had seen so far.
The next milestone was the Fast Java Applet by Alan Hensel and Life32 by Johan Bontes. Alan showed me how small my universe was and how fast Life could be. Johan showed me that not only I liked nice user interfaces. And I had much work again. By the middle of April 1999, I said, "It's enough for now. True, Alan and Johan's programs are still faster, but MCLife has other advantages. It's time to show the program to others, let's see what they think about it."
In late 1999, I was contacted by Professor David Griffeath and Lawrence F. Gray from the University of Wisconsin. I got the chance to work with them on a unique project using Cellular Automata to model the behavior of traffic flow on highways. David also came up with a cool idea for the name of my program: MCell, "Mirek's Cellebration."
Over the next few years, a lot happened in the field of Cellular Automata. I met many passionate people and worked with them on CA rules, families, and patterns. Some notable individuals I collaborated with included Alastair Couper, Mikhail Diakonov, Professor Rudy Rucker, David I. Bell, Kamil Przybyla, Ed Pegg Jr., Ben Schaeffer, John Elliott, Tomoai Suzudo, David Lowenstein, Jack Ruijs, Jason Summers, Stephen Silver, Paul Schick, Rob Trujillo, Michael Sweney, Professor Marc Eisenstadt, Brian Behlendorf, Martin Schaller, James Matthews, Lionel Bonnetier, Charles A. Rockafellor, Brian Prentice, David Macfarlane, Pawel Siwak, Robert Jaskula, Kyle McCord, Krzysztof Wójtowicz, Andries Visser, Adrian Leatherland, Giles Edkins, to name just a few.
In 2002, Stephen Wolfram published his famous book "A New Kind of Science." MCell and its author were mentioned in it. I was thrilled to see the program was used in several scientific experiments.
In 2004, I moved with my family to Canada. The new environment, new friends, and new work left me with little time to play with CA. Meanwhile, the Delphi compiler became less popular, making it difficult to maintain MCell. Rewriting it from scratch in a new language was too daunting... I gave up.
The year is 2024. The incredible progress of artificial intelligence suddenly made me realize I could give MCell new life with relative ease. I tried, and I was shocked at how quickly I got something working. I decided to rewrite the program in JavaScript and release it as a web application, making it available to everyone. Within two weeks, all major features were implemented. I'm going to make it fully open source. Let's see if anyone will contribute.
-- Mirek Wojtowicz, Dec. 28, 2024
.mcl data format
.mcl Cellular Automata pattern file format has been introduced with MCLife 1.20, and later continued in MCell for Windows and MCell for Web. It is an ASCII format combining both Life 1.05 and RLE, and introducing extensions necessary to store all MCell features.
The file in the latest syntax version 4.20 can contain the following keywords:
#MCell |
The file type and version specifier. Example: #MCell 4.20 |
#GAME |
Optional game type, one of: 'Life', 'Generations', 'Weighted Life', 'Vote for Life',
'Rules table', 'Cyclic CA', '1-D binary', '1-D totalistic', 'Neumann binary', 'General
binary', 'Larger than Life', 'Margolus', 'Weighted Generations', 'User DLL', 'Special
rules'; default is 'Life'. Example: #GAME Generations |
#RULE |
Optional rule expressed as text; default is '23/3'. Since the version 2.30 long rules
can be split into several #RULE lines. Example: #RULE 345/34/6 or #RULE NW4,NN1,NE0,WW1,ME0,EE4,SW0,SS4,SE1,HI0,RS2,RS6, #RULE RS7,RS9,RS11,RS12,RS13,RS14,RS15,RB11 |
#SPEED |
Optional game speed, 0..5000. 0 is fastest, 5000 is 5 seconds per generation; if the
parameter is missing, default is 'no change'. Example: #SPEED 50 |
#BOARD |
Optional board size nn x mm; if the parameter is missing, default is 'no change'.
Example: #BOARD 300x300 |
#CCOLORS |
Optional number of states (colors), 2..256; if the parameter is missing, default is
'no change'. This parameter is ignored in rules explicitly defining the number of
colors, for example in Generations family. Example: #CCOLORS 16 |
#COLORING |
Optional coloring method for rules without history. 1 is standard, 2 is alternate; if
the parameter is missing, default is 'no change'. Example: #COLORING 2 |
#WRAP |
Optional 'wrap at edges' flag, 1 or 0; if the parameter is missing, default is 'no
change'. Example: #WRAP 0 |
#PALETTE |
Optional color palette name. Example: #PALETTE MCell |
#D |
Optional description (comment) line; there is no limit to the count of description
lines. Example: #D Another interesting small starting pattern |
#L |
The data line in extended RLE syntax, supporting up to 256 cell states:
Examples: |
#DIV |
Optional diversities. #DIV #SYSTEM - diversities activity switch, #DIV #NOISE - noise parameters, #DIV #BHOLE - black hole parameters, #DIV #SNOVA - supernova parameters, #DIV #STRIN - string injection parameters.
Examples: |
Altough there is no limit to the lines length, MCell choses to save lines not longer than 70 characters.
All keywords except for #MCell are optional.
An example of an .MCL file:
#MCell 3.00 #GAME Generations #RULE 3467/25/6 #SPEED 20 #BOARD 300x300 #WRAP 0 #D #D The universe of Worms. #D #D Discovered by Mirek Wojtowicz #D 1999.04.08 #L ..DE.DED$.CE.E.DD$BDBABBC$.CACCEC$.A.BD.B$..B3C$3.3A$..4A$3.AA31$8.AA$ #L 7.4A$7.3A$7.3CB$6.B.DB.A$6.CECCAC$6.CBBABDB$5.DD.E.EC$5.DED.ED