*

Code émergent, Emergent coding

Michel Bret (2022), honorarius professor laboratory INReV-ATI University Paris 8

English    Français

























Introduction
Self-organization and autonomy
The arrow of time
classical programming
live coding
emergent coding
auto programmation
example
Bibliography

























Introduction

It was only after nearly half a century of programming practice that I realized that I was pretty bad and that my programs were full of bugs (but I´m not the only one, just take a look on the internet to find yourself confronted with countless interfaces, applications and programs of all kinds that are obviously buggy ...), on the other hand I am quite good at inventing algorithms. I therefore undertook to think about an "emergent coding" which would entrust the machine with the task of programming, thus freeing the creators from the constraints imposed by formal languages.
Inspired by my practice of painting which aimed to produce works resulting from a rational reflection (simply in order to make them achievable) but modulated in their executions by emotional feelings (like listening to music on a loop ), I was making a system capable of producing code by interpreting, for example, gestures, music or images.
In the 70´s computers were horrible little books limited to spitting columns of figures, there was no screen or mass storage, no advantage of systems and even less programs, it was a chance because everything was then to be invented and within the realm of the possible. I therefore decided, in 1980, to write a compiler and I had the good idea, although not seeing the immediate usefulness of it, to make it dynamic, which made live live coding possible then, later, the emergent coding.
This "letting go" is another name for autonomy, the consequences of which are scientific [Moreno 2004, artistic [Bret 2006] [Bret 2008], social or even political.



















Self-organization and autonomy

Self-organization designates a process of spontaneous formation of a dynamic order resulting from the interaction of elementary units and capable of producing actions which, through feedback, contribute to the very constitution of this autonomous behavior. In 1952 Alan Turing, proposed a model of self-organization: far from equilibrium, irreversible processes can generate a coherent activity of matter (dissipative structures). While near equilibrium, the evolution of the system is determined by the boundary conditions, far from equilibrium it is the seat of "self-organization" phenomena.

The arrow of time

Physics had established deterministic laws governed by reversible time: the differential equations of classical mechanics make it possible both to go back into the past (negative time) and to predict the future (positive time). But there are a number of irreversible phenomena, for example if certain points of a surface are heated randomly and allowed to cool there is no way to find the initial configuration, it is the arrow of time. In 1890 Henri Poincaré showed that, if it is very easy to solve Newton´s equations of motion for 2 bodies interacting gravitationally, on the other hand, for 3 bodies, there appears a sensitivity to the initial conditions (which can never be infinitely precise) making impossible any prediction of the evolution of the system for very close initial conditions. This is the theory of chaos (1970s) which consists in replacing the variations of parameters as a function of time by trajectories of solutions in phase space.

classical programming

it follows the following scheme:
   code -> compile -> langage machine -> link -> executable
Any modification of the code requires that the modified program be recompiled and relinked, which can take a certain time (of the order of a second or a minute) thus excluding the possibility of real time.

However the use of dll makes it possible to add compiled code to an executable when it is launched, but not to modify the code itself during its execution.

Such a process justifies the acceptance of the term "programmed" in the sense of frozen and it is precisely this conception that I question with the notion of emergent code which aims to make the code alive and autonomous.



















live coding

modification of the code during its execution can be done:
- via an interpreter which recompiles a line of code each time it is invoked to the detriment of performance.
- a basic assembler (for fairly simple programs)
- ChucK, SuperCollider, LC languages
- a dynamic compiler like [anyflo] which I have been developing since the 80s).
Live coding or fly coding or on-the-fly programming is a technique based on the concept of interactive programming:
- The activity of the programmer coding in real time is visualized on a screen and is part of the work, calling into question the separation between an artist supposed to be the only creator and a technician considered as a simple performer. This is a cultural as well as a political position.
- This activity can be shared by the public coding himself in real time and in interaction with the artist-programmer (via the internet or an internal network on his personal computer) thus calling into question the separation between an ´artist´ deemed to be a creator and a public considered as a simple contemplator, taking a position that is as cultural as it is political. Multi-user programming developed in the context of shared musical creation extending today to audio-visual performances, allowing full participation in the sense understood by Frank Popper [Popper-1980] [Popper-1993]. I intend to put an end to this old (very French) dichotomy between a (literary) culture and scientific-technical knowledge considered inferior because it is ignored. This archaic conception of knowledge even goes so far as to criticize the use of screens to the detriment of books by young people, thus confusing in a caricatural way the content (knowledge) and the container (the screen or the page).
It is reassuring to witness the enthusiasm of a whole youth for such events.
This "live coding" method greatly facilitates computer development, I have used it extensively in the writing and development of my software.



















emergent coding

Surrealism had proposed, with automatic drawing, the concept of a self-generated artistic creation.
This automatism can be considered as a homeostasis ensuring a non-cahotic structuring of the randomness driving the process.
Artificial dreams are not the production by machines of images or stories that can evoke our own dreams, but the state in which a machine should be in order to become the seat of such manifestations. I have shown [dream] that a dreaming device must have a reentrant neural system.
The "natural/artificial" and "living/machine" dualisms are thereby overcome in favor of a new concept, which I had proposed to name "naturartive".

"Emergent coding" consists in generating code according to sensors, the modified code is then partially compiled and assembled in real time, the executable remaining in memory (self-programming). Just as in artificial dreams, the machine does not simulate creativity but becomes the seat of artificial creativity.



It is in the design of this code generator that the artist intervenes, which supposes that he (or she) knows how to program, but can we imagine Balzac not knowing how to write or Picasso not having a perfect mastery? drawing ? The artists of the Italian quattro cento were not ashamed to know science, unlike some of today who claim to make their ignorance the very condition of an authentically artistic attitude or, on the contrary, to display a hyper technophilia only serving to hide their incompetence in the matter and which they use to deceive an uninformed public in order to gain notoriety.
This is the concept of dual competence introduced in the 1980s by Edmond Couchot [Couchot 2014] and which is the basis of the ATI-INReV training philosophy.



















self programming

Emergent coding assumes that the code can generate code, that is to say that it can modify itself, therefore that it is alive. We will then use the Artificial Life algorithms to build the emergent code:
- from the philogenetic point of view with genetic programming [Koza-1990] [Koza-1992]] consisting in producing a population of random, and therefore inefficient, programs and in making them interbreed and mutate according to a Darwinian selection aimed at satisfying certain fitness functions. It is wise to include these functions in a selection process in order to promote good adaptability of this population, ie to their survival. The role of the artist resides in the programming of the functions of fitness and that of artificial selection.
- from the ontogenetic point of view with genetic algorithms and neural networks make it possible to build entities whose behaviors are learned during their interactions with real and virtual environments.
- from the double neural and genetic point of view, the theory of the selection of neural groups has been developed by Gérard Edelman since the 80s [Edelman 1987] to account for the organization of neural networks according to a Darwinian selection: at the embryonic stage the neurons are first connected at random then, gradually, circuits stabilize, and groups of circuits are connected in turn to form maps.
I was inspired by this approach to build an artificial creation system. Changeux
Changeux [Changeux 1983][Edelman-2000] consciousness would emerge from matter.



















example

The emergent code application allows you to practice live coding and emergent coding on a ballet of virtual dancers interacting with music.

Transposed into the digital domain, "emergent coding" could just as well produce poetry, music, stories, films, interactive virtual reality installations and, perhaps, why not, scientific results emergent_codics ( mathematical theories, physical models to experiment with, etc.).



















Introduction
Auto-organisation et autonomie
La flèche du temps
programmation classique
live coding
emergent coding
auto programmation
exemple
Bibliographie





















Introduction

Ce n´est qu´après une pratique de près d´un demi siècle de la programmation que je me suis aperçu que j´étais assez mauvais et que mes programmes étaient bourrés de bugs (mais je ne suis pas le seul, il suffit de faire un tour sur internet pour se trouver confronté à d´innombrables interfaces, applications et programmes de toutes sortes évidemment bugués ...), par contre je suis assez bon dans l´invention d´algorithmes.
J´ai donc entrepris de réfléchir à un "emergent coding" qui confierait à la machine le soin de programmer libérant ainsi les créateurs des contraintes imposées par les langages formels.
M´inspirant de ma pratique de la peinture qui visait à produire des oeuvres issues d´une réflexion rationnelle (tout simplement afin de les rendre réalisables) mais modulée dans leurs exécutions par des ressentis émotionnels (comme l´écoute d´une musique en boucle), je réalisais un système capable de produire du code en interprétant par exemple des gestes, de la musique ou des images.
Dans les années 70 les ordinateurs étaient d´horribles petites bouzines se limitant à cracher des colonnes de chiffres, il n´y avait pas d´écran ni de stockage de masse, pas d´aventage de systèmes et encore moins de programmes, ce fut une chance car tout était alors à inventer et du domaine du possible. Je décidais donc, en 1980, d´écrire un compilateur et j´eus la bonne idée, bien que n´en voyant pas l´utilité immédiate, de le rendre dynamique, ce qui rendait possible le live coding puis, plus tard, l´emergent coding.
Ce "lacher prise" est un autre nom de l´autonomie dont les conséquences sont aussi bien scientifique [Moreno 2004], qu´artistiques [Bret 2006] [Bret 2008], sociale ou même politique.



















Auto-organisation et autonomie

On désigne par auto-organisation un processus de formation spontanée d´un ordre dynamique issue de l´interaction d´unités élémentaires et capable de produire des actions qui, par un feed-back, participent à la constitution même de ce comportement autonome.
En 1952 Alan Turing, proposa un modèle d´auto-organisation : loin de l’équilibre, des processus irréversibles peuvent générer une activité cohérente de la matière (structures dissipatives ). Alors que près de l’équilibre, l´évolution du système est déterminée par les conditions aux limites, loin de l’équilibre il est le siège de phénomènes d´"auto-organisation".

La flèche du temps

La physique avait posé des lois déterministes régies par un temps réversible: les équations différentielles de la mécanique classique permettent aussi bien de remonter dans le passé (temps négatif) que de prévoir l´avenir (temps positif).
Mais il existe quantité de phénomènes irréverscibles, par exemple si on chauffe aléatoirement certainss points d´une surface et qu´on la laisse se refroidir il n´existe aucu moyen de retrouver la configuration initiale, cest la flèche du temps.
En 1890 Henri Poincaré a montré que, s´il est très facile de résoudre les équations du mouvement de Newton pour 2 corps interagissant gravitationnellement, par contre, pour 3 corps, apparait une sensibilité aux conditions initiales (qui ne peuvent jamais être infiniment précises) rendant imposible toute prédiction de l´ évolution du système pour des conditions initiales très proches.
Il s´agit de la théorie du cahos (années 70) qui consiste à remplacer les variations de paramètres en fonction du temps par des trajectoires de solutions dans l´espace des phases.

programmation classique

elle obéit au schéma suivant:

   code -> compile -> langage machine -> link -> exécutable

Toute modification du code nécessite que soit recompilé et relinké le programme, ce qui peut pendre un certain temps (de l´ordre de la seconde ou de la minute) excluant ainsi la possibilité du temps réél.

Cependant l´usage de dll permet d´adjoindre du code compilé à un exécutable lors de son lancentment, mais pas de modifier le code lui-même pendant son exécution.

Un tel procédé justifie l´acceptation du terme "programmé" dans le sens de figé et c´est justement cette conception que je remet en cause avec la notion de code émergent qui vise à rendre le code vivant et autonome.



















live coding

la modification du code pendant son exécution peut se faire:
- via un interpréteur qui recompile une ligne de code chaque fois qu´elle est invoquée au détriment de la performance.
- un assembleur de base (pour des programmes assez simples)
- Les langages ChucK, SuperCollider, LC
- un compilateur dynamique comme [anyflo] que je développe depuis les années 80).

Le live coding ou fly coding ou encore programmation à la volée est une technique basée sur le concept de programmation interactive:
- L´activité du programmeur codant en temps réél est visualisée sur un écran et fait partie de l´oeuvre, remettant en cause la séparation entre un artiste supposé seul créateur et un technicien considéré comme simple exécutant. Il s´agit là d´une prise de position autant culturelle que politique.
- Cette activité peut être partagée par le public codant lui-même en temps réel et en interaction avec l´artiste-programmeur (via internet ou un réseau interne sur son ordinateur personnel) remettant ainsi en caus la séparation entre un ´artiste´ réputé créateur et un public considéré comme simple contemplateur, prise de position également culturelle autant que politique.
La programmation multi-utilisateurs s´est développée dans le contexte de la création musicale partagée s´étendant aujourd´hui aux spectacles audio visuels, permetant une participation complète au sens où l´entendait Frank Popper [Popper-1980] [Popper-1993].
Je compte bien ainsi mettre fin à cette vieille dichotomie (bien française) entre une culture (ltttéraire) et des connaissances scientifico-techniques considérées comme inférieures parce qu´ignorées. Cette conception archaique du savoir va même jusqu´à critiquer l´usage des écrans au détriment des livres par la jeunesse, confondant ainsi de façon caricaturale le contenu (le savoir) et le contenant (lécran ou la page).
Il est rassurant d´assister à l´engouement de toute une jeunesse pour de telles manifestations.
Cette méthode de "live coding" permet de faciliter grandement le développement informatique, je l´ai abondamment utilisé dans l´écriture et la mise au point de mes logiciels.



















emergent coding

Le surréalisme avait proposé, avec le dessin automatique, le concept d´une créatio artistique auto engendrée.
Cet automatisme peut êrtre considéré comme une homéostasie assurant une structuration non cahotique de l´aléatoire moteur du processus.
Les rêves artificiels ne sont pas la production par des machines d´images ou de récits pouvant évoquer nos propres rêves, mais l´état dans lequel une machine devrait se trouver pour devenir le siège de telles manifestations. J´ai montré [les machnese peuvent-elles rêver ?] qu´un dispositif rêvant devra être muni d´un système neuronal réentrant. Les dualismes "naturel/artificiel" et "vivant/machine" s´en trouvent dépassés au profit d´un nouveau concept, que j´avais proposé de nommer "naturartif".

L´"emergent coding" consiste à générer du code en fonction de capteurs, le code modifié est ensuite partiellement compilé et assemblé en temps réél, l´exécutable restant en mémoire (auto programmation).
Tout comme dans les rêves artificiels, la machine ne simule pas la créativité mais devient le siège d´une créativité artificielle.



C´est dans la conception de ce générateur de code qu´intervient l´artiste, ce qui suppose qu´il (ou elle) sache programmer, mais peut-on imaginer Balzac ne sachant pas écrire ou Picasso n´ayant pas une maitrise parfaite du dessin ? Les artistes du quatro cento italien n´avaient pas honte de connaître la science à la différence de certains d´aujourd´hui qui prétendent faire de leur ignorance la condition même d´une attitude authotiquement artistique ou, à contrario, d´afficher une hyper technophilie ne servant qu´à masquer leur incompétence en la matière et qu´ils utilisent pour tromper un public peu averti afin d´accéder à la notoriété.
Il s´agit là du concept de la double compétence introduit dès les années 80 par Edmond Couchot [Couchot 2014] et qui est à la base de la philosophie de la formation ATI-INReV.



















auto programmation

emergent coding suppose que le code puisse générer du code, c´est à dire qu´il puisse se modifier lui-même, donc qu´il soit vivant. Nous utiliseront alors les algorithmes de la Vie Artificielle pour construire l´emergent coder:
- du point de vue philogénétique avec la programmation génétique [Koza-1990] [Koza-1992]
consistant à produire une population de programmes aléatoires, donc peu performants, et à les faire se croiser et à muter selon une sélection darwinienne visant à satisfaire certaines fonctions de fitness. Il est judicieux de faire rentrer ces fonctions dans un processus de sélection afin de favoriser une bonne adaptabilité de cette population c´est à dire à leur survie. Le rôle de l´artiste réside dans la programmation des fonctions de fitness et de celle de la sélection artificielle.

- du point de vue ontogénétique avec les
algorithmes génétiques [Goldberg-1991]Les réseaux neuronaux Chazal permettent de construire des entités dont les comportements sont appris au cours de leurs intéractions avec les environnements rééls et virtuels.

- du double point de vue neuronal et génétique la théorie de la sélection de groupes neuronaux a été développée par Gérard Edelman depuis les années 80 [Edelman 1987] pour rendre compte de l’organisation des réseaux neuronaux selon une sélection darwinienne : au stade embryonnaire les neurones sont d’abord connèctés au hasard puis, progressivement, des circuits se stabilisent, et des groupes de circuits se connectent à leur tour pour former des cartes.
Je me suis inspiré de cette démarche pour construire un système de création artificielle.
Changeux [Changeux 1983] avait parlé des objets mentaux et des idées qui seraient des objets comme les autres, observables dans les réseaux neuronaux, tandis que pour Edelman [Edelman-2000] la conscience émergerait de la matière.







































exemple

L´application code emergent. permet de pratiquer du live coding et de l´emergent coding sur un ballet de danseuses virtuelles intéragissant avec de la musique.




















Transposé dans le domaine du numérique l´"emergent coding" pourrait tout aussi bien produire de la poésie, de la musique, des récits, des films, des installations intéractives de réalités virtuelles et, peut-être, pourquoi pas, des résultats scientifemergent_codiques (théromes de mathématique, modèles physiques à expérimenter, ...).

























Bibliographie

algorithmes génétiques [local] [Goldberg-1991] anyflo. [local].

Bret M.(2006) émergence et résonance neuronale [local]

Bret M.(2008) Création et autonomie [local]

Bret M.(2007) création artificielle [local].

Changeux J. P. L’homme neuronal, Fayard 1983.


Chazal G. 2000, Les réseaux du sens. De l’informatique aux neurosciences, Champ Vallon.

Couchot Ed 2014, intervention pour le forum « Du centre expérimental de Vincennes au centre universitaire des arts », Semaine des Arts de l’Université Paris 8, 2014. Double compétence
Edelman G. Neural Darwinism : The Theory of Neural Group Selection , Basic Book, New York 1987.
Edelman G. 2000, Comment la matière devient conscience, Odile Jacob.

emergent code. [local]

Heudin J.-C. (1994) La Vie Artificielle, Hermès.

Holland J.H., Adaptation in natural and artificial systems, Ann Arbor: The University of Michigan Press, 1975.
-

Goldberg D., Algorithmes génétiques, Addison-Wesley 1991

Koza J.R.: Genetic Programming: A Paradigm for Genetically Breeding Populations of Computer Programs to Solve Problems, Standfort University of Computer Science Departement Technical Report STAN-CS-90-1314, 1990 S
Koza J.R. Genetic Programming: On the Programming of Computers by Natural Selection, Cambridge, MA, USA, MIT Press, 1992

Moreno A., "Auto-organisation, autonomiie et identité", in Revue Internationale de philosophie 2004/2 (numéro 228), pages 135 à 150.

réseaux neuronaux [local]

Popper: F.Art Action et Participation, Klincksieck esthétique, 1980
Popper F. L´art à l´âge éléctronique, Hazan, 1993

Prigogine I., Stengers I, Entre le temps et l´éternité, Fayard, mai 1988

programmation génétique [local]

Turing A., « The Chemical Basis of Morphogenesis » in Philosophical Transactions of the Royal Society of London, series B, Biological Sciences (Vol. 237, N° 641), Royal Society, 1952, pp. 37-72.

Les machines peuvent-elles rêver ? [local]