This will guide through the steps from design to execution of the AntWorld Simulation ************************************************************************* 1. Let F be a new folder. Add the pydevs (simulator) and ATOM3 (meta-model) folders in F. 2. First load (press [F3]) the AntWorld formalism from User/User Formalisms, select AntWorld_META.py and create your own initial model Note if you to reuse our input model open ([Ctrl-O] and browse) the Initial_MDL.py model 3. Load the ModelCompiler formalism 4. Press on [COMPILE], the red button to compile the current model and choose F/ATOM3 as the destination folder. Rename the file model.py to Graph.py 5. Press [F4] to close the ModelCompiler formalism 6. Press [F3] to load the TransformationToolbar formalism from the Central Formalisms 7. Press on [LOAD], select User Models and browse to User Formalisms/AntWorld/GraphGrammar/AntSimulator_GG_mdl.py Now you have the set of all the graph rewriting rules. 8. If you wish to modify any rule, do so and press [Save] followed by [Cancel]! (don’t touch the [OK] button) 9. To compile the rules into MoTif-readable rules, press [CGEN] 10. In the second textbox browse for the path to F 11. Press [Compile]. Now we have all the rules compiled. The compiler does not yet take into account complex constraints. So, for the time being, you need to manually add them in the compiled code. In our example, this happens for the rules: 1. antBirth (foodParts > 0) 2. createFoodForMainAxisNode1, 2 and 3 (nodeCounter == 9, 8 and 7 % 10) 3. createFoodForGridNode (nodeCounter == 9) 4. evaporate (pheromones > 0) 5. goToNodeWithPheromones (pheromones > 9) 6. grabFood (foodParts > 0) We now need a MoTif control structure 12. Press [F4] twice (to close the two formalisms) 13. Press [Ctrl-O] to open the highest hierarchical level of the MoTif model called Rules_MDL.py in AntWorld/MoTif Model 14. Press [GENCODE]. In the first textbox browse to User Formalisms/AntWorld/MoTif Model, in the second browse to F. Press [Compile]. 15. Close AToM3 (MoTif runs outside AToM3) 16. In F, move all the files from DEVS Code to F 17. Create an empty file called __init__.py in rules 18. Double click on MoTifExecutor.py to run the transformation/simulation.