Title: Logic Aided Lamarckian Evolution
1Logic Aided Lamarckian Evolution
- Evelina Lamma(1), Fabrizio Riguzzi(2),
- Luís Moniz Pereira(3)
- (1) DEIS, University of Bologna, Italy
- (2) DI, University of Ferrara, Italy
- (3) CENTRIA, Departamento de Informática
- Universidade Nova de Lisboa, Portugal
2Summary
- Genetic algorithms
- Lamarckian operator
- Multi-agent genetic algorithms
- Genes and Memes
- Multi-agent Crossover
- Belief revision
- Evolutionary approach to belief revision
- Example
- Experiments
- Conclusions
3Genetic Algorithms
- Darwinian operators
- selection
- mutation
- crossover
4Lamarckian operator
- Given a chromosome
- express it as a phenotype
- modify the phenotype in order to improve its
fitness - translate back the phenotype into a genotype
- Model of cultural evolution
- Concept of meme
5GA in Multi Agent Systems
- MAS communication of knowledge by means of
explicit messages - add communication of knowledge by exchange of
genes and memes - If the number of agents is fixed, each has a pool
of chromosomes of its own or each agent is a
single chromosome and there is a single pool of
agents
6Genetic Operators
- Crossover used in order to exchange genes and
memes among agents - a chromosome in an agent is crossed with
chromosomes from other agents - Lamarckian operator used to locally improve the
fitness by experience directed self-mutation
7Genes and Memes
- Genes are modified only by Darwinian operators
- individual physical features are fixed
- inherited irrespective of parental learning
- Memes are modified by Darwinian and Lamarckian
operators - individual cultural features are changeable
- inherited via parental learning
8Asymmetrical flow of memes
- Memes only go from teacher to learner
- In crossover
- genes are copied from both parents
- memes are copied from another agent only if that
agent has accessed and tagged them - accessed confirmed or modified after an
application of the Lamarckian operator - tagged an extra bit is associated to each meme
in order to code whether the meme has been
accessed.
9Multi-agent crossover
- A new agent offspring is produced from two parent
chromosomes - one parent comes from the pool of another agent
- bits from each parent are copied according to a
mask - The mask is such that
- genes are selected randomly, half from each
parent - memes are selected randomly, half from memes in
the other agent, but only if they have been
accessed
10Multiagent crossover
genes
memes
Ag1
child in Ag1 pool
Ag2
Mask
11Genetic algorithm
- GA(max_gen, p, r ,m, l, Fitness)
- max_gen maximum number of generations before
termination - p number of individuals in the population
- r fraction of population to be replaced by
Crossover at each step - m fraction of population to be mutated
- l fraction of population that evolves
Lamarckianly - Fitness fitness function F(hi)
-
12Genetic algorithm
- GA(max_gen, p, r ,m, l, Fitness)
- Initialize population P set of p hypotheses
randomly generated - gen 0
- while gen lt max_gen
- Generate PS by applying the following operators
to P - selection
- crossover
- mutation
- Lamarck
- update P PS
- return the hypothesis from PS with the highest
fitness
13Genetic operators
- select select (1- r) p hypotheses from P with a
probability Pb proportional to their fitness and
add them to PS - crossover for i1 to r p
- select h1 from P with probability Pb
- select h2 from another agent chosen at random
- crossover h1 with h2 obtaining h1, add h1 to
PS - mutate choose m percent of the members of PS
with uniform probability - and, for each, invert randomly one bit
- Lamarck choose l p hypotheses from PS with
uniform probability - and apply to them the Lamarckian operator
14Belief Revision
- Important functionality of agents.
- Problem definition. Given
- an extended logic program containing integrity
constraints, i.e. - ? ? B1,,Bn, not C1,,not Cm
- a set of revisable literals, i.e., literals for
which the revision is allowed. - They must not have any definition
15Belief Revision
- Find
- a truth value for the revisable literals so that
the program is not contradictory, i.e., ? does
not belong to the model of the program
16GAs for Belief Revision
- Genetic Algorithms can be used for Belief
Revision - each revisable is encoded with a meme
- the meme has value 1 if the revisable is true and
0 if it is false - each set of assumptions about the values of
revisables is coded as a chromosome
17Fitness function
- ni number of integrity constraints satisfied by
hypothesis hi - n total number of integrity constraints
18Example
- Digital circuit diagnosis
- Revisable literals indicate the assumed behaviour
mode of each gate - not ab(gate) gate behaves normally
- ab(gate) gate behaves abnormally
19Example circuit c17
obs
obs
g1
0
1
1
g10
g3
g22
0
0
1
g11
g6
0
0
g16
g2
1
1
1
g23
1
g19
g7
0
20Example circuit c17
- val( in(Type,Name,Nr), V ) -
- conn( in(Type,Name,Nr),
- out(Type2,Name2) ),
- val( out(Type2,Name2), V ).
- val( out(nand,Name), V ) -
- not ab(Name),
- val( in(nand,Name,1), W1),
- val( in(nand,Name,2), W2),
- nand_table(W1,W2,V).
- nand_table(0,0,1).
- ...
val( out(nand,Name), V ) - ab(Name),
val( in(nand,Name,1), W1), val(
in(nand,Name,2), W2), and_table(W1,W2,V).
val( out(inpt0, Name), V ) - obs(
out(inpt0, Name), V ).
21Topology
conn(in(nand, g19, 1), out(nand,
g11)). conn(in(nand, g19, 2), out(inpt0,
g7)). conn(in(nand, g22, 1), out(nand,
g10)). conn(in(nand, g22, 2), out(nand,
g16)). conn(in(nand, g23, 1), out(nand,
g16)). conn(in(nand, g23, 2), out(nand, g19)).
- conn(in(nand, g10, 1), out(inpt0, g1)).
- conn(in(nand, g10, 2), out(inpt0, g3)).
- conn(in(nand, g11, 1), out(inpt0, g3)).
- conn(in(nand, g11, 2), out(inpt0, g6)).
- conn(in(nand, g16, 1), out(inpt0, g2)).
- conn(in(nand, g16, 2), out(nand, g11)).
22Observations and constraints
- ? - obs(out(nand, g22), 0), val(out(nand, g22),
1). - ? - obs(out(nand, g22), 1), val(out(nand, g22),
0). - ? - obs(out(nand, g23), 0), val(out(nand, g23),
1). - ? - obs(out(nand, g23), 1), val(out(nand, g23),
0). - obs(out(inpt0, g1), 0).
- obs(out(inpt0, g2), 1).
- obs(out(inpt0, g3), 0).
- obs(out(inpt0, g6), 0).
- obs(out(inpt0, g7), 0).
- obs(out(nand, g22), 0).
- obs(out(nand, g23), 1).
23Diagnosis
- One of the integrity constraints is violated
- the observed output for g22 is different from the
computed output. - Contradiction is removed by assuming
- ab(g22)
- which is a diagnosis for the circuit.
24Belief Revision
- Support Set a support set of a literal L of a
program P, denoted by SS(L), is a set of
revisables sufficient to support a derivation of
L in P
25Belief Revision
- Hitting set a hitting set of for a collection of
SS(L) is the union of one non-empty subset from
each SS(L). It is minimal iff no proper subset
is a hitting set. - A contradiction removal set is a hitting set for
the SS(?).
26Lamarckian operator
- The Lamarckian operator uses techniques similar
to BR ones. - It differs from BR because it starts from an
arbitrary chromosome C - The Lamarckian support sets are all the support
sets that are subsets of the current chromosome C
27Lamarckian operator
- find all the Lamarckian support sets for ? with
respect to C - find a hitting set HS(?) for them
- change in C all its literals which are in HS(?).
28Example circuit c17
- Suppose, initially
- Cab(g10), not ab(g11), ab(g16), not ab(g19),
not ab(g22), not ab(g23) - In this case, two constraints are violated
because out(g22)1 and out(g23)0
29Example circuit c17
- A BR operator would return as changes to C
- not ab(g10), not ab(g11), not ab(g16), not
ab(g19), ab(g22), not ab(g23) - these are consistent with both ICs
30Example circuit c17
- Lamarckian support sets of ?
- not ab(g11),not ab(g19),not ab(g11),ab(g16),not
ab(g23) - not ab(g11),ab(g16),ab(g10),not ab(g22)
- Lamarck returns these changes to C, one for each
hitting set - Cab(g10), ab(g11), ab(g16), not ab(g19), not
ab(g22), not ab(g23) - Cab(g10), not ab(g11), not ab(g16), not
ab(g19), not ab(g22), not ab(g23) - one constraint in either case is still violated
31Experiments
- ISCAS85 collection of benchmark digital circuits
- Four algorithms considered
- S-L single agent GA without the Lamarckian
operator - M-L as S-L but multi agent
- ML-A as M-L plus Lamarck, without asymmetry
- MLA as ML-A plus asymmetry
32Results
- alu4_flat circuit
- 100 gates (100 revisables)
- 8 outputs (16 constraints)
- 4 agents, with same observations and constraints
- 10 chromosomes each, l0.6
- 5 experiments
- Average fitness
33Conclusions
- Framework for solving problems represented with
logic - belief revision
- dynamic world, control of observable outputs
- Performance improvement by
- distributed agents
- Lamarckian operator
- asymmetric crossover on memes
34Future work
- Situations where
- agents do not have the same observations,
constraints or revisables - observations change over time
- Three-valued memes for expressing irrelevancy
- Integrating Lamarckism with other agent features
35- ab(c11gat),ab(c19gat),ab(c11gat),ab(c16gat),ab(c2
3gat), - not ab(c11gat),ab(c19gat),ab(c11gat),ab(c16gat),a
b(c23gat), - ab(c11gat),not ab(c19gat),ab(c11gat),ab(c16gat),a
b(c23gat), - not ab(c11gat),not ab(c19gat),ab(c11gat),ab(c16ga
t),ab(c23gat), - ab(c11gat),ab(c19gat),not ab(c11gat),ab(c16gat),a
b(c23gat), - not ab(c11gat),ab(c19gat),not ab(c11gat),ab(c16ga
t),ab(c23gat), - ab(c11gat),ab(c19gat),ab(c11gat),not
ab(c16gat),ab(c23gat), - not ab(c11gat),ab(c19gat),ab(c11gat),not
ab(c16gat),ab(c23gat), - ab(c11gat),ab(c19gat),not ab(c11gat),not
ab(c16gat),ab(c23gat), - not ab(c11gat),ab(c19gat),not ab(c11gat),not
ab(c16gat),ab(c23gat), - ab(c11gat),not ab(c19gat),not ab(c11gat),not
ab(c16gat),ab(c23gat), - not ab(c11gat),not ab(c19gat),not ab(c11gat),not
ab(c16gat),ab(c23gat), - ab(c11gat),not ab(c19gat),not ab(c11gat),ab(c16ga
t),not ab(c23gat), - not ab(c11gat),not ab(c19gat),not
ab(c11gat),ab(c16gat),not ab(c23gat), - ab(c11gat),not ab(c19gat),ab(c11gat),not
ab(c16gat),not ab(c23gat), - not ab(c11gat),not ab(c19gat),ab(c11gat),not
ab(c16gat),not ab(c23gat), - not ab(c11gat),ab(c16gat),not ab(c10gat),ab(c22ga
t), - ab(c11gat),not ab(c16gat),not ab(c10gat),ab(c22ga
t), - ab(c11gat),ab(c16gat),ab(c10gat),not
ab(c22gat),
36Belief Revision
- Support Set a support set of a literal L of a
program P, denoted by SS(L), is obtained as
follows - if L is not a revisable literal, then, for each
rule L ?B in P, there is one SS(L) given by the
union of SS(Bi) for each Bi ? B. If B is empty
then SS(L) - if L is a revisable literal then SS(L)L
37Lamarckian operator
Lamarckian support set given an hypothesis C, a
Lamarckian support set of a literal L of a
program P, denoted by SS(L), is obtained as
follows if L is not a revisable literal, then,
for each rule L ? B in P there is one SS(L) given
by the union of SS(Bi) for each Bi ? B. If B is
empty then SS(L) if L is a revisable literal
then if L belongs to C, then SS(L)L if L is
not in C or the default complement belongs to C
then the SS(L) under construction is not a
support set
38Results, single agent
- Single agent, with and without the Lamarckian
operator - Fitness function
- fi number of revisables of hi that are false