Xref: utzoo comp.theory.cell-automata:184 comp.lang.misc:5162 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!apple!apple.com!karakots From: karakots@apple.com (Ken Karakotsios) Newsgroups: comp.theory.cell-automata,comp.lang.misc Subject: Re: Languages for programming cellular automata Message-ID: <9133@goofy.Apple.COM> Date: 13 Jul 90 20:05:44 GMT Sender: usenet@Apple.COM Organization: Apple Computer Inc. Lines: 86 References:<1142@rucs.runet.edu> In article <1142@rucs.runet.edu> dana@rucs.runet.edu (Dana Eckart) writes: > I'm interested in learning what (if any) languages have been designed > for programming cellular automata. I am aware of CAM-FORTH (used for > programming the CAM-6 machine), but am unaware of any other languages. In article hiebeler@raven.lanl.gov (David Hiebeler) writes: > CA Sim, on the other hand, supports a graphical programming system > for constructing CA rules. You get a big window full of buttons and > items that you select to construct your rule. CA Sim runs on a Mac > and was written by Ken Karakotsios, who reads this newsgroup. Ken, > maybe you'd like to summarize the features in CA Sim that help users > construct rules? My intention was to design a method for programming CA rules without making the user write code. I wanted something that could be programmed without worrying about syntax, or where to find a compiler, or how to link in code, etc. I wanted every rule entered by the user to "run", though it may not do what the user intended if there is a "mistake" (I've run across a few interesting rules that were "mistakes"!). This is sort of the "pocket calculator" approach. The negative aspects are 1: Execution speed and 2: Flexibility. Because the user defined rules are not compiled code, nor a look-up table, they are not as fast as "hard-wired" rules. Also, the language allows a large but finite number of different rule algorithms (I estimate that there around 2^107 rules possible with this implementation of the programming method). The basic scheme is to build up a rule out of between 1 and 128 steps (for a single generation of the CA), where each step is called a "Simple Rule" (SR). Each SR is specified by a "dialog box" which contains buttons, check boxes, and number fields. You program the rule by clicking on buttons and check boxes with the mouse, and by setting values in the number fields. The dialog box (for a single SR) is divided into 6 regions: 1) Trigger Region: Describes which cell states (values) trigger this particular SR. If an SR is triggered for a particular cell, then a new value is computed for that cell. 2) Neighborhood Region: This has a grid of checkboxes which define the neighborhood of the cell which is being updated. You click on the cells which make up the neighborhood you want to include for this particular SR. 3) Function Select Region: You pick from a predefined set of operations on the selected neighborhood (sum, average, min, max, etc...) to compute an intermediate value called F(n). This value is used in the following regions. 4) Function Test Region: The value F(n) is tested against some criteria which you set. The criteria are either: A: See if F(n) falls within some range, or B: see if F(n) has some particular relationship to the current value of the cell being updated. The result of this test is used to select between one of the two following regions. 5) Test True Region: If the result of the test is True, then this region specifies how to compute the new value of the cell. You can pick two operands from a list of choices, and select either a logical or an arithmetic operation to be done with the operands. The result of this operation is the new cell value. (This value can be further modified in the current generation by more SRs). 6) False Test Region. If the result of the test is False, then this region specifies how to compute the new value of the cell. You can pick two operands from a list of choices, and select either a logical or an arithmetic operation to be done with the operands. The result of this operation is the new cell value. (This value can be further modified in the current generation by more SRs). (I apologize if this description is somewhat unclear; it could really benefit from some pictures.) Life can be implemented in two SRs. I have just figured out how to model hexagonal lattices with these user programmable rules. I'll try and post more info (and a few custom rules) on this next week. Like most first generation designs, my programming scheme falls far short of the ideal. I have ideas for extensions and improvements; now if can just find the time... Ken Karakotsios karakots@apple.com In cyberspace, no one can hear you sneeze...