-------------------------------------------------------------------------- Program: FRJ_SAP File: FRJ_SAP.TXT Copyright (C) 1995 Francois Jullien Barry McMullin This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program, in the file LICENSE.TXT; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -------------------------------------------------------------------------- Version Information: 1.0: 26th June 1995, Barry McMullin. First public release. -------------------------------------------------------------------------- This is the documentation file for the program FRJ_SAP (FRJ's Simple Autopoiesis Program). FRJ_SAP is a simple program, written in Pascal, and implementing a version of the computer model of Autopoiesis, originally described in this paper: @ARTICLE{ Varela:Autopoiesis, AUTHOR = "Francisco J. Varela and Humberto R. Maturana and R. Uribe", TITLE = "Autopoiesis: The Organization of Living Systems, its Characterization and a Model", JOURNAL = "BioSystems", YEAR = 1974, VOLUME = 5, PAGES = "187--196" } This program was originally written by: Francois Jullien CREA Ecole Polytechnique, 1 rue Descartes, 75005 Paris, France. e-mail: frj@ccr.jussieu.fr This public release was prepared, with Francois' permission, by: Barry McMullin School of Electronic Engineering Dublin City University Dublin 9 Ireland e-mail: mcmullin@eeng.dcu.ie The original program, written by Francois, was developed in the Lightspeed Pascal environment for the Mac. I (Barry McMullin) derived FRJ_SAP from that original version, by porting to the Turbo Pascal V5.5 environment under DOS. In carrying out this port I deliberately made the absolute minimum of modifications, these being largely restricted to the graphical display handling. In many cases the original code has been left in place, and simply commented out where a replacement was necessary. Please note that this program was originally written as an exercise, and was never designed or intended for general distribution. I am making it publically available now, with Francois' permission, *only* because I have been specifically requested to do so by several people who wanted to be able to play with the original Autopoiesis model on a DOS/PC platform. I do not intend to develop this program further. FRJ_SAP provides no significant facilities for user interaction. Once started, it runs for a compiled-in number of iterations before terminating (though it can be aborted early with CTRL-BREAK). Three windows are displayed. One shows the state of the space. A second shows whether or not an Autopoietic "unity" is detected as being present. The third window is used to log diagnostic messages, and is primarily used for program debugging. If you wish to vary the operation of the program in any way, you must modify the sources and recompile. I developed and tested the program exclusively under Turbo Pascal V5.5. The distributed files are: FRJ_SAP.TXT: This documentation file. LICENSE.TXT: The GNU Public License, under which the program is distributed. FRJ_SAP.PAS: The main program file. DISPLAY.PAS: Graphical display handler. GLOBAL.PAS: Global variable definitions. TURBO.TP: Turbo Pascal V5.5 configuration file. EGAVGA.BGI: EGA/VGA display driver. FRJ_SAP.EXE: Executable version of the program. The executable file FRJ_SAP.EXE requires that the EGAVGA.BGI file also be available in order to run. It should execute correctly on any DOS PC with an EGA or VGA compatible display. It can be run under MS-Windows, but only in full-screen mode. -------------------------------------------------------------------------- The following note on the internal design and operation of FRJ_SAP was provided by Francois Jullien. This was originally written in French, but Francois himself kindly made this English translation: The space where the components are, is made by a n*n array of points. Each point is a record with two fields. The first one specifies the type of the element with the folowing code: 0 substrate 1 empty 2 catalyst 3 maillon free [maillon = Link, BMcM] 4 maillon bonded one time 5 maillon bonded two times The second is a pointer of 3*3 of boolean which allow to specify, for the bonded links the directions of bonding. This array is -1..1 * -1..1. Theses coordinates are the relative coordinates of the 8 neighbours to which a link can be bonded (the central element 0,0 is not used). When there is a link with an element of relative coordinate i,j the corresponding variable of the array takes the value true (false otherwise). Here is an example: in the following situation, 0 0 0 M M 0 where M is a link bonded, 0 another element, 0 0 M the 3*3 array of the directions of bonding for the central element will be false false false true false false false false true The relative coordinates allow a fast exploration of the environnement of an element. A fast access to those coordinates is realised through 2 arrays. The first (tt_vois) contains the coordinates of the 8 neighbours, the second (vois_card) contains the coordinates of the 4 cardinal neighbours (e.g. south, north, east, west) wich are sometimes sufficient (in the case of the movement for instance). The change of a link with a neighbour in relative coordinates i,j imply the change of reciprocal link of the neighbour. We have the absolute coordinates of the neigbours by adding the absolutes coordinates of the element to the relative coordinates, and to the link to change in the neighbour by observing that, if a link is bonded in relative coordinate i,j then the second is bonded to the first in -i,-j. Lists the diverse operations (movement, bonding, production, desintegration) imply the formation and examination of lists with all types of elements, (exept for the subtrate), which avoid to explore the whole space at each iteration. The head of the lists are in an array 1..5 (head) wich countain in coordinate i the head of list of the element i. For each operation all the necessary lists are refreshed with operation such as insertion , suppression, change of list... Detection of an Autopoietic "unit": Detection of a closed chain We go through the list of the links with two bonds as long as we don't find a loop or the end of the list. For each element of the list we look at the neighbours to which it is linked. If the neighbours is also two times bonded, we go to the other neighbour etc., until - the neighbour is linked 1 times and there is no loop - we find again the first element and there is a loop Verification of the catalyst inside the loop We use a necessary condition: when you leave the catalyst in each one of the four cardinal direction you must go through an element of the closed loop. This condition is also sufficient because the probability of the reciprocal is almost null. -------------------------------------------------------------------------- If you have any comments or questions on this program, please feel free to contact me. Barry McMullin Dublin, June 1995. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | Barry McMullin, Autonomous Systems Group, | McMullin@EENG.DCU.IE | | School of Electronic Engineering, | Voice: +353-1-704-5432 | | Dublin City University, Dublin 9, IRELAND. | FAX: +353-1-704-5508 | | http://www.eeng.dcu.ie/~mcmullin/home.html | | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++