Escolar Documentos
Profissional Documentos
Cultura Documentos
Algoritmos Genéticos
aula 2 - exemplos
DE B A HGF I C x x x DE F Gx x DE B A HGF I C x x x DE F Gx x
3
3 4
D B
prof. Luis Otavio Alvares prof. Luis Otavio Alvares
Caixeiro viajante Trabalho de Jorge Meinhardt
Exemplos de programa • “O presente trabalho pretende mostrar a
possibilidade de uso de uma ferramenta
p
de inteligência artificial utilizando a
abordagem de algoritmo genético para
http://www.mac.cie.uva.es/~arratia/cursos/UVA/GeneticTSP/JAVASimultn/TSP.html auxílio ao projeto altimétrico de rodovias.”
http://www.dna-evolutions.com/dnaappletsample.html
1. Introduction (…)
( ) 1. Introduction (…)
( )
Wh tto use an E
Why Evolutionary
l ti R
Reactive
ti M Multi-agent
lti t Systems
S t ? P i
Previous work:
k th
the Si
Simula
l TTool!
l! [F
[Frozza]]
- adaptation to dynamically environments A graphical tool to teach the multi-agent technology
developed in the Instituto de Informática – UFRGS by
- adaptation to unknown environments
Rejane Frozza and Luis Otávio Alvares
Cl
Class off agents
t and
d th
the B
Behavior
h i
- Reactive Multi-agent Systems Agent 00
- Didactic tool Rule A
Class X Agent 01
Rule B
- Graphical User Interface Rule A R l A
Rule
Rule C Agent 02
Rule B Rule B
Rule A
Rule C Rule C
Rule B
Rule C
Initial State
3. Simula ++ (…)
( ) 3. Simula ++ (…)
( )
E hA
Each Agentt has
h I d
Independent
d t Elements
El t ( equall ffor allll agents
t off the
th same class
l )
- Set of Independent Elements - Initial Energy
- Chromosome ( set of rules ) - Energy Amount
- Maximum Life Time
- Life Time
- Sexual Maturity Time
- New Generation Time
4. Genetic Operators
p 4. Genetic Operators
p ((…))
O P i tE
One-Point External
t lCCrossover T
Two-Point
P i tEExternal
t lCCrossover I t
Internal
l Crossover
C
Agent 00
Agent 00 Agent 01 Agent 00 Agent 01 IF perceive
i Agent
A A AND not perceive
i A Agent B
M t ti
Mutation - C ll t allll minerals
Collect i l ffrom an unknown
k environment
i t
- between 1% and 2% - The environment is a grid ( 100 x 100 )
- change pieces of a rule (respecting the semantic value) - Base is fixed
AND/OR - All agents known where is the base
Agent A, Agent B, Agent C, … - There are three mines, with 100 units of mineral
perceive_agent, search_agent, escape_from_agent,…
5. Food Foraging
g g Problem ((…)) 5. Food Foraging
g g Problem ((…))
It was defined
d fi d six
i simulation
i l ti groups: St d d Group
Standard G (evolved
( l d by
b th
the evolutionary
l ti algorithm)
l ith )
IF NOT perceive (Mine) AND NOT perceive (Robot)
- Petit Poucet I [Drougol]
THEN random move
- Petit Poucet II [Drougol] IF NOT perceive (Mine) AND perceive (Robot)
THEN follows (Robot)
- Petit Poucet III [Drougol]
IF NOT perceive (Mine) AND reach (Robot)
- Dockers [Drougol] THEN flee (Robot)
IF perceive (Mine)
- Evolutionary Group
THEN load AND return to base AND leave (Mark Track)
- Standard Group IF perceive (Mark Track)
THEN follows(Mark Track) AND remove(Mark Track)
8000
• Programação
P ã genética
é i é uma técnica
é i automática
ái dde programação
ã
E Group
S Group que propicia a evolução de programas de computadores que
6000
resolvem (ou aproximadamente resolvem) problemas
4000
2000
• Na programação genética, os indivíduos da população não são
0 seqüências de bits,
bits mas sim programas de computador
1
11
16
21
26
31
36
41
46
51
56
61
66
71
76
81
86
91
96
armazenados na forma de árvores sintáticas. Tais programas é que
Number of Robots
são os candidatos à solução do problema proposto.
PP1 PP2 PP3 Doc. E S
Time to collect all minerals 3351 5315 3519 1746 2303 2217
Minimum time to collect all minerals 1113 1607 1075 695 770 540
Programação genética
Referências