Symbiotic Algorithms

0 downloads 0 Views 2MB Size Report
Open University NL, “Object-Georienteerd Programmeren met JAVA”, Open. University 1999. 18. Open University NL; “Regeltechniek”, Open University 1990.
Symbiotic Algorithms Master Thesis Kees Pieters

Abstract: I n Nat ure, m any successful st rat egies have evolved t o effect ively deal wit h com plexit y. Any organism faces t he challenge t o survive in it s, oft en unpredict able, environm ent , aided by only t hose t ools t hat have proved t o be effect ive enough t o survive evolut ionary select ion. Oft en however, t he environm ent is t oo com plex t o deal wit h alone and so support is needed from ot her organism s. I n it s ext rem e form , t his has result ed in symbiosis, a form of co- operat ion bet ween different species t hat has actually evolved to become instinct. I t is st ill unclear how t wo organism s can evolve from independent beings int o partners in such a close-knit relationship, but it is a biological fact that this behaviour can be identified in very simple systems. This essay aims to provide a model that demonstrates such behaviour in a very basic form and invest igat e how net works of such sym biont s behave. This at t ained knowledge is used t o see how sym biosis could be applied t o solve a well- known np-complete problem.  copyright 2003 C. P. Pieters

2003-03-17, Open University the Netherlands Technical Sciences Computer Systems Version 5

Symbiotic Algorithms

1

Introduction ....................................................................................... 6 1.1 1.2 1.3 1.4

2

SYMBIOSIS IN A BIOLOGICAL CONTEXT ...................................................................................7 A THEORY OF SYMBIOSIS....................................................................................................8 A MODEL OF SYMBIOSIS.....................................................................................................8 SOLVING KNOWN PROBLEMS WITH SYMBIOTS ...........................................................................9

Evolution Theory ................................................................................10 NEO-DARWINISM ................................................................................................................... 10 NEO-DARWINISM AND ENGINEERING............................................................................................ 10 EVOLUTION .......................................................................................................................... 12 ENGINEERING SYMBIOSIS ......................................................................................................... 13 SUMMARY ............................................................................................................................ 14

3

Agents, Systems and Environments ......................................................15 I NTRODUCTION ..................................................................................................................... 15 RATIONAL AGENTS ................................................................................................................. 16 SYMBIOTIC RATIONAL AGENTS ................................................................................................... 16 AGENTS AND THE ENVIRONMENT ................................................................................................. 16 AN EXAMPLE: ENGINEERING A CELL ............................................................................................. 22 SUMMARY ............................................................................................................................ 24

4

Modelling Symbiosis ...........................................................................25 I NTRODUCTION ..................................................................................................................... 25 SYMBIOTS ........................................................................................................................... 25 A BASIC SYMBIOTIC NETWORK .................................................................................................. 26 CONVERGENCE ...................................................................................................................... 29 A SIMPLE EXAMPLE: A BAKERY AND ITS CUSTOMERS ......................................................................... 31 ANOTHER EXAMPLE: ARTIFICIAL AMOEBA ...................................................................................... 34 SUMMARY ............................................................................................................................ 37

5

More on Algorithms ............................................................................38 I NTRODUCTION ..................................................................................................................... 38 THE SOFTWARE ARCHITECTURE .................................................................................................. 39 ARCHITECTURE ...................................................................................................................... 40 MORE ON ALGORITHMS AND ENVIRONMENTS .................................................................................. 41 THE GOALSEEKER EXAMPLE....................................................................................................... 43 SUMMARY ............................................................................................................................ 48

6

Symbiotic Networks as Problem Solvers.................................................49 PROBLEMS AND SOLUTIONS ....................................................................................................... 49 CATEGORISING SYMBIOTIC NETWORKS ......................................................................................... 51 USING SYMBIOSIS FOR SOLVING PROBLEMS ................................................................................... 53 SUMMARY ............................................................................................................................ 56

7

The Travelling Salesman Problem .........................................................57 I NTRODUCTION ..................................................................................................................... 57 1. THE SOLUTION STRATEGY ................................................................................................. 58 AN EXAMPLE RUN................................................................................................................... 60 2. D EFINING THE SYMBIOTS .................................................................................................. 62

1: Determining the goal. ................................................................................................................62 2,3: Defining output and input .......................................................................................................62 4: Analysing the complexity of the environment ............................................................................62 5: Determining the relationship between out- and input through the environment .......................62 6,7: Identifying amplifications and conflicting goals.....................................................................62 8: Defining the symbiotic algorithms .............................................................................................63 9: Wrapping up. .............................................................................................................................63 A SIMPLE CONVERGING STRATEGY (TSP)....................................................................................... 64 I NCLUDING PROBABILITY (WEIGHTED) .......................................................................................... 65 AN OPTIMISING STRATEGY (NEURON) .......................................................................................... 68 RESULTS ............................................................................................................................. 70

8

Epilogue............................................................................................72 BACK TO NATURE ................................................................................................................... 73

9

Conclusion ........................................................................................74

Front Page, header and footer photos St riped cat fish flock so closely t oget her when t hreat ened, t hat t hey appear t o become one big organism. (Photo: Kees Pieters, Great Barrier reef 2000)

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 2 of 98

Symbiotic Algorithms Summary This docum ent is t he record of t he aut hor’s m ast er t hesis in com put er science for t he Open Universit y, t he Net herlands. The subj ect is symbiosis, and t he research aim s t o invest igat e if t he advant ages of sym biosis, which are well recognised in biology, can be applied in I nform at ion Technology, especially in solving com plex problem s. As no conclusive t heory has been form ed yet t hat explains which m echanism s drive such an ext rem e form of co- operat ion bet ween different species, a form al m odel is present ed t hat can clarify sym biot ic behaviour. Net works of t hese so- called sym biot s are invest igat ed and a convergence proof is derived t o show t hat such net works can converge t o cert ain goal, regardless of t he environm ent in which t he sym biot s reside. A few lim it at ions im posed on t his convergence are also ident ified and exam ined. Based on t he result s, a m et hod is given on how t o creat e an effect ive sym biot ic net work in an unknown or com plex environm ent . This m et hod is applied t o give a sym biot ic solut ion st rat egy for t he Travelling Salesman Problem. This also aims to demonstrate how neural networks may have evolved from symbiotic networks.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 3 of 98

Symbiotic Algorithms Samenvatting Dit is het verslag van een afst udeeropdracht in com put ersyst em en bij de Open Universit eit Nederland. Het onderwerp is symbiose, m et het doel om t e onderzoeken of deze ext rem e vorm van sam enwerking, waarvan de voordelen al lang onderkend zij n in de biologie, is t oe t e passen is in de I nform at ie Technologie, m et nam e bij het oplossen van com plexe problem en. Om dat er vooralsnog geen sluit ende t heorie is die verklaart welke st urende m echanism en schuil gaan acht er sym biose, wordt een form eel m odel gepresent eerd waarm ee sym biot isch gedrag verklaard kan worden. Met behulp van dit m odel wordt vervolgens een net werk van dergelij ke zogenaam de sym biot s best udeerd en wordt een bewij s van convergent ie van deze net werken afgeleid. Ook worden een aant al beperkingen die door deze convergent ie opgelegd worden, nader onderzocht . Dit leidt uit eindelij k t ot een m et hode waarm ee nagegaan kan worden in hoeverre een sym biot isch net werk een bepaald doel kan bereiken in een onbekende of complexe omgeving. Deze methode wordt vervolgens toegepast om een sym biot ische oplossingst rat egie voor het Handelsreizigers Probleem t e dem onst reren. Daarm ee wordt t evens get racht t e lat en zien hoe neurale netwerken uit symbiotische netwerken kunnen evolueren.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 4 of 98

Symbiotic Algorithms

Preface

The anemone fish is a classic example of symbiosis. The anemone fish has evolved to have a layer over its skin to protect it from the anemones poisonous tentacles. The anemone provides protection and food, while the anemone fish is a fierce defender against harmful animals [Allen et. al 1999]

I f t here is any m orale of sym biosis, it is t hat not hing is done in isolat ion. Even t hough t he research and writ ing of t his t hesis was carried out as a one- m an m ission, it would not have reached it s current form if it had not been for t he m any people around m e t hat gave t heir support and ent husiasm in t he past few years.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 5 of 98

Symbiotic Algorithms

1

Introduction

Com put ing and I nform at ion Sciences have always had an int erest in research carried out in ot her disciplines, in order t o learn and underst and m echanism s t hat m ight direct ly or “ This is t he 21 st Cent ury” , Anoraknophobia, indirect ly apply t o t heir own area of research as Marillion well. Especially t he increasing connect ive st ruct ure of com put ers and net works has led t o an underst anding t hat a com plex art ificial environm ent is em erging where various sim ilarit ies wit h Nat ure can be ident ified. Nowadays num erous research areas t ry t o underst and “ nat ural” phenom ena such as evolut ion, social st ruct ures and behaviour, in order t o ut ilise it s “ good t ricks” [ Dennet 1995] . This approach has helped t o unravel exist ing biological st ruct ures and m echanism s, such as t he nervous syst em , language and speech. Their findings have been applied in com put ers and result ed in neural net works, genet ic algorit hm s and num erous st rat egies t o solve specific problem s. I n t urn, com put ing science has provided m any new insight s for t he research areas t hat spurred t hese ideas in t he first place. I n fact , a num ber of int erdisciplinary research inst it ut es have been founded, where biology, physics, psychology, sociology, philosophy and com put er science work side- by- side t o underst and t he m echanism s t hat Nat ure has so readily m ade available. Therefore it is oft en very difficult t o draw clear- cut lines bet ween t hese disciplines, as t hey freely borrow each ot her’s work and oft en find t heir own research being referred t o in, what seem ed t o be non- relat ed research areas. Sym biosis is a subj ect t hat isn’t clearly relat ed t o one discipline. I n it s m ost elem ent ary form , it is st rongly em bedded in Biology, where it has been ident ified and ext ensively st udied. However, when sym biosis is considered as a form of cooperat ion, it becom es int erest ing for Sociology, Econom ics, Philosophy and ot her social sciences as well. And not only social sciences, as current research on agent t echnology, art ificial life, dist ribut ed aut onom ous syst em s and ot her com put er- relat ed areas are based on co- operat ive st ruct ures. I n t he last decades, t hese art ificial st ruct ures have evolved int o ext rem ely com plex art ificial environm ent s and so t here is cert ain logic t o look if such a successful evolut ionary st rat egy as sym biosis could be applied in t his area as well. However, current ly t here is no conclusive t heory about the mechanisms that enable symbiotic behaviour. I m agine t wo organism s t rying t o survive in a host ile, unpredict able environm ent . By chance t hey find each ot her, becom e aware of each ot her’s presence and suddenly find out t hat surviving is becom ing easier. I n t im e, t his awareness becom es engraved in t he organism ’s genes; it becom es inst inct . The organism s converge t o a new st able sit uat ion in which a sym biot ic relat ionship is established. The research t hat is carried out for t his t hesis t ries t o find t he m inim al requirem ent s needed t o achieve such a convergence in co- operat ing soft ware ent it ies. By form alising t hese requirem ent s, an at t em pt is m ade t o present a m odel of sym biosis t hat could be applied t o solve problem s in an art ificial environm ent . The lack of a t heory of sym biosis however, forces us t o present one first , based on what we know about sym biosis in Biology. This t heory needs t o be verified and be t ranslat ed in a form t hat allows t he t heory t o be m odelled for use in a soft ware environm ent . The following st ep is t o see which problem s could be solved effect ively wit h t his m odel and t o dem onst rat e t his. Sum m arised, t his leads to the following approach: Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 6 of 98

Symbiotic Algorithms 1. I nvest igat e sym biosis in a known Biological cont ext , ident ify it s funct ion in Nat ure and define t he m inim al requirem ent s t hat are needed t o creat e symbiotic behaviour between organisms 2. Present a t heory of sym biot ic behaviour and verify t his t heory against t he biological context presented earlier 3. Translat e t he t heory t o a m odel t hat allows sym biosis t o be used in environments other than a Natural one 4. I nvest igat e which classes of problem s could be solved using t his m odel and compare its use against other, known solution strategies. 5. Demonstrate the use of the model in solving such problems Each of these steps will be described in detail in the next sections. 1.1

Symbiosis in a Biological Context

“Symbiosis is a relationship in which two dissimilar organisms live in close association with each other” [Academic Press 1996] ( www.academicpress.com/inscight/05071997/symbios2.htm) This definit ion, found on t he I nt ernet , is one of m any but covers t he general view on t his subj ect well. Som e definit ions allow m ore t han t wo organism s, ot her definit ions also allow sim ilar organism s t o engage in sym biosis. The lat t er ext ension t ends t o a rat her broad definit ion of sym biosis, which m ay not fully agree wit h m ore form ally inclined Biologist s. However, t his broad definit ion is used in t his essay as it allows a very generic view on sym biosis. The special case of symbiosis between dissimilar organisms will be kept in mind at all times. “ Sym biosis is a relat ionship in which t wo or m ore organism s live in close association with each other” I n order t o underst and how a phenom enon as sym biosis can have m anifest ed it self, it is crucial t o em bed it in a general t heory of Nat ure. Evolut ion Theory provides such a fram ework, m ore specifically t he neo-Darwinian viewpoint , which t akes evolut ion t o it s ext rem e form and allows no force of creat ion t o describe nat ural phenom ena. Alt hough t his essay does not aim t o fuel t he cont roversy bet ween neo- Darwinist s and Creat ionist s, we will t ake t he neo- Darwinian viewpoint here, because it provides a formal approach to investigate symbiosis. The m ost im port ant supplem ent s of neo- Darwinian Evolut ion Theory t o sym biosis are: ♦ ♦ ♦

Awareness t hat every successful m echanism in Nat ure can be described in terms of benefit for at least one of its participants. This will allow identification of the benefits or advantages of symbiosis. I m plicit awareness of t he int ricat e relat ionship bet ween ( successful) organisms and the environment they live in. Neo- Darwinian reasoning encourages an engineering view [ Dennet , 1995] on evolution and therefore on symbiosis.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 7 of 98

Symbiotic Algorithms These addit ions lim it t he scope of t he available nat ural resources t hat could be used t o m odel sym biosis. A scrut iny of current lit erat ure on Evolut ion Theory will help to set up a time scale of evolution and pinpoint symbiosis somewhere on this t im e scale. This t im e scale can also be regarded as a scale of increasing complexity, which will help t o discard a great deal of com plex nat ural phenom ena, such as genet ic reproduct ion, neurones ( brains) and so on as possible explanations for symbiosis. 1.2

A Theory of Symbiosis

Based on t he Biological fram ework, a t heory of nat ural sym biosis will be set up. To achieve t his, t he environment of organism s needs t o be exam ined as closely as t he organism s t hem selves. This approach is very sim ilar t o Pnuelian React ive Systems [ Wooldridge, 2000] , a specialisat ion of Syst em s Theory t hat is base for research in so- called agent - based syst em s. Adapt ing cert ain aspect s of t his view will add the following contributions to symbiosis: ♦ I t provides a generic m odelling t ool t hat allows biological syst em s t o be described in a formal fashion ♦ I t allows a generally accept ed redefinit ion of an environm ent t o a problem domain (figure 1 )

Input Variables

Problem Domain

Environment

Environment

Output Variables

Organism

Input Variables

Output Variables

Input Variables

System

Output Variables

Problem Solver

Figure 1 : Redefinition of Biological Systems to a Problem Domain

1.3

A Model of Symbiosis

Wit h t he preparat ion com plet ed, we can now m ake a m odel of a sym biot ic ent it y, a form al ent it y t hat is able t o engage in sym biot ic behaviour. This m eans t hat it should be able t o adapt it s behaviour for t he benefit of ot hers as well as provide inform at ion about it s own st at e t o ot hers so t hey can support or help it . I n order t o com e t o t he sim plest sym biot ic syst em im aginable, a basic ent it y wit h a prim ary t ransform at ion process t hat t ransform s an input variable t o an out put variable is ext ended t o perform sym biot ic behaviour. To achieve t his, t he ent it y will get a goal funct ion t hat is base for t he “ benefit ” t hat evolut ion t heory requires. An inform al descript ion of sym biot ic behaviour will be given for t wo of t hese symbiotic entities (symbiots), to give an intuitive impression of how symbiosis will t ake place. Then a convergence proof for an arbit rary am ount of sym biot s in a symbiotic network will be derived to show that: ♦

The input vect or I of t he com bined input s of each sym biot s can converge t o a goal vector g of the combined goals of each symbiont. ♦ This convergence depends on a function that determines how the behaviour of a sym biot is influenced by t he inform at ion t hat ot her sym biot s pass on. This function is called a symbiotic algorithm. ♦ Specific knowledge about t he problem dom ain is not required t o reach t his convergence, the information that the entities pass should be sufficient The convergence proof should ident ify which class of algorit hm s will act ually converge and what t he possibilit ies and lim it at ions are of such a net work of symbiots. Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 8 of 98

Symbiotic Algorithms

I n sum m ary, we now have a net work of sym biot ic ent it ies t hat each can work t oget her t o reach a cert ain goal in a problem dom ain or environm ent . I n order t o t est t he t heory, a t est environm ent will be program m ed in JAVA t hat is used t o test the theoretical results. 1.4

Solving Known Problems with Symbiots

To really get a grasp of t he possibilit ies and lim it at ions of sym biot ic net works, such a net work will be used t o solve a known problem . This research has t aken t he Travelling Salesm an Problem as t he benchm ark problem . This part of t he research aims to investigate the following: ♦ ♦ ♦

Verification of the claims about symbiotic networks that were made earlier Gain experience wit h using sym biot ic net works as a problem solving mechanism Compare the solution with known solution strategies for a given problem

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 9 of 98

Symbiotic Algorithms

2

Evolution Theory

Neo-Darwinism

“ This is t he 21 st Cent ury” , Anoraknophobia, Marillion

It is evident that symbiosis is strongly embedded in Biology. More specifically, the subj ect has a st rong significance for evolut ion t heory or, m ore popularly, Darwinism . Sym biosis has been first coined in biological syst em s and has been extensively studied. More so, it is now generally acknowledged that symbiosis is a driving force behind t he evolut ion of living organism s [ Margulis, 1999] . Evolut ion t heory however covers an ext ensive area and m any t opics are subj ect t o debat e. I n order t o use evolut ion t heory t o com e t o a form alism of sym biosis, we need t o lim it t he scope dram at ically. This essay t herefore closely adheres t o so- called neo-Darwinian t heory, and specifically t he ideas expressed by Daniel Dennet [ Dennet 1995] , one of t he m ost influent ial spokesm en of t his branch of evolut ion theory So, exact ly what is neo- Darwinism ? Well, put t ing it short ly, neo- Darwinians uphold an ext rem e view on Charles Darwin’s original ideas and claim t hat t here is no driving force of creat ion behind evolut ion except evolut ion it self. Adapt ing t his view allows us t o exam ine sym biosis wit hin t he m echanism s and principles of evolut ion t heory, which allows an engineering perspect ive on t his subj ect . Alt hough t his m ay seem an alm ost t rivial observat ion, it is subj ect t o serious debat e in neo- Darwinian research [ Dennet 1995] . An engineering perspect ive m ay help bridge t he gap bet ween t he often empirical cont ribut ions t o t he research on Evolut ion Theory so far, and t he form al approach t hat ot her disciplines require. Before invest igat ing sym biosis from a neo- Darwinian perspect ive, we will t herefore first need t o ident ify what t he “ engineering perspect ive” on neoDarwinism implies. Neo-Darwinism and Engineering Dennet [ 1995] has argued t hat neo- Darwinian research would benefit great ly if it was regarded from an engineering perspect ive. I n order t o appreciat e t his claim , we first need t o know what “ engineering” is. According t o Bruegge & Allen [2000], engineering is a: ♦ ♦ ♦ ♦

Modelling activity. Engineers deal with complexity through modelling. Problem - solving act ivit y. Engineering is aim ed t o provide solut ions for a problem Knowledge-acquisition activity. Data about the problem and solution domain is organised into information and formalised into knowledge. Rat ionale driven act ivit y. The cont ext of decision- m aking and t he rat ionale behind these decisions are just as important as the knowledge they produce.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 10 of 98

Symbiotic Algorithms The tools that an engineer can use are: ♦

♦ ♦ ♦

Principles and Mechanism s. Principles are rules t hat are considered “ t rue” wit hin a cert ain dom ain. For inst ance, Physics and Mat hem at ics provide collect ions of such principles. Mechanism s are a com posit ion of principles aimed to solve a specific problem or to describe occurring phenomena Notations; a graphical or textual set of rules for representing a model Met hods; repeat able t echniques for solving a specific problem and are closely related to mechanisms Methodologies; a collection of methods for solving a class of problems

The rationale of an engineering activity is captured by the following properties: ♦ ♦ ♦

Goals; high-level principles that guide the engineering activities Requirements; features that should be present in the result of the engineering activities Constraints; limitations that can be identified in the engineering activities

Lastly, the engineering activities itself are subject to planning and control: ♦ ♦ ♦ ♦ ♦

Activities are a set of tasks that are performed towards a specific purpose Phases are activities termed as units of time Work products are artefacts produced during the engineering activities Deliverables are work product s t hat are present ed out side t he scope of t he engineering activities Milest ones are im port ant point s in t im e during t he engineering act ivit ies. They are usually deliverables termed as units of time

One of t he “ rules- of- t hum b” for any engineer is t hat one should always opt for generic and simple solut ions for a given problem if t his is possible. Bot h allow a present ed solut ion t o t he problem t o be used for a large set of sim ilar problem s, and oft en im prove t he robust ness of t he solut ion as well. Given a num ber of solut ions t o a specific problem , generalit y and sim plicit y are oft en t he decisive crit eria for t he event ual choice and are t he cornerst ones for good engineering practice. Alt hough engineering encom passes m uch m ore t han t he feat ures m ent ioned above, this selection provides a sufficient framework to “engineer” evolution. The first problem we face when viewing evolution through the eyes of an engineer is t hat we in fact have t o engage in a reverse engineering act ivit y. Evolut ion is a process t hat has progressed t hrough m illions of years and, along t he way, has produced an im pressive set of deliverables and m ilest ones. The engineer faces the task to reconstruct this process based on the deliverables and milestones that can be identified. This approach limits the solution space that the regular problem solving act ivit y of engineering norm ally is. For inst ance, we can not freely choose from available m echanism s, as som e of t hem m ay not have been available at som e point of evolut ion. An anem one fish can not have evolved before anemones! Anot her problem is t hat Evolut ion has t o be regarded as an engineering act ivit y, but as it is t he result of a process, we will have t o define in which ways evolut ion fulfils the requirements of engineering: ♦ ♦

Nat ure is a m assive m odel of evolut ion’s t rait s. Nat ure t herefore is t he m ain source of inform at ion about evolut ion and ( t herefore) it also is t he m ain source for knowledge-acquisition Alt hough evolut ion is not a problem - solving act ivit y in t he sense t hat we norm ally use it , we could consider evolut ion as a process t hat delivers

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 11 of 98

Symbiotic Algorithms



enduring systems. The problem-solving activities of evolution are to overcome instability and decay. According to Dawkins [1984], evolution is a process that delivers enduring inform at ion t hrough genes. The m ain problem - solving activities of evolution would be to optimise storage and transfer of information in t he agent s ( organism s) t hat carry t hem . An agent in t his sense is a carrier of information. The rat ionale of evolut ion is anot her m at t er t hat cannot be t erm ed in t he usual way. Based on t he deliverables of evolut ion we t erm ed previously, we could add t hat t he rat ionale of evolut ion is t o deliver enduring syst em s of increased com plexit y. The definit ion of Dawkins [ 1984] can help t o overcom e lengt hy philosophical discussions about exact ly what com plexit y is ( is a dinosaur m ore or less com plex t han a Hum an being?) . Com plexit y can be easily defined as the amount of information that is contained in an agent.

Evolution Based on t he engineering qualit ies we defined previously, we can now det erm ine the main goal of evolution: “ Evolut ion is t he process of creat ing enduring reposit ories of inform at ion of increasing complexity through agents” I n biological evolut ion, agent s could be replaced by organism s, but t he definit ion we present here is aimed to cover other kinds of evolution as well. An effect of this evolution process is, that the tools that are at evolution’s disposal becom e m ore com plex as well. Agent s becom e m ore com plex as do t he principles and m echanism s. This m eans t hat t he constraints and requirements of evolut ion are det erm ined by t im e and t hat t he process of evolut ion has t o be m odelled in t im e. A t im e scale of evolut ionary principles and m echanism s m ay help t o lim it the scope of possible solutions. Alt hough a t im e scale of evolut ion has not been m ade yet , t here is am ple lit erat ure [ Margulis 1999, Dawkins 1984, Dennet 1995, Pinker 1997, Kauffm an 2000] t hat can help t o draw such a m odel. Figure 2 depict s an at t em pt t o draw such a t im e scale of evolut ion, based on t he referred lit erat ure. Alt hough t he “ invent ion” of t he brain could be considered a Hum an- cent red view on evolut ion, it is a generally accepted one [Pinker 1997] and therefore used here as well. Primeval Soup

Auto Replicators Catalysts

Genes

Life

Lower Organisms

Brains

Higher Organisms time/ complexity

0

t1

t2

t3

t4

t5

t6

t7

Figure 2 : Time Scale of Evolution

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 12 of 98

Symbiotic Algorithms Nat ural evolut ion st art ed out wit h t he prim eval soup [ Dawkins 1984, Dennet 1995, Pinker 1997] t hat was reigned by physics and chem ist ry. I n t his phase of evolut ion m olecules of increasing com plexit y evolved unt il t he first aut o cat alyst s [ Kauffm an 2000] em erged, com plex m olecules t hat were able t o speed up t heir creat ion by using cat alyst s. Cat alyst s are chem icals t hat are not involved in a chem ical react ion but do help in m aking t his react ion m ore efficient . The next phase of evolut ion is dem arcat ed by t he creat ion of replicators [ Dawkins 1984, Dennet 1995] . Replicat ors are com plex m olecules able t o creat e copies of t hem selves. Replicat ors evolved int o increasingly com plex st ruct ures based on am ino acids and event ually int o genes [ Dawkins 1984, Dennet 1995, Pinker 1997] . Genes were not only able t o replicat e, but also able t o drive ( aut ocat alyst ) react ions in t heir im m ediat e surroundings. Som e of t hese st ruct ures eventually merged into a symbiotic relationship [Margulis 1999], which resulted in life. From life, t he first one- celled and m ult i- cell organism s evolved [ Margulis 1999, Dawkins 1984, Dennet 1995, and Pinker 1997] . Neurones t riggered t he birt h of t he brain as cent ral st eering m echanism of t he agent s ( organism s) t hat carry genes [ Pinker 1997] and t his event ually result ed in higher organism s, such as Homo Sapiens, that is: us humans. I n neo- Darwinism , every nat ural phenom enon t hat is invest igat ed has t o be put som ewhere in t he t im eline bet ween t he prim eval soup and life- as- we- know- it . Evolut ion Theory however st ill st rongly depends on t he cont ribut ion of Biology, and so the timeline is often started at replicator level or preferably, at the birth of genes. The Nat ural phenom enon we call “ sym biosis” is no except ion t o t his rule. There are quit e a num ber of scholars t hat t ry t o com e t o a “ Sym biosis Theory” , based on a genet ic approach [ Wat son & Pollack 1999, Moriart y & Miikulainen 1994], but so far with little success. To sum m arise t he above, neo- Darwinian evolut ion t heory cont ribut es t he following to our understanding of symbiosis: ♦ Evolut ion t heory adds a requirem ent of benefit t o our invest igat ion, as evolut ion is all about survival and opt im isat ions. Sym biosis as m echanism will not last in Nat ure if at least one of t he involved organism s would not benefit from it. ♦ Sym biosis can be pinpoint ed on a t im e scale of evolut ionary m echanism s and principles ♦ No conclusive theory on symbiosis is available Engineering Symbiosis Based on t he t im e scale present ed in t he previous paragraph we can t ry t o det erm ine where sym biosis em erged as a m echanism t hat could be used by evolution. Based on the definition coined in chapter one and adapted to the line of reasoning that has been conducted so far, we can state that: “Symbiosis is a relationship in which two or more agents live in close association with each other” “ Close associat ion” is a t erm t hat needs a m ore precise definit ion. From neoDarwinian reasoning, we know t hat benefit should be t he cause of t his int erdependency. To be m ore specific, at least one agent involved in sym biosis appears t o provide som e service t hat benefit s t he ot hers. Oft en t his works bot h ways, causing a mutually beneficial sit uat ion and in such a case, we could speak of co-operation. Logically, such a relat ionship will be st ronger, and t hus be m ore enduring in evolut ionary t erm s. Based on t his reasoning we redefine sym biosis to: Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 13 of 98

Symbiotic Algorithms

“Symbiosis is relationship of enduring co-operation between two or more agents” A subt le im plicat ion of t his redefinit ion is t hat a one- way benefit is no longer regarded as sym biosis. Besides t his, t he consequence t o our evolut ionary t im e scale is t hat co- operat ion is at least as old as sym biosis is. Margulis [ 1999] has present ed a widely recognised t heory t hat life would not have been possible wit hout sym biosis and so t his m echanism must have been present in a pre- life st age of evolut ion. This m eans t hat sym biosis should be invest igat ed wit h t he mechanisms and principles that apply at this stage. Not e t hat t his place in t im e is also where biological organism s have not evolved yet , which m akes our choice t o use t he t erm “ agent s” m ore plausible. This does however im pose som e addit ional dem ands t o t he rat her inform al definit ion of agents that was used so far. This will be dealt with in the next chapter. Summary I n t his chapt er, a fram ework based on neo- Darwinian evolut ion t heory has been set up and sym biosis has been “ re- engineered” int o t his fram ework. This led t o a definit ion of sym biosis t hat can be used out side Biological Syst em s as well. Besides t his, we have argued t hat com plex biological m echanism s as life, organism s or brains, are not prerequisit es for sym biosis. Last ly, t he t erm agent has been introduced to describe the entities involved in symbiosis. The following st ep is t o form alise “ agent s” and t o em bed t his in a generally accept ed research area t hat can provide t he t ools t o m odel agent s t hat engage in symbiotic relationships.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 14 of 98

Symbiotic Algorithms

3

Agents, Systems and Environments

Introduction

“ This is Marillion

t he

21 st

Cent ury” ,

Anoraknophobia,

I n t he previous chapt er, agents were inform ally int roduced as “ carriers of enduring inform at ion” . This descript ion was founded on “ engineering” neoDarwinian ideas on evolut ion. Agent s however are a field of research in t heir own right [ Wooldridge 2000] , and t herefore it is logical t o int egrat e t he cont ribut ions of this research in the framework that has been set up so far. There are m any views and approaches t o agent s and as m any definit ions ( and cont roversies) . This is m ainly because agent s can be equipped wit h m any t rait s, such as int elligence, m obilit y, m ot ion and so fort h. As we are m ainly int erest ed in one t rait , t he abilit y t o engage in sym biot ic behaviour, t hese addit ional qualit ies are not t he m ain point of at t ent ion here. One observat ion from neo- Darwinism , nam ely t hat sym biosis is driven by benefit , and t hat t his benefit depends largely on t he environment of t he agent , drives us t o so- called Pnuelian React ive Systems [ Wooldridge 2000] . This discipline wit hin agent - based syst em s is nam ed aft er A. Pneuli, who has ext ensively st udied syst em s t hat are int ricat ely embedded in the environment they inhabit.

Environment

Input Variables

Output Variables

Agent

Figure 3 : Pnuelian Reactive Systems

As opposed t o ( classic) Syst em s Theory [ Breedveld & van Dixhoorn 1987, Open Universit y 1992] , t his branch of Syst em s Theory and Cybernet ics invest igat es ent it ies ( agent s) t hat influence t heir environm ent as m uch as t hey are influenced by it ( figure 3) . Therefore, such a syst em can never be st udied in isolat ion from its environment. An advant age of Pnuelian React ive Syst em s is, t hat is base for research t o form al agents, that have properties that can be described in Mathematical terms. The next paragraphs will int roduce agent s according t o t he views of Wooldridge [ 2000] , which will t hen be equipped wit h sym biot ic behaviour. I t will be argued t hat t hese sym biot ic agent s int eract wit h each ot her, and t herefore belong t o each ot hers’ environm ent . This way, a net work of agent - environm ent pairs is creat ed. This approach result s t hat we get t wo views on t he environm ent , nam ely one from t he perspect ive of individual agent s, and one from t he perspect ive of the system as a whole.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 15 of 98

Symbiotic Algorithms

Rational Agents Wooldridge [2000] defines an agent as an: “ Entity that acts upon the environment it inhabits” An agent is considered to be rational if it: “ chooses t o perform act ions t hat are in it s own best int erest s, given t he beliefs it has about the world” The properties of a rat ional agent are derived from t he fact t hat a rat ional agent is: ♦ ♦ ♦ ♦ ♦

Situated in an environment. This follows from the definition of an agent Autonomous, it can operate independently Proactive, it exhibits goal-directed behaviour Reactive, it responds to changes in its environment Socially able, it is able to cooperate and negotiate with other agents

Symbiotic Rational Agents Clearly t he definit ion of an agent t hat Wooldridge provides applies for ent it ies engaged in sym biosis, for each ent it y act s upon t he services provided by t he ot her ent it ies, which can be regarded as belonging t o t he environm ent of t hat agent . The neo- Darwinian direct ive of benefit im plicit ly m akes a sym biot ic agent rat ional, because t his forces it t o pursue it s “ best int erest s” . I t s “ beliefs about t he world” are not defined, and m ay even be severely lim it ed t o input signals and a given state. We can now define a symbiotic (rational) agent as “ An ent it y capable of enduring co- operat ive behaviour wit h ot her ent it ies in t he environment it inhabits” The autonomy of rat ional agent s can, at first glance be a source of conflict in t he case of sym biosis, for sym biosis seem s t o suggest giving up t his aut onom y. However, t he given definit ion of sym biosis does not im ply t hat an agent is incapable of aut onom ous behaviour. Sym biosis m erely underlines t he benefit of an agent to engage in such a relationship. The other properties of a rational agent are more or less implicitly present in case of symbiosis. Agents and the Environment As said earlier, an interesting property of an agent and its environment is that the environm ent influences t he agent , but t hat t he behaviour of t he agent can also change the environment [Wooldridge 2000].

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 16 of 98

Symbiotic Algorithms

Environment

Input Variables

Output Variables

Agent

Figure 4 : relationship between an agent and its environment

I n t he case of sym biosis we have t o deal wit h m ult iple agent s t hat , by definit ion, live in each ot her’s environm ent s. This m eans t hat t he agent s are som ehow connected through their environment.

Figure 5 : multiple agents

“ Environm ent ” however, is a very broad t erm . I n it s ext rem e form , one could consider t he ent ire Universe t o belong t o an agent ’s environm ent . However, such a viewpoint is hardly pract ical if we want t o invest igat e t he influence of, say, a m osquit o in a bedroom , or t he heat ing capabilit ies of a t herm ost at and a boiler in a house. Alt hough t his observat ion m ay seem t rivial, it s consequences for a net work of sym biot ic agent s are not . For all agent s, part of t he environm ent influences it s behaviour and, in t urn, t he agent influences only part of t he environm ent . The environm ent of an agent can t herefore be split up in t wo distinct parts: ♦ ♦

The part that is within the agent’s range of influence The part that falls outside the agent’s influence

We will call t he neighbourhood.

sub- environm ent

t hat

is

wit hin

t he

agent ’s

sphere

a

Even wit h one agent we can ext rapolat e t his discussion, as t he neighbourhood t hat influences t he agent ( input ) does not necessarily have t o be influenced by t he neighbourhood t hat is affect ed by t he agent ’s out put . Therefore, each agent can be considered t o “ connect ” wit h it s environm ent t hrough t wo neighbourhoods that may, or may not, be related. The environm ent of a net work of agent s consist s of a whole set of such neighbourhoods, m any of which overlap. Even m ore so, t his overlap is a m inim al requirem ent for sym biosis, as agent s would ot herwise be independent ent it ies and not be related in any way!

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 17 of 98

Symbiotic Algorithms

Environment Neighbourhood2 Neighbourhood0

Input0

Neighbourhoodk Neighbourhood1 Outputn Output1

Input1 Output0 Agent0

Agent1

Inputn

Agentn

Figure 6 : multiple agents

The overlap bet ween neighbourhoods can also be seen as relat ionships ( dot t ed lines in figure 7) , so t he environm ent becom es a graph represent at ion where neighbourhoods form t he nodes and t he relat ionships bet ween t he neighbourhoods form the edges. Environment

Neighbourhood0

Neighbourhood1

Neighbourhood2

Neighbourhoodk

Input1 Input0

Output0

Output1

Agent0

Agent1

Inputn

Agentn

Outputn

I f we dem and t hat every neighbourhood m ay only connect one in- and out put of an agent , t hen som e neighbourhoods will be split up wit h a relat ionship of sim ilarit y bet ween t hem . I n figure 7 for inst ance, neighbourhood 1 would be split up in two new ones as in figure 8. Environment

Neighbourhood0

Neighbourhood1

Neighbourhood1

Neighbourhood2

Neighbourhoodk

Input1 Output0

Input0

Agent0

Output1

Agent1

Inputn

Agentn

Outputn

Figure 8 : separating Neighbourhoods

Evident ly, t he neighbourhoods now m erely serve as connect ion point s, or probes, of t he agent s in t he environm ent . The environm ent can be described as a graph with edges {E0 , E1 ,…, Em } of relationships between the neighbourhoods. Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 18 of 98

Symbiotic Algorithms In figure 8, the neighbourhoods may appear to be disjunct by their location in the environm ent but , alt hough t his cert ainly is a valid crit erion, a neighbourhood will norm ally be different iat ed from ot hers t hrough it s dimension. Neighbourhood 1 could be a t em perat ure, while neighbourhood 2 could be described in speed, accelerat ion or m om ent um . These dim ensions also reflect t he behaviour of t he agents that connect to the environments and therefore determine the similarity or dissim ilarit y of t hose agent s in respect t o each ot her. “ Dim ension” in t his respect could also relate to the (type of) data available in the neighbourhood, for instance because t he neighbourhood int erfaces wit h a dat abase. Therefore, t his t erm is broader than the pure physical meaning. How does all of t his help in underst anding sym biosis? Well, t o answer t hat question we will have to redirect our attention to the agents that interact with the environm ent . One of t he propert ies t hat ident ify a rat ional agent was goal directed behaviour. This m eans t hat we have t o add a goal t o each agent , result ing in a goal vect or [ g 0 , g 1 , …. , g n ] for all t he agent s. I t would be logical t o relat e t his goal t o t he agent ’s out put , but in biological syst em s, t he goal is m ore oft en relat ed t o t he agent ’s input! Survival, for inst ance, largely depends on t he abilit y of an organism t o acquire energy and resources t o m aint ain and build up it s syst em , i.e. food. The out put of t he individual organism oft en only consist s of by- product s t hat are form ed because of t his goal- direct ed behaviour and are less im port ant for t he individual it self. The fact t hat other organism s can ut ilise t hese by- product s and t hus creat e a net work of int erdependencies is t he essent ial organising principle for sym biosis. Therefore t he classical viewpoint t o relat e t he goal of an agent t o it s out put is not of int erest for t his research, as we want t o investigate networks of interdependencies between agents. Suppose t hat t he goal of agent 1 in figure 8 would be t o get a cert ain input level, say: I 1 = g1 [3.1] The given environm ent shows t hat such a goal could only be reached if agent 0 is able to influence the input of agent1 through the environment, or agentn manages t o do so t hrough neighbourhood 1 . The sam e dependency applies for agentn wit h respect t o agent 1 and, t o a lesser ext ent , agent 0 as t he lat t er could t heoret ically influence itself. I f an agent depends on anot her agent , it would benefit great ly if t here was a way t o pass inform at ion t o t he ot her agent about it s needs. I deally, t he agent would want t o know specifically which agent it depends upon in order t o negot iat e it s requirem ent s. The m ain point of t his essay is t hat such a consciousness about it self and it s relat ionships wit h ot her agent s is not necessarily available. This follows from t he neo- Darwinian t im e- scale we set up earlier. According t o Pinker [ 1997] , com plex m echanism s such as a consciousness of a “ self” and of “ ot hers” can not be present at t he point where sym biosis em erges. This m eans t hat such an awareness of oneself and ot hers can only be derived indirect ly, t hrough t he inform at ion t hat is passed t hrough t he by- product s t hat each individual creat es. Not e t hat t his inform at ion can be m uch richer t han purely quant it ies of out put that is produced. For instance, the pattern of dist ribut ion of t he out put , t he decay or ot her qualit ies of t he out put also provide inform at ion t hat could be used by ot her organism s t o “ sense” ot hers in t he net work. This way inform at ion about t hem selves can be passed t o t he ot hers. This inform at ion is oft en not specifically direct ed from one agent t o anot her, but by t he physical lim it at ions of t his inform at ion. The heat produced in t he agent ’s prim ary t ransform at ion process m ay be ut ilised as inform at ion by ot hers, but it will be cum ulat ed wit h ot her heat sources. Therefore can never result in a manner of direct communication (“I want Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 19 of 98

Symbiotic Algorithms you t o increase your out put t o support me” ) and t herefore such a request can at best be passed indirectly through these channels. The m ain proposit ion of t his essay is t hat , in a syst em t hat consist s of a num ber of interdependent agents, symbiosis is the result of: “ est ablishing a form of com m unicat ion bet ween t hose agent s, com posed of rules present in the physical world, that is sufficient to result in goal-directed behaviour of the system as a whole” I n ot her words, if we have a syst em cont aining n+ 1 int erdependent agent s wit h input vector I = [ I0 , I 1 , …, In ]

[3.2]

And goal vector g = [ g0 , g 1 , …, gn ]

[3.3]

t hen a sym biot ic syst em will possess a m eans of com m unicat ion s( g, I ) bet ween t he agent s in t he syst em , described wit h sim ple rules, t hat result s in a convergence of: lim (Ii – g i ) = εi , for all Ii

[Proposition 1]

t →t c

I n t his proposit ion, εi st ands for an error signal t hat is a m easure for t he success of t he applied rules and t c is t he t im e needed t o achieve t his convergence. The error εi should ideally be zero at convergence ( I i = g i ) , but as we will show lat er, t his is not always possible. This unwant ed offset should however be m inim ised, i.e. |εi | 0

[4.11]

The idea behind t his choice is t hat t he st ress will increase t he furt her t he input edges away from t he goal. The fact or ρ is used t o m ake t he st ress signal dimensionless. In this case, at convergence we get: lim si = lim ρ( g i – Ii ) = 0 t →t c

[4.12]

t →t c

The m odel of a sym biot we st art ed out wit h has been refined by exam ining a net work of t wo sym biot s and by general observat ions. We have int roduced a process of convergence of input s t o out put s and derived som e fact s of t he m odel in t his sit uat ion. There are however som e addit ional rem arks t o be m ade about t his convergence. First ly, convergence should ideally never t ake an infinit esim al t im e. The convergence t im e t c poses a rest rict ion t o t he goals of t he sym biot . I f these goals are functions of time, then it will be clear that during the convergence t im e a goal should not change, as t he syst em would ot herwise possibly never be able to converge. This also applies for the environment E. Anot her m at t er is t hat , in pract ical syst em s, t he various signals are lim it ed t o m inim um and m axim um ranges. I f t he behaviours of t he sym biot s all run int o their extremes, then the system may converge to a state where I ≠ g. Last , but cert ainly not least , t here is t he m at t er t hat t he propert ies we have derived so far are based on the assumption that convergence has taken place. We do not know however if, and when, t he syst em act ually converges. We need t o prove som ehow t hat t he sym biot ic net work act ually does converge t o a sit uat ion where I ≈ g. This will be examined in the next section.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 28 of 98

Symbiotic Algorithms

Convergence Consider a network of n+1 symbiots with: ♦ ♦ ♦ ♦ ♦

an environment E = [E0 , E1 , … , En ] an input vector I = [I0 , I1 , … , In ] a goal vector g = [g0 , g1 , … , g n ] an output vector O = [O0 , O1 , … , On ] a stress vector s = [s0 , s1 , … , sn ]

The goal vector is constant within the convergence time t c. For each symbiot i, the following applies at a given time t: Oi t = µi t * I i t µi t+1 = µi t + δ.f( s ), δ > 0, f( s ) is dimensionless si t = ρ( g i t – I i t ), ρ > 0, si is dimensionless

[4.13] [4.14] [4.15]

δ and ρ are added in [ 4.14] and [ 4.15] t o scale t he dim ensionless qualit ies f( s) and si with the dimensions of Ii and µi . The environment has the following property:

I j = Ej . Oi , Ei > 0 for all i, j

[4.16]

I n nat ural language, [ 4.16] t ells us t hat t he out put of every sym biot is connect ed to the input of another and that this connection causes the input of symbiotj to be proport ional t o t he out put of sym biot i . Not e t hat Ei doesn’t have t o be a const ant value, but could be a funct ion as well. The only rest rict ion t hat it im poses is t he fact t hat it is larger t han zero. I t is not known which sym biot s are connect ed t his way. Suppose we have an init ial sit uat ion where I ≠ g and t he following relat ions apply:

{

f( s ) > 0 if ∑si > 0 f( s ) < 0 if ∑si < 0

[4.17]

The ∑ operator being a summation over n:

∑s i =

n ∑s i

[4.18] = s0 + s1 + … + s n

i=0

Because of [ 4.14] , µi will increase or decrease due t o [ 4.17] . The sam e will also happen t o ∑Oi due t o [ 4.13] and [ 4.16] . But according t o [ 4.15] t he opposit e will occur to ∑si . This process will therefore repeat itself until s = 0. The t im e t c t hat t his convergence t akes depends on t he values of t he elem ent s of s, and t herefore of t he values of I ( [ 4.15] ) , and t herefore of E as well ( [ 4.16] ) . Therefore t he environm ent does have an effect on t he convergence t im e of t he network.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 29 of 98

Symbiotic Algorithms The convergence proof tells us a number of things: 1. it clearly shows t hat any sym biot ic algorit hm t hat com plies wit h t he constraints of [4.17] will cause converge of the system 2. Every sym biot in t he net work should be connect ed t o at least one ot her through the environment 3. it shows t hat I = g is only one of t he possible solut ions. Depending on t he symbiotic algorithm, averages of the various (gi – Ii ) functions can also create convergence as s = 0 as well in such a case. This will result in premature convergence gi - Ii = ei , where ei is not zero. 4. The neighbourhood influences t he convergence process t hrough it s sign. I f we would allow a cert ain Ei t o be a negat ive funct ion in [ 4.16] , t hen convergence is st ill possible, provided t hat t he signs of t he appropriat e si+1 is inversed in the symbiotic algorithm that is used. 5. The convergence time tc is affected by the neighbourhoods. The convergence t im e t c depends on t he num ber of it erat ions needed before t he convergence crit erium has been reached. Depending on t he algorit hm t hat is chosen, t he rat e of increase or decrease per it erat ion could be fast er or slower. The t rade off for increasing t his rat e is t hat overshoot can t ake place [ Breedveld & van Dixhoorn 1987, Open Universit eit 1992] , which m eans t hat t he change becomes so large that the system starts oscillating around the convergence spot. Point 3 addresses t he m at t er of prem at ure convergence. We will t herefore introduce two types of convergence: ideal: premature:

f( s ) = 0 if, and only if, s = 0 ; f(s) = f( s ) = 0 if s ≠ 0 ; f(s) =

[4.19] [4.20]

The problem of prem at ure convergence is a well- recognised in neural networks [Hassoun 1995] and the explanation is the same. The n symbiots as a whole form an n x n m at rix A which is dynam ically alt ered by t he st ress vect or s. This m at rix has a num ber of eigenvect ors. The feedback loop t hat is const ruct ed t hrough t he environm ent causes t he syst em t o converge t o one of t hem . The problem is, t hat t he eigenvect or st ill represent s a whole range of solut ions and we ideally only want one of t hem , nam ely t he solut ion where ideal convergence t akes place. The challenge t hat one faces, is t o cont inue convergence along t he eigenvect or once the system has reached it. We will return to this topic in the next section. Up t o now, we have used a very rigid goal crit erion, nam ely t hat I i = g i . I n nat ure, t he survival crit erion is oft en less st rict and could be, for inst ance, I i ≥ g i (with food!). The stress signals could for instance be as follows:

{

si ( Ii , g i ) = ρ( g i – Ii ), if Ii < g i

[4.21]

si ( Ii , g i ) = 0 , if Ii >= g i

This choice increases t he solut ion space of t he net work significant ly, as a whole range of input vectors I lead t o a sit uat ion where s = 0 . This allows a m uch large portion of the solution space to give adequate results, leading to efficient systems that use very simple symbiotic algorithms.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 30 of 98

Symbiotic Algorithms A Simple Example: A bakery and its customers After the abstract theory of the previous chapters, it may be a welcome change to apply t he t erm s and definit ions in a real life exam ple. I n t his sect ion, t he relat ionship bet ween a bakery and it s cust om ers will be described in “ sym biot ic” t erm s. This exam ple is m ainly int ended t o get an underst anding how t he t heory can be used and to demonstrate one or two concepts that may be counterintuitive at a first glance. In this case, the theory of symbiosis is used as a modelling tool. A bakery and it s cust om ers can be described as a sym biot ic syst em in an environm ent consist ing of t wo neighbourhoods, wit h dimensions m oney and bread ( figure 16) . The sym biot bakery input s m oney and out put s bread, t he sym biot cust om er does exact ly t he opposit e. Not e t hat t he environm ent E = [ Emoney, Ebread] = [ 1,1] , as t he value of m oney is not alt ered as it passes from customer to the baker and a bread remains a bread as well.

money customer

scust

bread bakery

sbak f(scust, sbak)

f(scust, s bak)

Figure 16: A bakery and a Customer

Now for a count erint uit ive observat ion: because t he goal is relat ed t o t he input of an entity, the goal g baker of the bakery is to make money, not bread! Normally the goal of a syst em is relat ed t o t he syst em ’s out put , but we have argued earlier t hat t his is not necessarily a logical choice. Wit h som e reflect ion, t he bakery’s goal of m aking m oney doesn’t seem so st range at all! This is even m ore evident wit h t he cust om er: is it t he goal of a cust om er t o spend m oney? I n our t wosym biot organism , t he goal g customer of t he cust om er is t o eat a cert ain am ount of bread! The st ress of bot h cust om er and bakery is based on t he observat ion t hat each symbiot at least needs to achieve their goals, so we can say:

{

scustomer = ( g customer – I customer ) scustomer = 0

{

sbaker = ( g baker – I baker ) sbaker = 0

if I customer < g customer if I customer >= g customer

if I baker < g baker if I baker >= g baker

I f t he st ress signals of t he cust om er and t he baker are norm alised t o t he sam e order of m agnit ude, it isn’t hard t o see t hat bot h sym biot s can effect ively reach their goals with the following symbiotic algorithm: f(scustomer, sbaker) = w0 scustomer + w1 sbaker (w0 , w1 > 0) This sym biot ic algorit hm cont rols bot h t he behaviour of t he cust om er as it does the baking process. If the inputs are smaller than the goals, then this will result in a st ress signal t hat increases t he value of funct ion f(scustomer, sbaker) which represents the change of the behaviour of the system. Therefore, the outputs and inputs increase until the goals have been met. Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 31 of 98

Symbiotic Algorithms This syst em will converge ( f( scustomer, sbaker) = 0 ) when bot h goals have been reached, which means that one of the inputs probably is larger than its goal. This model is not very realistic, for a baker usually has more than one customer:

customern

customer1

money customer0

bread

bakery

Figure 17: Bakery with multiple customers

The algorithm now becomes: f(scustomer, sbaker) = w0 .scustomer0 + w1 .scustomer1 + … + w n .scustomer n + wn+1.sbaker ( w i > 0, 0 0 is a scale factor si t (g i t , I i t )

[4.13] [4.14] [3.4]

A library class cont ains a num ber of predefined sym biot ic algorit hm s, but t hey can be easily expanded with custom-made algorithms. The archit ect ure has been used t o invest igat e t he lim it at ions t hat were ident ified in the theory. This is the point of attention of the next sections. More on Algorithms and Environments A sym biot ic net work is int rinsically em bedded in t he environm ent it inhabit s. Therefore, t he environm ent part ially det erm ines t he net work st ruct ure, and t he neat division bet ween environm ent and net work as depict ed in figure 22, does not really exist. The following figure is a more realistic representation:

Problem Domain Input Variables

Output Variables Symbiotic Network

goal

algorithms

Figure 26: Symbiotic Network

The environm ent is t he unpredict able elem ent in t his schem e, and influences t he network in two ways: ♦ By t he t ransform at ion of an out put signal of one sym biot t o t he input of another. This is determined by the vector E = [E0 , .., En ]. ♦ By the connection scheme, or structure of the network. The convergence proof showed t hat t he first issue m ainly concent rat es on t he sign of each t ransform at ion, and furt herm ore t hat t he values of E affect t he convergence time t c of the entire network. The connect ion schem e, which deals wit h t he quest ion which and how m any successors a sym biot has, deserves som e furt her scrut iny, as it influences prem at ure convergence where I ≠ g when s = 0 . A successor of a cert ain Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 41 of 98

Symbiotic Algorithms symbioti is a sym biot j of which t he input is eit her connect ed t o t he out put of symbioti t hrough t he environm ent ( im m ediat e successor) or t hrough a num ber of symbiot-environment pairs: E1

E0

symbiot

immediate succesor

E2

En

successor

successor

immediate succesor

Figure 27: Successors of a symbiot

Suppose we take a symbiotic algorithm of the following type:

f( s ) = w0 s0 + w1 s1 + … + w n sn =

n ∑ w i . si i=0

[5.1]

I t is clear t hat a m aj or point of discussion is t o decide which st ress signals should get which weight s. A sym biot can only serve it s im m ediat e successors and t herefore t he sym biot ic algorit hm should ideally be const ruct ed t o discard t he st ress signals of ot her sym biot s. These cont ribut ions m ay possibly only pollut e t he useful inform at ion of t he sym biot . I t is as if t rying t o hear your children’s call on a busy playground. The dilemma that a symbiot faces is that its successors are determined by the environment and are therefore not necessarily known. A net work consist ing of n ent it ies can be const ruct ed som ewhere bet ween t wo extremes, where every entity is an immediate successor of: ♦ ♦

All the other entities (a fully coupled network) At most one other entity. This results in a path or a cycle of symbiots

Every exist ing net work is som ewhere bet ween t hese t wo ext rem es and can be regarded as a graph where one or more paths can be identified. These paths start from an ext ernal input , which are input s t o ent it ies t hat do not have a predecessor. They end in: ♦ External outputs, outputs of entities that do not have a successor ♦ In cycles From t hese pat hs new pat hs, or branches, can be form ed, creat ing a t ree- like st ruct ure. They can also form parallel connect ions over one or m ore ot her entities. Parallel connect ions of sym biot s have been t reat ed in t he bakery exam ple and, along t he lines, dem onst rat ed t hat t hey can im pair ideal convergence. I t is clear t hat if a sym biot out put s t o m ult iple successors, convergence t o all t heir goals is only possible if t here is overlap bet ween t he goals of t hese successors. The symbiot will never be able to serve its successors if they have contradicting goals. For inst ance, if in figure 27, t he goal of one im m ediat e successor is I i < g and t he ot her has a goal I i > g, t hen t he sym biot will not be able t o sat isfy bot h of t hem . I t will opt for an average, t he upper, or t he lower bounds of t heir goals, depending on t he sym biot ic algorit hm t hat is chosen. These lim it at ions are intrinsically det erm ined by t he way t he sym biot s are connect ed and t he goals t hey have. There is no way t hat a sym biot ic algorit hm can work around t hese limitations. Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 42 of 98

Symbiotic Algorithms I f a sym biot knows what it s im m ediat e successors are, and t here is overlap in t heir goals, t hen it can concent rat e on opt im ising t hese goals. This result s in a net work where ideal convergence has t aken place. Therefore, a perfect sym biot ic algorithm will be able: ♦ ♦

to identify the immediate successors have t heir corresponding weight s t o be unequal t o zero ( usually larger t han zero)

The weights of other stress signals should ideally be zero, as their sum totals zero at convergence anyway, and should be so that their total influence does not affect the successor’s operation. Say, for instance, that symbiots j, k and l belong to the im m ediat e successors of sym biot i and t here is overlap in t heir goals, t hen t he following algorithm would behave optimally (w j , wk , w l > 0): f i ( s ) = 0.s0 + 0.s1 + … + w j .sj + wk . sk + w l .sl + 0.sm + … + 0. sn

[5.2]

I f t he ot her weight s are unequal t o zero, t hen t hey will cont ribut e t o t he sum and could cause premature convergence. Branches in a net work can also cause prem at ure convergence, nam ely t hrough propagation. I n a branch, a change in t he behaviour of one sym biot result s in changes t o t he input of it s im m ediat e successors, and t heir im m ediat e successors and so forth. If such sequence of successors contains amplifying elements, then a sm all adj ust m ent at t he st art of t he branch can cause enorm ous fluct uat ions j ust behind the amplification. This amplification is transferred to the stress signals and result in a sit uat ion where t he cont ribut ions of sym biot s furt her down t he chain are m uch higher t han t hat of t he im m ediat e successors. They “ out - shout ” not only t he im m ediat e successors, but also ot her st ress signals in t he net work. Therefore, t hey im pair correct funct ioning of t he net work. Not e t hat am plificat ion has t o occur when a goal value of a sym biot is lower t han t hat of a successor. This situation will be investigated in the following paragraph. According to [4.19], ideal convergence takes place with algorithms that comply to the following rule: n f( s ) = ∑( w i .si ) = 0 ⇒ I = g, wi . si > 0

[5.4]

i=0 I t would be ideal if t he weight vect or w is not a fixed value, as in t he bakery exam ple, but can adj ust it self som ehow t o reach t his sit uat ion. This would m ean that w could be a funct ion of s as well, and would have t o learn t o reflect t he connect ion schem e of t he net work, ident ifying which successors belong t o which sym biot , despit e t he previous lim it at ions. The challenge for such a net work is t o “detect” successors dynamically. During t his research, we have not succeeded t o find algorit hm s t hat effect ively faced t his challenge and converge under all circum st ances. Various algorit hm s were t est ed in a branch of sym biot s, t o see which ones converged best . The results are depicted in the next paragraph. The GoalSeeker Example The GoalSeeker exam ple has been im plem ent ed t o sim ulat e a branch and is used t o invest igat e t he lim it at ions t hat were described in t he previous sect ion. The Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 43 of 98

Symbiotic Algorithms exam ple consist s of a sequence of sym biot s, wit h prim ary t ransform at ion function: Oi = µi . Ii

[5.5]

Each sym biot i is connect ed wit h one im m ediat e successor, neighbourhood that does not transform the output of the symbiots:

t hrough

Ei = 1

a

[5.6]

The out put of t he sym biot is t herefore equal t o t he input of it s successor. This results in the following connection scheme:

value 0

value 1 symbiot

value 2 symbiot

value 3

value n-1

symbiot

value n symbiot

s0, ..., sn

Goal 0

Goal 1

Goal 2

Goal n-1

Algorithm

Figure 28: The GoalSeeker Example

Each neighbourhood m aint ains a value, which is produced by a predecessor sym biot , and has t o m at ch t he goal of t he successor. This goal is a random ly generat ed num ber, excluding zero. The first sym biot get s a fixed value for I 0 t hat is equal to its goal: I 0 = g0

[5.7]

The ot her sym biot s all st art wit h I 0 = 0, but gradually change t heir out put values depending on t he algorit hm s t hat are used. This m eans t hat all sym biot s init ially produce a lot of stress, which may become less if a correct algorithm is used. The sym biot s in a branch all use one kind of algorit hm . I n t he t est environm ent , nine of t hese branches are creat ed, all using a different algorit hm . This way, t he behaviour of t he algorit hm s can be com pared t o each ot her. The sym biot s have no st op crit eria, but keep on running unt il t he “ st op” but t on on t he console is pressed. The values of t he goals and input s in t he m odel have been convert ed t o int eger values ranging from 0 – 100, but int ernally all signals are norm alised bet ween < - 1, 1> by dividing all values from t he environm ent by t heir m axim um values. According to the theory, the following algorithm should perform very well: f i ( s ) = w . si+1 , w>0, 0 0 is a constant value ∑w . sj ; w > 0 is a constant value w . si+1, or 0 if i+1 > n; w > 0 is a constant value 0.5 . w . (si+1+ si-1), or 0 if i+1 > n or i–1 < 0;

w > 0 is a constant value LOVE_THY_FRIENDS

w . ∑sj /(|i – j|) IF i ≠ j, otherwise 0;

w > 0 is a constant value LOVE_THY_NEAR_FRIENDS w . ∑sj /(|i – j|)2 IF i ≠ j. otherwise 0;

w > 0 is a constant value Table 1 : Algorithms used in GoalSeeker

Unless not ed ot herwise, index i is used for t he considered sym biot . I ndex j is used to designate other symbiots with respect to the considered symbiot. NO_ALGORI THM does not use any st ress signals, and t herefore is not sym biot ic. MY_STRESS_ONLY and RANDOM are “ selfish” algorit hm s, which only use t he stress of the symbiot itself. STRESS_ONE_BY_ONE is t he benchm ark averaging sym biot ic algorit hm , which takes equal contributions of all stress signals. The last four algorit hm s all have a basic form of select ion, based on proxim it y or t heir posit ion in t he branch. They im plem ent a concept of near / far, as t he indexes in t he branch increase from left t o right . LOVE_THY_NEI GHBOURS uses t he st ress of t he predecessor and t he successor equally, while t he ot hers gradually decrease t he cont ribut ions of st ress signals t he “ furt her” t he sym biot s are locat ed in t he branch. I t is int erest ing t o see t hese algorit hm s in com parison t o STRESS_ONE_BY_ONE, t o see if select ion can out perform a basic averaging algorithm.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 45 of 98

Symbiotic Algorithms Also an algorit hm called NEURON is included t hat , based on [ 5.1] , uses weight adj ust m ent ( w = w ( s) ) for t he sym biot ic algorit hm f j t ( s)= ∑w j t .sj t of sym biot i . This algorit hm consist s of t wo rules, nam ely a Hebbian Learning Rule [Hassoun 1995]: w j t = wj t-1 + ρ sj , 0 < ρ 0, not necessarily constant i=0

[6.1]

i=0

This rule m eans t hat I becom es larger if O increases and sm aller if O decreases. I f t here are inverse relat ionships bet ween cert ain Oi and I i+1 of O and I respect ively, t hen t hese input s or out put s should be negat ed. This will have t o be based on assum pt ions or analysis. I n t he exam ple of t he drilling proj ect , for inst ance, one m ay assum e t hat t he vibrat ions and ground displacem ent becom e larger if t he speed of t he drill increases, or if t he dist ance of t he drill t o a sensor becom es sm aller. Such heurist ics could be sufficient t o est im at e t he effect iveness of a sym biot ic net work. Det ailed analysis however, m ight prove t hat t he vibrat ions decrease if t he drill’s velocity passes a certain value. Such additional complexity may require neural capabilities to be added to the system. 6. Identify branches in the environment. This is also a matter of assumption and/ or analysis. For instance, our drill is likely to contain a branch between a vibration sensor (say East of the drill), the location actor (in Eastern direction), the ground displacement sensor (East) and the velocity of the drill. Note that a branch always contains at least three entities. 7. Identify amplifications in the branches. If rule [6.1] can be restricted to 0 = 0. This m ay m ean that: ♦ an amplification in a branch was overlooked ♦ There may be a conflict in the goals of multiple successors of a symbiot The network can be used this way to teach us things about its environment. Ext rem ely slow convergence m ay be t ackled by int roducing am plificat ions t o t he input s of t he ent it ies whose st ress signals decrease t oo slow. This m ay result in prem at ure convergence, due t o propagat ion of t he am plificat ion, so t his needs t o be done with care.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 55 of 98

Symbiotic Algorithms

Summary I n t his chapt er, a fram ework was present ed t hat allows us t o exam ine t he problem-solving capabilities of a symbiotic network, by comparing it with a neural net work and a genet ic algorit hm . I t showed t hat , provided t he lim it at ion of prem at ure convergence can be cont rolled, applying sym biosis as a problem solving mechanism can be promising. Last ly, a st ruct ured approach has been given t o design net works t hat could effectively utilise symbiosis in an unknown or complex environment.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 56 of 98

Symbiotic Algorithms

7

The Travelling Salesman Problem

Introduction The Travelling Salesm an Problem ( TSP) is a classic benchm ark problem t o t est a solut ion “This is the 21st Century”, Anoraknophobia, Marillion strategy. The problem concerns a sales person who has t o visit n cit ies and want s t o find t he short est rout e t hat connect s all t hese cit ies ( and brings him back hom e in t he end) [ Michalewicz 1996, Koza 1992] . The problem is so im port ant , because it is np-complete, which m eans t hat adding one elem ent ( cit y) t o t he problem increases t he problem space ( num ber of possible pat hs) drast ically. This feat ure can easily be dem onst rat ed, for if all t he n cit ies are connect ed t o each ot her, t hen t here are ( n- 1) ! possible pat hs t hat can be t raversed. Adding one cit y will increase t he num ber of pat hs t o n! , which is unquest ionably m uch m ore t han one extra city deserves. This trait of np-complete problems poses a potential problem for a computer, as it gradually becom es im possible t o calculat e all t he possible solut ions when t he elem ent s increase. This class of problem s is t herefore oft en used t o t est new st rat egies t hat lead t o accept able solut ions wit h considerable less effort . The aim of a good st rat egy is t o do t his in polynom ial t im e, preferably wit hin n 2 or n 3 calculat ions. “ Good” st rat egy does not necessarily m ean finding t he best solut ion wit hin t his t im e, but accept able ( sub- opt im al) solut ions are allowed as well. As a “ bonus” , a st rat egy for solving one class of np- com plet e problem s also m eans that it can be used for others as well. I n t his exam ple, t he TSP will be used t o creat e a com plex problem space in which a sym biot ic net work will have to find an optimal solution. The solut ion st rat egy is aim ed t o verify t hat local knowledge at t he level of individual nodes, about t he dist ances t o t he ot her nodes, can be used t o solve a problem t hat exceeds t he capabilit ies t his local knowledge (a shortest path). The exam ple aim s, wit hin reason, t o put as m uch “ int elligence” in t he sym biot ic algorit hm s, but it will also Figure 35 : Graph with 6 nodes (cities) address some ways to pre-process t he neighbourhoods so t hat t he net work will converge bet t er. This exam ple pushes t he t heory furt her from it s biological root s and t hat from Syst em s Theory. The proposed solut ion uses t he st ruct ured approach t hat was present ed in t he previous chapter.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 57 of 98

Symbiotic Algorithms

1. The Solution Strategy I n t he st rat egy t hat will be used in t his exam ple, t he sales person t ravels from t own t o t own and in each t own asks a local person for advice t o which t own should be travelled next. The local persons share stress signals, which are used to adj ust t heir advice t o t he sales person. The salesperson collect s t he advised direct ions and t ries t o creat e a valid rout e from t hem . This rout e is t hen com m unicat ed back t o t he locals ( input ) , who are t hen able t o adj ust t heir advice. This adj ust m ent is det erm ined by t he sym biot ic algorit hm t hat is used by the “locals”. A run can be described as follows: path = randomly created; WHILE (termination condition is not reached) DO BEGIN FOR (all nodes) DO BEGIN index position = local rule(node, path); END; path = driver rule(index positions); END Each local m akes a suggest ion for t he next place t he sales person can t ake ( local rule) , but because he already m ight have been t here, he m ay decide t o t ake an alt ernat ive rout e ( driver rule) . The sales person does t his by select ing anot her town on his list, which belongs to the symbiot with the lowest stress signal: add a random node to path; WHILE(there are still nodes to add) BEGIN select proposed destination from the node; IF(destination is available) THEN BEGIN add destination to path; node = destination; END; ELSE BEGIN node = node of an available symbiot with lowest stress; add node to path; END; END; I n t his part icular exam ple, t he driver ent it y is sym biot ic, as it uses t he st ress signals of ot hers. Ot her st rat egies have been used as well during t he experim ent s, including a num ber t hat do not use any st ress signals at all ( t he net work t hen uses hybrid ent it ies) . All t hese st rat egies behave sim ilar, alt hough som e have less variance in t he convergence process. The reason for t his is, t hat t he m ain t ask for t he sales person ent it y is t o lim it t he search space from O(nn ) com plexit y t o O( n! ) as it filt ers illegal pat hs. This t ask is st raight forward and does not have a significant influence for the convergence process.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 58 of 98

Symbiotic Algorithms Each sym biot is assigned t o a node of t he graph and it only cont ains knowledge about t he dist ances bet ween it s “ hom e t own” t o t he ot her places. This approach m akes t he problem homogeneous, as each local sym biot will face t he sam e t ask and so only one st rat egy ( sym biot ic algorit hm ) should be sufficient for t he representatives of the nodes. 35

B

10

C

20 20

40 55

10

A

15 15

45

25

15

D

5

5

20

F

E

Neighbourhoods i 0 1 2 3 4

A B C D E F

symbiot

10 20 45 15 25

B A C D E F

symbiot

10 35 40 55 20

C A B D E F

20 35 15 15 10

symbiot

D A B C E F

45 40 15 5 5

symbiot

E A B C D F

15 55 15 5 20

symbiot

F A B C D E

25 20 10 5 20

symbiot

Suggested Path A-E-D-B-?-?-A Sales Person Entity

A-E-D-B-F-C-A f(s0 , s1 , …, sn ) Selected Path Figure 36: TSP Strategy

The “ local” knowledge t hat is used in t his st rat egy uses t he dist ances of all t he cit ies wit h respect t o one cit y as base for solving t he TSP. This is sim ilar t o an edge list represent at ion of a graph [ Goodrich and Tam assia 1998] and m eans that we can use the “raw” data of the graph as base for our solution. The neighbourhoods are linked to a node (city) of the graph. They contain a list of t he line segm ent s of t he edges t o t he ot her nodes. Each sym biot is connect ed t o one of t hese neighbourhoods and t hey can select one of t he line segm ent s depending on the value of their behaviour (which depends on the stress signals). The input t herefore consist s of a point er, or index ( i) , t o a line segm ent of a current ly select ed pat h ( t he boldface line segm ent s in t he figure) , and t he out put consists of an index to a proposed new line segment. The proposed line segments are represent ed by lines wit h a ball- shaped end in t he previous figure. I n t he figure, the symbiots propose the line segments AE, BD, CE, DB, ED and FC. During a run, t he nodes will point t o different indexes, depending on t he way t he sym biot ic algorit hm readj ust s t he advice and on t he act ual pat h t hat is present ed as input . The select ion is not circular ( alt hough t his will probably work as well) , m erely because a linear m ot ion is t he easiest t o im plem ent . This choice m eans in figure 36 t hat when a cert ain sym biot is point ing t o index four, and t he advice is t o increase, t he index will rem ain on index four. Likewise, an index posit ion on zero with an advice to decrease will keep the index to zero.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 59 of 98

Symbiotic Algorithms An Example Run I n order t o give an im pression of t he way t he st rat egy works, t his sect ion will describe an example run, using figure 36. Every iteration of the run will cause the index posit ions t o change ( except in t he out er boundaries of t he range) , which result s in a very rigid st rat egy which is not likely t o work very well. However, it does m ake clear how a run will behave. The st rat egies t hat have been implemented behave in a similar fashion, although the changes are more gradual. St art ing from a random node, a pat h is creat ed based on t he proposed line segm ent s. I n t he figure, t he driver st art s t o creat e one from node A: AE- ED- DBBD…. At node B, a conflict arises and t he driver has t o choose an alt ernat ive from t he remaining two nodes C and F. The node wit h t he lowest st ress signal is select ed by t he driver rule ( st ress C ≡ line segment CE = 15, stress F ≡ FC = 10), so F is selected: AEDBFCA ⇒

length = 15+5+40+20+10+20 = 110

This path is represented in the table of figure 36, using boldface font. The chosen pat h is ent ered as input t o t he “ locals” and, part ially based whet her t he sales person has or has not followed t heir suggest ions, t hey will change t heir advice. This is det erm ined by t he sym biot ic algorit hm t hat is used. Because t he algorit hm s act ually use t he index posit ion ( i) , t he result for inst ance could be t hat all t he index posit ions of t he new pat h are increased ( if t his is possible) . As t he select ed pat h consist s of line segm ent s AE, BF, CA, DB, ED and FC, t his result s in t he following proposals: AF( 25) , BF( 20) , CB( 35) , DC( 15) , EF( 20) and FD( 5) . The lengths of the line segments have been included in brackets. The driver select s a random st art posit ion, for inst ance D, and creat es a new path, for instance: DCBFEAD =

ADCBFEA ⇒

length = 45+15+35+20+20+15 = 150

FE is chosen because of t he t wo rem aining nodes E and A, of t he suggest ed segments EF( 20) has a lower st ress t han AF( 25) , so t he driver rule select s t his option. The proposed pat h has becom e significant ly larger, which should increase t he st ress signals. According t o t he t heory, t his should m ean t hat a proper algorit hm should ( event ually) t urn back from t he chosen direct ion and go in t he direct ion of t he original pat h. From t he line segm ent s of t he pat h: AD, BF, CB, DC, EA and FE t he following proposal would be m ade: AC, BE, CA, DB, EA and FD. Again, t he driver creates a valid path, this time for instance starting from E: EACFDBE =

ACFDBEA ⇒

length = 20+10+5+40+55+15 = 145

Because t he pat h has becom e a bit short er t han t he previous one, t here is no incent ive t o correct t he direct ion and t he syst em cont inues in it s downward direction if this is possible: {AC, BE, CF, DB, EA, FD} → {AB, BD, CE, DA, EA, FC}.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 60 of 98

Symbiotic Algorithms Starting from, say F, this results in the following possible iterations: Start F:

Line FCEABDF = ABDFCEA ⇒

B:

BCFDEAB =

ABCFDEA ⇒

10+35+10+5+5+15 = 80

C:

CABFDEC =

ABFDECA ⇒

10+20+5+5+15+20 = 75

ABEDCFA ⇒

10+55+5+15+10+25 = 120

A:

Path Length 10+40+5+10+15+15 = 95

As t he select ed pat h suddenly has becom e larger, t he direct ion of t he search should change: {AB, BE, CF, DC, ED, FA} → {AC, BF, CF, DE, EF, FB}. Starting from, say E, the next path could for instance become: E:

EFBDCAE

AEFBDCA ⇒

15+20+20+40+15+20 = 130

The syst em now m oves away from t he best pat h t hat was found so far. Clearly, t he algorit hm used in t his exam ple doesn’t converge very well, and t he int elligence of t he driver is not sufficient t o converge t o a good solut ion. Apparently, a finer mechanism is needed for the local advisors. An alt ernat ive st rat egy could define sym biot s t hat out put a valid pat h. I t s behaviour could consist of a num ber of possible operat ions t hat can be perform ed on t he pat h, while t he st ress signals det erm ine which operat ion is carried out on such a pat h. People well versed in Genet ic Algorit hm s ( GA) [ Koza 1992, Michalewicz 1996] m ight recognise t he cycle t hat result s wit h t his st rat egy. The st ress signal becom es sim ilar t o t he “ fit ness” defined in such algorit hm s, while a symbiot represents an individual in the population that is created. In many ways, a GA can be considered a sym biot ic net work where connect ions are m ade t o previous populat ions. The sym biot ic algorit hm s t hat are used, are t he so- called genet ic operat ors, which are part ially based on probabilist ic qualit ies. The combination of the mapping of chromosomes to fitness, combined with a selection process where poor result s are discarded, creat e an environm ent t hat com plies with the criteria for convergence. Because GAs have been ext ensively st udied, we will not pursue GA-like solutions further. The t hree algorit hm s t hat have been im plem ent ed and t est ed will be a bit m ore sophist icat ed t han t he one described previously. I nst ead of t urning t he direct ion around based on t he t ot al pat h lengt h ( st ress) , t he algorit hm s will rat her operat e on individual stress signals, which allows the system to move around local minima and maximums more easily. The general idea however, remains the same.

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 61 of 98

Symbiotic Algorithms

2. Defining the Symbiots 1: Determining the goal. The goal of t he organism is t o find t he short est pat h possible. I n t he exam ples used, t he goal values of all t he sym biot s are set t o zero. This m eans t hat t he st ress signals will be proport ional t o t he lengt hs of a line segm ent in t he select ed pat h. The short er t he lengt h, t he sm aller t he st ress. This solut ion st rat egy has t o t ake in account t hat t here will always be a st ress signal, even at convergence, as t he st ress can not becom e zero. Not e t hat t he st ress signals can not becom e sm aller t han zero as well. This m eans t hat t he algorit hm will have t o add som e offset t hat allows t he values of t he behaviour t o becom e eit her sm aller or larger at a given iteration. An alt ernat ive approach can be t o adj ust t he goal value wit h a line segm ent belonging to the shortest path that is encountered at a given iteration. This would result in st ress signals becom ing zero, when t he short est pat h is found, but also increase the risk of premature convergence as the stress may become zero at any line segm ent . Anot her opt ion could be t o define a st ress value relat ive t o t he short est line segm ent . Alt hough t his would decrease t he st ress signals, it would st ill result in st ress at convergence, as t he short est line segm ent is no guarant ee for the shortest path. 2,3: Defining output and input The com bined out put range of t he chosen sym biot s should cover t he solut ion space of the TSP. This is equal to the set of all possible paths that can be created. From t he st rat egy discussed in t he previous chapt er, bot h t he input s and t he out put s consist of an index posit ion t o a line segm ent . The input s are indexes t o line segm ent s of t he select ed pat h, while t he out put s are indexes t o suggest ed line segments of a proposed path. 4: Analysing the complexity of the environment Alt hough t he graph in likely t o cont ain quit e a lot of local m inim a and m axim um s, our solut ion will be based on a one- layer net work. The input s and out put s are t herefore direct ly connect ed t o t he sam e sym biot s. The reason for t his is part ially t hat we are int erest ed in purely sym biot ic net works and not in hybrid net works, and part ially because t he search is a “ bet t er- t han” ( a previous) pat h and not an “is-equal-to”. The solution space is therefore larger than one (the best). 5: Determining the relationship between out- and input through the environment The changes bet ween in- and out put are based on selection ( of t he salesperson entity) and not of amplifications or reduction. Therefore the environment complies with rule [6.1], as ρ= 1. 6,7: Identifying amplifications and conflicting goals The input and t he out put of sym biot s are all indexes t o line segm ent s. Every it erat ion t he connect ion st ruct ure of t he net work ( which is equal t o t he select ed pat h) is changed, and t his always result s in a branch. However, it is not expect ed t hat t he algorit hm s will suffer from prem at ure convergence due t o t he lim it at ions of t he net work, such as am plificat ion, as t he connect ion schem e of t he net work can change dynam ically. The change causes t he effect s of am plificat ion t o be dist ribut ed evenly over all t he sym biot s over t im e. The environm ent does not change the values of in- and output signals (Ei = 1). Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 62 of 98

Symbiotic Algorithms I f one was t o furt her opt im ise t he solut ion st rat egy, an im provem ent could be m ade t o t he neighbourhoods t hat are used by sort ing t he list of line segm ent s in increasing or decreasing lengt hs. This pre-processing would t ake n log( n) ext ra calculat ions, but would result in less local m inim a and m axim um s in t he problem dom ain. I n a way, it can be considered as increasing t he local knowledge contained in a neighbourhood. 8: Defining the symbiotic algorithms Each symbiot outputs a (preferred) index position of a line segment, based on the st ress signals. This algorit hm det erm ines t he abilit y and success of t he net works means to search for the best path. The algorithms that are used are based on: f( s ) = w0 s0 + w1 s1 + … + w n sn

[5.1]

I n t his exam ple, we wouldn’t be able t o use m ost ot her algorit hm s t hat were present ed in t he GoalSeeker exam ple, m ainly because successors change dynam ically. This would m ean t hat t he algorit hm s based on vicinit y, like NEXT_I N_LI NE and t he LOVE_THY_… algorit hm s would not be very useful. STRESS_ONE_BY_ONE is likely t o perform reasonably, wit h a risk for prem at ure convergence. However, for t he TSP we will use algorit hm s t hat adj ust t heir weight s, in a sim ilar fashion as NEURON in t he GoalSeeker exam ple. This is done because: ♦ this strategy proved to be the most robust ♦ we have seen in st ep 6 t hat am plificat ions in branches are unlikely t o influence the behaviour ♦ of the complexity of the environment The weights are adjusted to some criterion, and can be a function of the stress. For t he TSP, t hree of t hese sym biot ic algorit hm s, which are all sim ilar t o NEURON, have been im plem ent ed for t he “ local” sym biot s. They are t est ed against an algorit hm t hat has random behaviour. A random algorit hm should be able to generate the best path in approximately nn iterations. 9: Wrapping up. I n t he com ing sect ions, t he index i will norm ally designat e t hat it belongs t o symbioti , while t he index j is reserved for t he cont ribut ion of sym biot j in t he sym biot ic algorit hm of sym biot i . I ndex j is t herefore m ainly used for t he st ress signals in a symbiotic algorithm. All t he funct ions are norm alised bet ween –1 and 1, unless ot herwise denot ed. This m eans t hat t he values of t he problem dom ain ( index posit ions) and t he sym biot s ( input s, out put s and st ress) are scaled t o values wit hin < - 1,1> . This is done by dividing t he act ual values by t heir m axim um value. For inst ance, t he st ress signals are proport ional t o line segm ent s, and scaled by dividing t hese line segments by their maximum value: si = (length of line segment) / (max length of line segment)

[7.1]

The input s and out put s of t he sym biot s are index posit ions, but int ernally t hey are also scaled between . Due t o t he choice of [ 5.1] , t he com plexit y of t he algorit hm will always be in order of O(t.n2 ) , wit h t being t he num ber of it erat ions needed t o scan t he n sym biot s. This fact m akes t he present ed solut ion poorer t han known algorit hm s, such as Kruskal’s algorit hm , which is known t o have a com plexit y of O( n.log( e) ) , wit h e being the number of edges in a graph [Goodrich and Tamassia 1998].

Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 63 of 98

Symbiotic Algorithms A simple converging strategy (TSP) The input of each sym biot consist s of an index posit ion of a line segm ent in t he path that was chosen by the sales person. In this algorithm, called TSP, the index position belonging to a line segment of the best path known at a given iteration is st ored. This pat h can be found due t o t he choice of st ress signals, as t heir sum is proportional to the total length of a path: n

min( s tot ); stot= ∑ st i , st is stress at iteration t t

[7.2]

i=0

The index posit ion is det erm ined by t he index posit ion i i of a sym biot i . The index i i * t hat belongs t o a best pat h at a given it erat ion is st ored as well, and used t o adjust the weights: ∆w j = ρ.( ii - ii * ); 0< ρ 0. Therefore, t his algorit hm has converged when t he out put values of all sym biot s are advising the index of a line segment of the best path that was found. The approach of this algorithm is comparable to the one described in the previous sect ion, wit h t he difference t hat t he changing of t he index locat ions is slower and differs per symbiot. The result is that the generated paths “curl” through the local m inim a of t he problem space like a snake, rest ing longer in short line segm ent s and quickly moving away from large ones. For instance, we return to our previous exam ple and, st art wit h AE( 15) , BF( 20) , CA( 20) , DB( 40) , ED( 5) and FC( 10) , t he num bers bet ween bracket s being t he line segm ent s. The first pat h t hat is creat ed aut om at ically becom es t he “ best ” pat h found so far. The line segm ent s belonging to t his pat h ( which is sim ilar t o t he exam ple run) will t herefore det erm ine t he direct ion of t he index posit ions for t he next it erat ion( s) , due t o [ 7.2] . Of course, this will only start with the next iteration. AEDBFCA ⇒

length = 15+5+40+20+10+20 = 110

AE( 15) , BF( 20) , CA( 20) , DB( 40) , ED( 5) and FC( 10) becom e t he t arget direct ions. From t hese line segm ent s, DB causes t he m ost st ress, so t his index posit ion is likely to change first, because of [7.3], for instance in: AE(15), BF(20), CA(20), DC(15), ED(5) and FC(10). Starting in D, like in the example run, we could get the following path: DCAEFBD ⇒

length = 15+20+15+20+20+40 = 130

This pat h, consist ing of AE( 15) , BD( 40) , CA( 20) , DC( 15) , EF( 20) and FB( 20) , is worse t han t he previous, so t he line segm ent of t he previous pat h will rem ain t he targets: Symbiotic Algorithms 17 March, 2003

C.P. Pieters Page 64 of 98

Symbiotic Algorithms

Best Path Current Path

AE(15) AE(15)

BF(20) BD(40)

CA(20) CA(20)

DB(40) DC(15)

ED(5) EF(20)

FC(10) FB(20)

From t hese line segm ent s, t he index of node B has “ st rayed” t he m ost , nam ely from F t o D, so t his one is likely t o change first due t o [ 7.3] . BD will also change due t o [ 7.4] , as t his is t he largest line segm ent . The change, of course, is in t he direct ion of t he line segm ent s of t he best pat h, for inst ance AE, BE, CA, DC, EF, FB. Starting from E, as in the example, we could now get: EFBADCE ⇒

length = 20+20+10+45+15+15 = 125 AE(15) BF(20) CA(20) DB(40) AD(45) BA(10) CE(15) DC(15)

Best Path Current Path

ED(5) EF(20)

FC(10) FB(20)

BA is now likely t o change t o BC, because of [ 7.3] , while AD( 45) is now likely t o change t o AE because of [ 7.4] , result ing in AE, BC, CE, DC, EF, FB. St art ing from F, as in the example: FBCEADF ⇒

length = 20+35+15+15+45+5 = 135 AE(15) BF(20) CA(20) DB(40) AD(45) BC(35) CE(15) DF(5)

Best Path current Path

ED(5) EA(15)

FC(10) FB(20)

Alt hough t he exam ple seem s t o show ot herwise, t his cont inuous reshuffling of long line segm ent s and far index posit ions causes t he syst em t o converge m ore and m ore t owards t he opt im um pat h. Not e t hat t he m ore t he syst em converges, t he less it m at t ers wit h what node is st art ed, as t he suggest ed line segm ent s move towards a valid path. Therefore, at convergence the driver logic is no longer needed. Including probability (Weighted) The second algorit hm t hat is used on t he TSP has addit ional random behaviour t hat increases t he variance of t he pat hs t hat are t ried out . The basic algorit hm uses a norm alised t ot al st ress. Bearing in m ind t hat t he range of si = < 0,1> because of [7.1], this means: n

snorm= 1/n . ∑si

[7.5]

i=1

I n Form ula [ 7.5] , n is t he num ber of nodes – 1 in t he graph. The form ula has t he effect that the range of snorm is as well. For each node ( sym biot ) , only t he weight s of line segm ent s belonging t o a pat h that is selected are adjusted, according to: ∆w j = ρ( 1 – snorm ); 0