The Processing code above is based on the logic implemented in this code I posted before. I just added some random attractors, timing for agents continous initialization and a function to render the field properly. What you get with this code is (a sort of) simulation of percolation. What's interesting I guess is that you can watch the landscape continously changing over time.
The code is written for Processing 2.0 and You will need Toxiclibs and ControlP5.
N : turn on/off agent preview
T : turn on/off agent tail preview
D : turn on/off landscape preview
You can have a look at the code on my Git.
Below some screen captures of the code running:
Saturday, November 28, 2015
Thursday, November 19, 2015
As I anticipated in my last post, in order to enhance better sharing and collaboration, I just opened a GitHub account where I uploaded the already shared sketches and all the codes and ongoing experiments yet to come. You can have a look here:
For any of you not familiar with source control and GitHub or simply interested in beginning to use it properly, I strongly suggest this tutorial . and the LearnGit course on codeAcademy.
Monday, November 9, 2015
At the time this piece of code was written, I was investigating possible alternatives for pathfinding algorithms. This code came from an idea grown in my mind after working a bit with the fibrous system02 code I posted before. Fibrous system is based on proximity calculation: each agents checks distance to all other agents tail points. This is obviously computationally expensive especially when playing with big populations. The Fibrous system code was then optimized a bit introducing tree data structure, simply using Toxiclibs pointOcTree class, although you can notice improvements in the framerate only while playing with big populations. You can have a look at the code on openProcessing.
At that time I was one of the backers of (the always great) Daniel Shiffman's "nature of code" project on Kickstarter and got fascinated by the chapters about Fields and Agents. The flowField class in the sketch linked below is a modification of the field class from Shiffman's book. I just added some functions for visualization and some agents behaviors. Each agent in the sketch reads data ( direction vectors) from the correspondent field's cell and overrides the previous cell with its current direction. The field becomes a substrate for agents communication (for a sort of pathfinding) and proximity calculation is completely avoided. You can try to run the sketch with 1 Million agents if you want, you will kill the framerate, but the sketch will run (consider that the rendering functions are completely unoptimized, just using VBO the code would run much faster).
You can download the code here.
This the code I used to record this (crappy) video.
After running the sketch and let the system self organize a bit, you can press "c" to destabilize the field..the effects you will get are quite mesmerizing in my personal opinion and resemble a bit some natural behavior like slime mold diffusion .
I'm planning to upload these codes on Github too and I will start to do so from next week post on.
I have been thinking that maybe it would be generally more useful to make this publishing initiative more participatory, instead of being just me posting stuff...so:
If you have any question, critique or suggestion please drop a comment!
If you like the code and you would like to extend it in any way, we could work on it and post it again, so please drop a comment!
If you have any idea on how to use this code for a project and want to collaborate, please drop a comment!
So well yes...drop a comment!:)
below some images of the sketch running:
Saturday, October 31, 2015
Wednesday, February 5, 2014
The Red Queen Hypothesis : Chemotaxic stigmergic systems and Embodied Embedded Cognition-based strategies in architectural design
A lot of time has passed by, more then a year, but I finally decided to put on-line something about the Red Queen Hypothesis research thesis ( life kept getting in the way).
of stigmergic systems, swarm intelligence and Embodied Embedded Cognition.
The project is developed with the aim of answering the increasing redevelopment request of abandoned post-WW2 buildings in northern Italy, proposing an alternative approach to requalification through processes of intrusion, adaptation and growth, focusing on the relationships between different systems (host/parasite) and innovative fabrication techniques.
Parasiting is a phenomenon where a system exploits resources from another system to thrive and replicate. The original system is not destroyed, however, it becomes an extension of the parasiting system. In order to revitalize an abandoned factory that has become an urban landmark for the community, a parasiting strategy has been implemented through agent based systems.
Agents’ cognitive capacities to perceive the environment, that is the driving factor for adaptation through indirect coordination, have been exploited to investigate emergent and adaptive morphological configuration of semi-rigid bodies, related to existing structures and systems.
Starting from the theoretical premises found in Jeff Jones' paper “Characteristics of Pattern Formation and Evolution in Approximations of Physarum Transport Networks”, the classical multi-agent system model has been extended with chemotaxic stigmergy (the capacity of perceiving and react to chemical gradients of concentration), which has been used as cognitive substrate for a continuous feedback loop with the environment (modeled as a discreet 3-dimensioal non-isotropic voxel field with tensor data in each voxel) and for indirect coordination between agents.
Space negotiation, emergent pattern formation and performative skills have been explored through simulations of multiple populations of agents, competing for resources.
Chemotaxic approach potential has been explored on a multiplicity of scales through a series of digital simulations ranging from volume morphogenesis to surface discretization.
stigmergic grammar from Paolo Alborghetti on Vimeo.
This simulation shows 2 populations of 2500 agents fighting for space negotiation in 2D environment, but “smelling” 3d pheromone field values. Each agent smells pheromone deposition from its population mates, but eat pheromone from the other one. Pheromone field act as communicative substrate for agents relationships ( no proximity calculations here).The bi-populate system grows on z axis, casting material and non-weaving trails networks during the movement.
Fabric intrusion from Paolo Alborghetti on Vimeo.
This simulation shows further application of the stigmergic grammar applied to en existing abandoned building. Given some initial constraints ,a series of simulations have been performed ( isosurfacing the density field), producing a taxonomy of solutions , a catalogue of possible spatial configurations, between which choose the one that best fit space continuity and permeability criterias.
Softbody adaptation + EEC from Paolo Alborghetti on Vimeo.
At a larger scale Embodied Embedded Cognition (emergence of conscious and intelligent behaviour from the interaction of brain, body and world) has been experienced introducing topological shapes for the exploration of adaptive morphological capacities, through soft-body modules (via Verlet integration), instantiating agents over discrete spring-based mesh lattices. Soft-body morphologies are influenced (through gradients of spring stiffness modification) by continuous agent pheromone perception.
The final mesh configuration has been chosen after a long series of simulation on wide range of topologies with different genus. What 's been evident was that closed non-manifold meshes , was the best set up and led to more interesting spatial outcomes. Agents instanced on vertices are obliged to relate to agents / mesh vertices neighbour , avoiding mesh collapse ( often happening with open manifold meshes).
surface Growth from Paolo Alborghetti on Vimeo.
At a finer scale, thanks to the development of a custom strategy for mapping 2D simulation to 3d topological space through undistorted projections, surface's intricated tectonics are the result of multiple population of agents acting influenced by several parameters, including both performative and design-based ones.
Mesh vertices has been charged with different weight layers .Performative ones like radiation analysis (rgb values map ), FEA structural stress analys (rgb values map) . A third layer has been implemented to let the designer influence consciously the process of growth ( grey scale map, hand -painting weight mesh vertices). Proprieties and parameters of the agent cognitive system has been assigned to each weight layer (with the precise intent not to influence directly agents movements, but only their perception of the environment and their relationship with the data stored in the pheromone field).
Sensitive surface growth from Paolo Alborghetti on Vimeo.
Population of agents fight for space negotiation creating fiber-reinforced composites through two different methodologies: the first based on matter accumulation through additive deposition (compliant with contemporary additive manufacturing processes) and the second based on fibrous system through non-woven networks methodologies.
The purpose of the Red Queen Hypothesis is introduce in the computational design process increasing degrees of emergent behavior empowered by cognitive systems that are inevitably influenced by body consciousness (which is also a pivotal argument for AI cognitive protocols) and how this potential can be translated and exploited through contemporary fabrication methods (this last part is the object of future developments).
The work I just presented is just one of the multiple solutions, code logics, ideas, processes I developed and work on during the thesis period.(flickr gallery : https://www.flickr.com/photos/130523864@N03/).
Meanwhile because of the huge amount of time , and work, and life time I dedicated to this I decided to write a “Little list of receipes” for you guys , trying to highlight the mistakes I did, and the little tricks I learned from this experience.
So..here we go:
-always remember : not getting focus on one specific process/code/concept is always bad. Loose time on development of every single idea you come up with will probably take your thesis longer than expected . This is for sure the biggest mistake.
-Even if you are running totally speculative, keep in mind that you're not God or Tesla or what ever you want.
-don't stubborn on totally bottom-up ( I know that the Force is strong in you, but the dark side looks always even stronger) and too complex projects, mainly because of Control issues (which probably would deserve a whole post, given the importance of this topic). “messy computation “ (cit.), for example, could be a good alternative.
-share stuff as much as you can. Share images , videos, codes, processes.The more you give to the community, the more you get back.
-Don't kill your social life spending day and night on code.
-Try to live in a city / community/ collective of culturally active people ( architects, coders, artist, biologist, philosophers...).
-Keep on getting you work reviewed .I'm not talking about official reviews with your thesis advisor ( which by the way are always fundamental),but meet your code/arch /design friends in a pub, with your laptop on the table , sketching logics on pieces of paper.
-never give up.
I want to thank all the people the helped me during this journey:
My thesis advisor Alessio Erioli (http://www.co-de-it.com/) , Jeff Jones (http://uncomp.uwe.ac.uk/jeff/), Niccolo Amaducci , Luca Pedrielli (luca.pedrielli.org) , Alessando Zomparelli(http://dothemutation.wordpress.com/) , Jon mirtschin(http://geometrygym.blogspot.it/), Daniel Shiffman(http://shiffman.net/), Jose Sanchez(http://www.plethora-project.com/), Gwyl Jahn
Some good references
-G.Lynn, “Animate form” , Princeton Architectural Press; 1 edition (January 1, 1999).
-M. Hensel,A. Menges , “Morpho-Ecologies: Towards Heterogeneous Space In Architecture Design”, AA Publications (February 1, 2007).
-M. Hensel,A. Menges,M. Weinstock,” Emergent Technologies and Design: Towards a Biological Paradigm for Architecture”, Routledge (March 4, 2010).
-S. Johnson, “Emergence: The Connected Lives of Ants, Brains, Cities, and Software”, Scribner (August 27, 2002).
-J. Reiser,”Atlas of novel tectonics”,Princeton Architectural Press (2006),New York.
-M. De Landa, “ a thousand year of non linear hystory”, Swerve edition,New York , 2000.
-M. De Landa, “intensive science and virtual philosophy”, Continuum (August 14, 2005).
-M. De Landa, “Philosophy and Simulation: The Emergence of Synthetic Reason”, Continuum; 1 edition (March 24, 2011).
-S. Strogatz, “Sync: How Order Emerges From Chaos In the Universe, Nature, and Daily Life”, Hyperion; Reprint edition (April 14, 2004).
-F.Otto, “Occupying and Connecting: Thoughts on Territories and Spheres of Influence with Particular Reference to Human Settlement”, Berthold Burkhardt, Axel Menges (January 16, 2009).
-M. Foster Gage, “Aesthetic Theory: Essential Texts for Architecture and Design”, W. W. Norton & Company; 1 edition (October 31, 2011).
-P. Schumacher, “The Autopoiesis of Architecture: A New Framework for Architecture”, Wiley; 1 edition (January 25, 2011).
-P. Beesley, “Hylozoic Ground: Liminal Responsive Architecture”, Riverside Architectural Press; First edition (August 30, 2010).
-S. KWINTER, “Un discorso sul metodo”, in Explorations in Architecture Teaching, design, research, a cura della Swiss Federal Office of Culture,Birkhäuser , BaselBostonBerlin, 2008 ( traduzione di L. Di Martino ) e disponibile su:
-M. HENSEL, A. MENGES, “Patterns in Performance oriented Design. An Approach towards Pattern Recognition, Generation and Instrumentalisation” in AD, Pattern in Architecture, AD Wiley, London, 2008, pp.8893.
-M. DELANDA, Material Elegance, in Architectural Design (Special Issue: Elegance), Volume 77, Issue 1, pages 18–23, January/February, AD Wiley, London, 2007.
-M. FOSTER GAGE, “Project Mayhem”, in Fulcrum, the AA’s weekly free sheet, issue 18, Giugno 2011 (topic: architecture in the age of dissensus),
-S. KWINTER , “Who’s afraid of formalism?”, in “Far from Equilibrium: Essays on Technology and Design Culture” by Sanford Kwinter and Cynthia Davidson (Mar 15, 2008).
-Kipnis, Jeffey. “Toward a New Architecture.” AD: Folding and Pliancy, Academy Editions, London, 1993.
-S. Allen, “the field condition” da http://www.crisisfronts.org,2006.
-M. De Landa, “ Material(ism) for Architects : a Conversation with Manuel DeLanda”, intervista di Corrado Curti, 2010.
-M. De Landa, “ Deleuze and the use of genetic algorithm in Architecture”,2009.
-P. Schumacher, “Arguing for Elegance”,pubblicato in : Elegance, AD(Architectural Design), Londra ,2006.
-P. Miranda Carranza, “self-designed and onotgenic evolution”,interactive institute , Sweden.
-S. von Mammen and C. Jacob, ”swarm-driven idea models -from insects nests to modern architecure”, computer science department, Calgary,Canada.
-S. von Mammen and C. Jacob, “ evolving swarm that build 3D structures”, computer science department, Calgary,Canada.
-S. von Mammen and C. Jacob, “ the spatiality of swarms - Quantitative analysis of dynamic interaction networks”, computer science department, Calgary,Canada.
-V. Ramos ,” self organized stigmergic document maps: environment as a mechanism for context learning”,Merida ,2002.
-V. Ramos, “ on self-regualted swarms,Societal Memory,Speed and dynamics”,Technical university of Lisbon,Lisbona.
-V.Ramos , “artificial ant colonies in digital image habitats - a mass Behaviour effect study on pattern recognition”, IST geo-system center, Lisbona .
-V. Ramos , “ computational chemotaxis in ants and bacteria over dynamic environments.
-J. Jones, “the emergence and dynamical evolution of complex transport networks from simple low-level behaviours”, dipartimento di computer scince,Università di Chester,2008.
-J. Jones, “characteristics of pattern formation and evolution in approximations of Physarum Transport Networks”, center for unconventional computing , West England university,Bristol.
-H. Hamann, “ pattern formation as a transient phenomenon in the nonlinear dynamics of a multi-agent system”,Karlsruhe university (TH),Germany.
-E. ben-Jacob, “ bacterial self-organiztion : co-enhancement of complexification and adptability in a dynamic environment”, school of Physics and Astronomy, Tel. Aviv University,Israele.
This work is dedicated to my beloved father, the incredible man that taught me what's really important in life. I miss him every single day.