How Symbiosis Can Guide Evolution? Vladimír Kvasnička Department of Mathematics Slovak Technical University September 1999 What is the symbiosis? (1) A symbiosis is simply the living together of different organisms. (2) A special case of the symbiosis is the mutualism, where symbionts (organisms in symbiotic relationship) are mutually beneficial. (3) Symbiosis can lead to the symbiogenesis, i.e. the creation of new species via the genetic integration of symbionts (eukaryote cells have a symbiogenic origin). (4) In modern evolutionary biology, the symbiosis is considered as an integral part of evolution and a fundamental source of innovation. V. Kvasnička: How Can Symbiosis Guide Evolution? 2 Model The present model of symbiosis is a modification of Hinton and Nowlan model of Baldwin effect, that was published in 1987 in their seminal paper "How Leraning Can Guide Evolution". The present lecture is based on the recent paper "How Symbiosis Can Guide Evolution" by R. A. Watson and J. B. Pollack (see home page of J. Polack). The concept of "lifetime plasticity" of cognitive device of organisms is replaced by "lifetime interaction" between organisms. The present model has two periods: First period, symbiotic groups find the solution of a problem more quickly than the solution can be found by a single organism. Second period, after a group has found the solution, the evolution of individual organisms is continued towards their ability be independent of other members of group. V. Kvasnička: How Can Symbiosis Guide Evolution? 3 Chromosomes and population A chromosome x is an ordered n-tuple composed of three symbols 0, 1, and # a 0 ... R |1 ... x S |T# ... fk p x x1 , x2 ,..., xn 0,1,# i n incorrect symbol correct symbol neutral symbol A population P is a multiset composed of chromosomes k p P x , x , x ,... V. Kvasnička: How Can Symbiosis Guide Evolution? 4 For a given chromosome x a group of chromosomes is determined as an ordered g-tuple of chromosomes randomly selected from the population P af G x x0 , x1 ,..., x g 1 where x0=x. All chromosomes from the group G(x) are unified at a form of n-dimensional vector chromosome a f Gaf x x x ... x ~ x ~ x1 , ~ x2 ,..., ~ xn 0 2 g 1 k if xi j #, for j 0,1, 2,...,k 1, xi k and xi # xi k # if x i , k 0 ,1,...,g 1 V. Kvasnička: How Can Symbiosis Guide Evolution? 5 Illustrative example af ~ x Gaf x x G x0 x0 , x1 , x2 , x3 x0 x1 x2 x3 ~ x 1 # 1 0 1 # # 0 1 0 0 1 # 1 0 # 1 # # 1 0 x1 x2 x3 0 1 # 0 0 # # # 0 0 # # # # # 1 1 0 1 1 1 # 0 1 1 # # 0 1 0 Rule: For each column we look for "non-hash" symbol going successively by top-down way. V. Kvasnička: How Can Symbiosis Guide Evolution? 6 Reducible and irreducible group af x G x is A group G(x)=[x0, x1,…, xg-1] with ~ called reducible, iff a removing of its last vector xg-1 outside the group does not change its unification. In particular, let us considered two groups G(x) and G'(x), where the group G'(x) was formed from the group G(x) by removing its last vector xg-1 af af kp G x G x x The group G(x) is reducible iff af af G x G x If the group G(x) is not reducible, then it is called irreducible. x0 x1 x2 x3 ~ x 1 # 1 0 1 # # 0 1 0 0 1 # 1 0 # 1 # # 1 0 1 # 0 0 # # 0 # 0 # # # # # 1 1 0 1 1 1 # 0 1 1 # # 0 1 0 this vector may be removed, i.e. group G(x) is reducible V. Kvasnička: How Can Symbiosis Guide Evolution? 7 Fitness of chromosomes For each chromosome xP we generate randomly a prescribed number of times (M) a group G(x) , if x G x is correct (all its entries are 1), its union ~ then a fitness f(x) is increased by one. af PseudoPascal implementation of the fitness evaluation for each xP do begin f(x):=1; for i:=1 to M do begin randomly create group G(x); ~ x: G x ; if ~ x is correct then f(x):=f(x)+1; end; end; af V. Kvasnička: How Can Symbiosis Guide Evolution? 8 An evolution of population of chromosomes Two stochastic operators are introduced: (1) Selection operator x=Oselect(P) It means that from the population a chromosome x is quasirandomly selected, where a probability of the selection is proportional to the fitness f(x) (see Goldberg's roulette wheel). (2) Mutation operator x'=Omut(x) Each entry of x is changed with probability Pmut to a feasible value. V. Kvasnička: How Can Symbiosis Guide Evolution? 9 PseudoPascal implementation of the evolutionary algorithm time:=0; P:=randomly generated population; while time<timemax do begin time:=time+1; evaluate all chromosomes of P by fitness; Q:=; while |Q|<|P| do begin x:=Oselect(P); x':=Omut(x); Q:=Q {x'}; end; P:=Q; end; V. Kvasnička: How Can Symbiosis Guide Evolution? 10 Size of randomly generated group A group G(x) of size g (it contains g chromosomes) is generated with probability af Pr ob g 1 z g 1 where z>1. V. Kvasnička: How Can Symbiosis Guide Evolution? 11 Let x(0,1) be a random number with uniform distribution, then the size g is determined by solving the equation x=Prob(g), we get ln x O L gM 1 ln z P where is an integer part of . Conclusion: The parameter z models a "density" of population z 1 population is crowded z population is scattered V. Kvasnička: How Can Symbiosis Guide Evolution? 12 Illustrative results V. Kvasnička: How Can Symbiosis Guide Evolution? 13 An application to a minimization of binary functions kp f min F af x kp F : 0,1 0, n xopt arg x 0 ,1 n An unification of group chromosomes x0 x1 x2 x3 ~ x ~ xmod 1 # 1 0 1 1 # # # 0 0 0 0 1 # 1 0 0 # # # # # 1 0 1 # 0 0 0 # # 0 # 0 0 # # # # # 0 1 1 0 1 1 1 1 # 0 1 1 1 # # 0 1 0 0 hash symbols are randomly substituted by 0/1 V. Kvasnička: How Can Symbiosis Guide Evolution? 14 x G x xmod Omod x A chromosome x{0,1,#}n is evaluated by a functional value f(x) so that a minimal value is look for within a neighborhood U(x) composed of modified unifications of randomly created groups U x xmod x G x f x min f xmod xmod U x V. Kvasnička: How Can Symbiosis Guide Evolution? 15 PseudoPascal implementation for each xP do begin Fmin:=∞; for i:=1 to M do begin randomly create group G(x); ~ x: G x ; af x mod : O mod x if F( ~ x mod)<Fmin then Fmin:=F( ~ x mod); end; F(x):=Fmin; end; V. Kvasnička: How Can Symbiosis Guide Evolution? 16 Fitness of chromosomes Step 1. Functional values f(x) are lowered by the U x so-called multiplicity of the optimal xmod opt Uopt x U x x Uopt x : f x f xmod opt multiplicity x Uopt x af af af f x f x multiplicity x This means that optimal solutions with the greater multiplicity are preferred. Step 2. Modified functional values f'(x) are used for the evaluation of chromosome by fitness. af a f af F af x Fa x f... F a x f f x1 f x2 ... f x N 1 2 N V. Kvasnička: How Can Symbiosis Guide Evolution? 17 PseudoPascal implementation of the genetic algorithm time:=0; P:=randomly generated population; while time<timemax do begin time:=time+1; evaluate all chromosomes of P by fitness; Q:=; while |Q|<|P| do begin x1:=Oselect(P); x2:=Oselect(P); (x'1,x'2):=Orepro(x1,x2); Q:=Q {x'1,x'2}; end; P:=Q; end; V. Kvasnička: How Can Symbiosis Guide Evolution? 18 V. Kvasnička: How Can Symbiosis Guide Evolution? 19 Kauffman's ragged functions KN Kauffman's NK function maps binary vectors N 1 2 ... N 0,1 of the length N onto positive real number from the interval [0,1], this mapping is determined with respect to the table T and the vector as follows 1 N F x int Ti1 Ti 2 ...TiK TiK 1 N i 1 Plot of Kauffman's function for K=3, N=10 fopt=0.31045 , xopt=882=int(1101111100) V. Kvasnička: How Can Symbiosis Guide Evolution? 20 Illustrative calculation (Kauffman's function for N=50, K=3) 0,5 mean number of # symbols 0,4 0,3 0,2 0,1 0,0 0 50 100 150 200 Epoch V. Kvasnička: How Can Symbiosis Guide Evolution? 21 A new paradigm of symbiosis Let us assume that we have p independent optimization subproblems fi : 0,1 0, i 1,2,..., p n 0 xopt arg minn fi x and fi xopt i i x0 ,1 Let us define a unified function p f fi : 0,1 n p i 1 p 0 , f x fi x i i 1 x x x ... x 1 2 p Its functional value is determined as a sum of functional values of p "subfunctions". V. Kvasnička: How Can Symbiosis Guide Evolution? 22 The minimum of function f is determined by p f xopt fi xopt 0 i i 1 xopt xopt xopt ... xopt 1 2 p It means, that for the function f optimization problem is reduced to p "local" fully independent optimization subproblems A structure of chromosome x x 1 x 2 ... x r i i i The chromosome is of a variable length and composed of r subchromosomes of subproblems i1, i2,..., ir. If a subproblem appears more than once, then its first appearance from the left is considered, while remaining ones are ignored. V. Kvasnička: How Can Symbiosis Guide Evolution? 23 Four different operators over chromosomes 1. Concatenation (two chromosomes are concatenated into one chromosome) x x 1 ... x r j j y y 1 ... y q i i z x y x 1 ... x r y 1 ... y i i j jq x , y Oconcat x , y Oconcat is a deterministic operator. V. Kvasnička: How Can Symbiosis Guide Evolution? 24 2. Crossover (between two chromosomes some parts are exchanged) x x 1 ... x a x a1 ... x r j j j j y y 1 ... y a y a1 ... y q i i i i j x x 1 ... x a y a1 ... y q j j i i y y 1 ... y a x a1 ... x r i i j x , y Ocross x , y Ocross is a stochastic operator. V. Kvasnička: How Can Symbiosis Guide Evolution? 25 3. Mutation (a few entries in chromosome are randomly changed) x x 1 ... x r i i x Omut x x 1 ... x r i i x k Omut x k i i Omut is a stochastic operator. V. Kvasnička: How Can Symbiosis Guide Evolution? 26 4. Deletion (from a chromosomes a subchromosome is deleted) x x 1 ... x k 1 x k x k 1 ... x r i i i i i x x 1 ... x k 1 x k 1 ... x r i i i i x Odel x Odel is a stochastic operator. V. Kvasnička: How Can Symbiosis Guide Evolution? 27 Fitness of chromosomes Let us consider a chromosome x x 1 ... x r i i A fitness assigned to the chromosome x is r F x k 1 1 fik x ik d 1. A summation symbol with a star means that the sum runs only over different subproblems (those ones that already appeared are omitted). 2. The second negative terms of the right hand side correspond to a penalization term, where is is a small positive number and d determines a number of subproblems that are not included in x. V. Kvasnička: How Can Symbiosis Guide Evolution? 28 Pprokar:=randomly generated population of prokaryotic chromosomes; Peukar:=; epoch:=0; while epoch<epochmax do begin epoch:=epoch+1; all chromosomes are evaluated by fitness; x1:=Oselect(Pprokar); x2:=Oselect(Pprokar); if random<probprokar-prokar(x1,x2) then begin y:=Oconcatenation(x1,x2); y is evaluated by fitness; Peukar:=Peukar{y}; end; x1:=Oselect(Peukar); x2:=Oselect(Pproukar); if random<probeukar-prokar(x1,x2) then begin y:=Oconcatenation(x1,x2); y is evaluated by fitness; Peukar:=Peukar{y}; end; x1:=Oselect(Peukar); x2:=Oselect(Peukar); if random<probeukar-eukar(x1,x2) then begin y:=Oconcatenation(x1,x2); y is evaluated by fitness; Peukar:=Peukar{y}; end; Qprokar:=; for i:=1 to |Pprokar| do begin x:=Oselect(Pprokar); x':=Omut(x); Qprokar:=Qprokar{x'}; end; Pprokar:=Qprokar; Qeukar:=; for i:=1 to |Pprokar| do begin x:=Oselect(Peukar); x':=Omut(x); Qeukar:=Qeukar{x'}; end; Peukar:=Qeukar; end; Algorithm 1. A psedoPascale code of simple version of evolutionary algorithm (see Fig. 2) applied for a simulation of emergence of symbiosis. An operator Oselect performs a quasirandomly selection of a chromosome from population , where the probability of selection of a chromosome is proportional to its fitness. Two different types of populations are defined. the first population Pprokar is composed of prokaryotic chromosomes represented by binary vectors of the length n, whereas the second population Peukar is composed of eukaryotic chromosomes represented by binary vectors of the variable length pn, for p2 ( it means that an eukaryote is composed at least of two prokaryotes). Both these populations occasionally interact in such a way that two randomly selected prokaryotic chromosomes x1 and x2 are "inserted" with a probability Pinsertion into one eukaryotic chromosome, which is added into population Peukar. An evolutionary epoch of both populations consists in a creation of new populations with the same cardinalities (number of chromosomes) as the original ones, and then original populations are updated by these new populations. V. Kvasnička: How Can Symbiosis Guide Evolution? 29 V. Kvasnička: How Can Symbiosis Guide Evolution? 30