Ok, you got a runable executable from the MGS distribution web page and you want to write your first MGS program. Before going further, note that MGS is an experimental programming language, mainly used as a vehicle to test and validate ideas in unconventional programming. So, beware that the syntax is especially fluctuating with the interpreters version. This warning done, here are some information to help you to write your first MGS program.
Long ago, we have started to write an MGS introduction:
In a second step, take a look at the example in the MGS gallery: all examples include snipets of commented code.
Then dowload the compressed tar file containing the complete coding of the examples presented and developed in the following two papers:
After downloading the tarball (mgs_code_example.tgz
) you decompress it (on linux tar xvzf mgs_code_example.tgz
) which gives you a directory Code
containing the following file:
fnd.mgs
fnd2.mgs
quadtree.mgs
fraglets.mgs
tshaped.mgs
contains the 3 models of the growth of a “T”-shape. The file annotated-tshaped.txt
contains the same code but slightly edited and with comments. But read the corresponding report before readng this file. jbview
viewer. jbview
is a Java program jbview.jar
ac.out
the output of the cellular automata model geoprox.out
the output of the model relying on geoproximal collectionchain.out
the abstract cellular complex modelt-proximal.mov
t-shaped.mov