diff --git a/docs/rtfm/gem-graph.texi b/docs/rtfm/gem-graph.texi index 1aabc24..76f585c 100644 --- a/docs/rtfm/gem-graph.texi +++ b/docs/rtfm/gem-graph.texi @@ -16,6 +16,8 @@ Texts. A copy of the license is included in the section entitled @end quotation @end copying +@defindex au + @titlepage @title Gem-Graph Manual 1.0 @page @@ -36,15 +38,16 @@ Gem-graph lets you move and transform drawn objects using an automaton. It's an @sp 1 However, a certain amount of effort will be required to achieve this. A complicated model will require more work than a simpler one, but it is possible to start with something quite simple and develop it step by step. In any case, you must draw what you want to see and say how you want it to be transformed. Gem-graph cannot do that for you. However, it does have powerful tools to help you. Gem-graph - short for 'geometric graph' - is a redrawing system. Its strength lies in the fact that it deals only with very simple drawing elements, all of which are similar. All the static information - your initial drawing - is an arrangement of these elements in the space. All the dynamic information - your redrawing rules - transform what you draw as you wish. All the gem-graph rules, whatever their complexity, are only associations of an unique simple pattern: one condition on one element of the drawing triggers one action on the same element. Due to this very simple structure, any set of complex rules, no matter how many there are, can always be processed automatically by the gem-graph automaton. The tools provided by gem-graph give you access to this power to create and animate your drawings, and this manual is here to help you learn how to master them. @sp 1 -One way of doing this is to reproduce very simple examples, such as when a programming language asks you to write "Hello world". For gem-graph, the equivalent of "Hello world" will be to move a small line on your screen. This example and other simple ones that follows will progressively give you an approach of what gem-graph can do and enable you to build and animate much more complex drawings that suit your desires. If you like learning this way, @xref {node_gem_graph_by_example, Gem-graph by example, Hello world, Gem-graph by example}. If you prefer to learn by reading what the commands you see on the screen are doing, they have been detailed here (_learn_commands). The table of contents is another way to learn. It goes from the simplest to the most complicated. How to set up a simple model (_simple_model), observe it (_simple_observation), measure what it does (_simple_measurements) and display the results (_simple_results), then transform it by changing what you see (_simple_state_edition) and how it reacts (_simple_rule_edition). You can directly deal in with the details of gem-graph mechanism itself (_gem_graph_mechanism). You may also whish to compare gem-graph to other classes of automata that do quite similar things (_spatial_automata_classification), and examine what it can and cannot actually do and what its scope of application is (_gem_graph_theory). +@anchor {intro_hello_world} Reproducing very simple examples, such as when a programming language asks you to write "Hello world", is one way of learning. For gem-graph, the equivalent of "Hello world" will be to move a small line on your screen. This example and other simple ones that follows will progressively give you an approach of what gem-graph can do and enable you to build and animate much more complex drawings that suit your desires. @xref {node_gem_graph_by_example, Gem-graph by example, Hello world, Gem-graph by example} if you like learning this way. If you prefer to learn by reading what the commands you see on the screen are doing, they have been detailed here (_learn_commands). The table of contents is another way to learn. It goes from the simplest to the most complicated. How to set up a simple model (_simple_model), observe it (_simple_observation), measure what it does (_simple_measurements) and display the results (_simple_results), then transform it by changing what you see (_simple_state_edition) and how it reacts (_simple_rule_edition). You can directly deal in with the details of gem-graph mechanism itself (_gem_graph_mechanism). You may also whish to compare gem-graph to other classes of automata that do quite similar things (_spatial_automata_classification), and examine what it can and cannot actually do and what its scope of application is (_gem_graph_theory). @node node_gem_graph_by_example @chapter Gem-graph by example @cindex Gem-graph by example +@cindex Automaton @section Hello world @cindex Hello world -@anchor {hello_world} Our "Hello world" is the simplest program that gem-graph can execute. It consists of a single short arrow, which moves in a straight line in a single direction. To do this, we first had to draw this little arrow and then make it move. The result is certainly not very exciting, but this example is enough to show how a gem-graph drawing is made and how it is animated. One rule and one state are enough. The rule only says: if an arrow is drawn here, I erase it and redraw it on the next square. For the moment, you can ignore how the automaton works (the details are in _gem_graph_mechanism). The model is assumed to evolve in a small flat space which is described here (_hello_world_space). All that gem-graph needs to know to execute such models is written in the "Hello world" file (_hello_world_file). Note that all the gem_graph models will have basically the same structure, making them easy to copy and share. How to execute this example is explained here (_hello_world_exec). You can now detail this first example (_hello_world) or skip and continue reading to have a first approach of what the next models will show you. +@anchor {hello_world} Our "Hello world" is the simplest program that gem-graph can execute. It consists of a single short arrow, which moves in a straight line in a single direction. To do this, we first had to draw this little arrow and then make it move. The result is certainly not very exciting, but this example is enough to show how a gem-graph drawing is made and how it is animated. One rule and one state are enough. The rule only says: if an arrow is drawn here, I erase it and redraw it on the next square. For the moment, you can ignore how the automaton works (the details are in _gem_graph_mechanism). The model is assumed to evolve in a small flat space which is described here (_hello_world_space). All that gem-graph needs to know to execute such models is written in the "Hello world" file (_hello_world_file). Note that all the gem_graph models will have basically the same structure, making them easy to copy and share. How to execute this example is explained here (_hello_world_exec). To go back to the Introduction: @pxref {intro_hello_world, Back to Gem-graph Introduction, Reproducing simple examples} @sp 1 @section Random walk @cindex Random walk @@ -67,9 +70,56 @@ Once the addition automatically operated, we see little lines moving simultaneou @sp 1 This resulting model, because it shows a multitude of diverse and simultaneous movements, perhaps gives the impression of a more complex system. It would be easy to make it even more complex, by trying to represent, for example, the traffic of a city in all its diversity, a video game or the metabolism of a cell, but the value of the gem-graph is the way in which it can be used to analyse and control this complexity. At this point, it's time to take a look at the mechanism (_gem_graph_mechanism) and theory (_gem_graph_theory) of gem-graph and compare gem-graph to other classes of automata that do quite similar things to better understand how the profound simplicity of its automaton allows it to embrace such a wide range of situations and behaviours simultaneously but also what it can and cannot do easily and what its scope is (_spatial_automata_classification). +@node gem_graph_commands +@chapter Gem-graph Commands +@cindex Commands +@anchor {commands} Gem-graph opens with an overview that lets you see at a glance the current state of your model, the rules at your disposal and some measurement results if you have selected any. +@sp 1 +Your first desire may be to see how the model behaves in motion. A panel contains all the commands you need to do this: run/stop, slow down/speed up, step by step, do/undo/redo. +@sp 1 +Another group of controls lets you rotate your model, zoom in, etc. to view it from the best angle. These controls are grouped together in a 'camera' panel. +@sp 1 +Gem-graph opens in "run" mode. The only other mode available is "edit" mode. These two modes are incompatible: you can either run the model or edit it, but not both at the same time. The command for switching from one state to the other is at the top left of the title bar. +@sp 1 +Other more specific commands are possible, but they can only appear if you have first defined the objects or situations that are of particular interest to you in your model. You can then colour them in or change their relative transparency so that you can see them clearly. +@sp 1 +From the overview panel, you can move to the state, rules, measurements or results panels. Only one of these panels/screens is visible at a time. The buttons that allow you to move from one to the other are in the left-hand title bar, just next to the exec/edit button, which is furthest to the left. +@sp 1 +@section Rules panel +@cindex Rules panel +@anchor {rules_panel} The rules panel is in fact a combination of two panels: one devoted to the rules tree, the other to a rule you may have selected to study or modify. As it is often useful to switch from one view to the other, it's nice to have one next to the other and to be able to enlarge either one easily. +@sp 1 +@section Open / Close / Save +@cindex Open / Close / Save +@anchor {Open/Close/Save} Open / Close / Save +@sp 1 +@section Help +@cindex Help +@anchor {help} Help + +@node simple_models +@chapter Simple models +@cindex Simple models +@anchor {simple_model} The aim of this chapter is to make it easier to learn gem-graph by working in more detail on very simple models. +@sp 1 +It is very easy to complicate a model. Sometimes all you need to do is add an object or a rule and the complexity increases exponentially. + +@node gem_graph_mechanism +@chapter Gem-graph Mechanism +@cindex Gem-graph Mechanism +@cindex Automaton +@anchor {mechanism} + +@node randomization use +@chapter Randomization +@cindex Randomization +@anchor {randomization} + @node gem_graph_theory -@chapter Gem-graph theory -@cindex Gem-graph theory +@chapter Gem-graph Theory +@cindex Gem-graph theory +@cindex Automaton +@anchor {theory} To calculate, you first have to represent. In an equation, the letters represent the objects. The other symbols are the operators. In gem-graph, the objects - or rather the situations - are drawn. The operators are the rules that modify these drawings. @section Models addition @cindex Models addition @@ -102,6 +152,8 @@ Certains phénomènes participant à des phénomènes complexes sont décrits de - écriture dans le modèle continu des modifications effectuées par le modèle gem-graph au moyen d'une action ('assignment') spécifique. A cette date (nov 2024), cette technique n'a jamais été testée. +@auindex Wishart, D. S. +@auindex Smith, A. References Smith, A., P. Turney, et al. (2002). JohnnyVon: self-replicating automata in continuous two-dimensional space. NRC Publications Archive. Wishart, D. S., R. Yang, et al. (2005). Dynamic cellular automata: an alternative approach to cellular simulation. In Silico Biol 5(2): 139-161. @@ -120,6 +172,10 @@ Ce couplage suppose remplies toutes les conditions suivantes: écriture dans le modèle continu des modifications effectuées par le modèle gem-graph au moyen d'une action ('assignment') spécifique A cette date (nov 2024), cette technique n'a jamais été testée. +@section Spatial automata classification +@cindex Spatial automata classification +@anchor {spatial_automata_classification} Spatial automata classification. Scope definition... + @section History @cindex History @anchor {history} (cf. https://forge.a-lec.org/gem-graph/Gem-graph/issues/11) @@ -127,9 +183,13 @@ La conception d'une modélisation par réécritures de graphes géométriques s' De 1992 à 2020, chaque étape du développement a entraîné la réorganisation partielle ou complète du logiciel (structures de données, nommage et algorithmes) (ref) en réponse à des contextes historiques particuliers: + @auindex Francisco Varela + @auindex Humberto Maturana 1974 Le concept d'autopoièse (Francisco Varela & Humberto Maturana) (ref) Redéfinition de l'autopoièse : persistance + liaison entre constituant d'un même individu Isoperformance (relation complexité / efficience de tous les composants d'un individu) + @auindex Christopher Langton + @auindex John Horton Conway Christopher Langton: 'Life as it is' versus 'Life as it could be' Le 'jeu de la vie' John Horton Conway en 1970 :un système formel Turing-complet Le paradigme des automates cellulaires (ref) @@ -186,37 +246,44 @@ Principales innovations successives: Parallélisme (premiers tests) Arbre des conditions Séparation des projets gem-graph (nommé fin 2020) et des projets biologiques - (aXoris,nommé vers 1995) + (aXoris, nommé vers 1995) gem-graph est adapté à la représentation de tous les phénomènes complexes + +@auindex Adrien 'neox' Bourmault +Fin 2020, Adrien 'neox' Bourmault a eu connaissance de ce travail et s'y est intéressé. + Son analyse et ses recommandations ont impulsés une réécriture complète du code mais surtout une profonde réorganisation des méthodes. Ce qui était jusque là une recherche artisanale a pu s'orienter, grâce à son expérience et à sa rigueur, vers un travail d'équipe avec l'objectif d'atteindre une qualité suffisante pour attirer de nouveaux développeurs (et la labellisation GNU Project ?). Cette première version témoigne à tous les niveaux de son implication. + Ses principaux apports ont été théoriques (choix d'une architecture modulaire client-serveur, conception 'système' et non plus seulement objet, méthodologie de développement, planification) et pratiques (choix d'une palette d'outils libres, actualisés et de qualité garantissant la cohérence de l'ensemble du développement: Guix, langage C, git, langage C, Libxml, Makefile, GTK4, OpenGL, Doxygen, Texinfo, LaTeX). -En 2021, gem-graph a été réorganisé : - - Architecture modulaire client-serveur - Conception 'système' et non plus seulement objet. (ref) +Les principales étapes de cette réorganisation on été: +En 2021, Architecture modulaire client-serveur Redéfinition du fichier XML avec notation des règles sous forme d'arbre de conditions. + GIT +Début 2023 langage C, LibXML, OpenGL, +Automne 2024 Doxygen, Texinfo Cette réorganisation a mis en évidence : - Le sous-ensemble des flèche-origine (éligibles comme origine de l'espace local) - Les autres modes d'écriture possible des flèches (départ-arrivée, départ + module + angle) - Le parcours de l'espace local est encodé par l'ordre des conditions dans l'arbre. - => abandon des parcours séquentiels de listes de règles. - => plusieurs parcours sont possibles (auparavant : le seul parcours spirale). - => le parcours peut être optimisé pour chaque modèle. - => ce travail d'optimisation (le choix d'un parcours) est attribué au client. - => le client fabrique donc l'arbre que le serveur utilisera. - Le cycle de vie du modèle : correction des erreurs reproductibles puis aléatoires. - Les outils nécessaires pour ces deux phases de la conception du modèle. + Le sous-ensemble des flèche-origine (éligibles comme origine de l'espace local); + Les autres modes d'écriture possible des flèches (départ-arrivée, départ + module + angle); + Le parcours de l'espace local (espace de travail) encodé par l'ordre des conditions dans l'arbre + => abandon des parcours séquentiels de listes de règles + => plusieurs parcours possibles (auparavant : le seul parcours spirale) + => optimisation souhaitable (par le client) du parcours pour chaque modèle + (dans tous les cas, la fabrication de l'arbre que le serveur utilisera incombe au client) + Le cycle de vie du modèle : correction des erreurs reproductibles puis aléatoires; + Les outils nécessaires pour ces deux phases de la conception du modèle; Fixation (en cours) du vocabulaire / création d'un glossaire. Réferences: (_bibliogaphie, _méthodologie) +@auindex Jean 'jean' Sirmai Sirmai, J. (2011). A Schematic Representation of Autopoiesis Using a New Kind of Discrete Spatial Automaton. Advances in Artificial Life, ECAL 2011, MIT Press. Sirmai, J. (2012). Autopoiesis Facilitates Self-Reproduction. Advances in Artificial Life, ECAL 2012, MIT Press. Remerciements +@auindex Sebastien 'seb' Boisard Sébastien Boisard que j'ai rencontré début 1994 a contribué à ce projet en construisant, en C, un premier parseur des règles (efficace). Il pensait en avoir "pour quelques jours" (sic). Il a entrepris ce travail à l'automne 1996 et l'a achevé en février 1998. Puis il est parti 'monter sa boite' et est devenu ingénieur au CNRS. Notre collaboration a été un bonheur et je le remercie profondément pour tout ce qu'il m'a appris. @@ -230,6 +297,12 @@ La réécriture de graphes géométriques est aussi une expression artistique. L L'auteur de ces lignes a dégagé les principes de gem-graph et réalisé ses premiers prototypes de 1992 à 2020. Il s'est autorisé à rêver et à publier ses rêves, sans avoir réalisé que la réalisation de chacun d'eux coûterait des années d'effort. Puissent-ils cependant encourager l'expression et la liberté de chacun ! Il espère que ses erreurs seront fécondes et qu'aussi longtemps qu'il sera porté par l'enthousiasme, l'audace et la patience, le projet gem-graph éclairera ceux qui lui font confiance. -@unnumbered Index +@node Author Index + +@unnumbered Topics & Concepts Index @printindex cp +@sp 1 +@unnumbered Authors Index +@printindex au + @bye