www.kovan.ceng.metu.edu.tr parallelized evolution system onur soysal, erkin bahçeci erol Şahin...
Post on 19-Dec-2015
220 views
TRANSCRIPT
www.kovan.ceng.metu.edu.tr
Parallelized Evolution System
Onur Soysal, Erkin Bahçeci
Erol Şahin
Dept. of Computer Engineering
Middle East Technical University
http://www.kovan.ceng.metu.edu.tr
ISCIS’03
04/11/2003
ISCIS’03 www.kovan.ceng.metu.edu.tr
Evolutionary MethodsSimulation of Natural Evolution
Using evolution mechanisms to solve optimization problems
Survival of the fittest...........
Generation n
Chrom.1: 0101011001...
Chrom.2: 1100110111...
.........
Generation n+1
SelectReproduceMutate
...........
Chrom.1: 1010001110...
Chrom.2: 0011110101...
.........
Population n
Population n+1
ISCIS’03 www.kovan.ceng.metu.edu.tr
Genetic AlgorithmsEncoding
Binary representation
Stochastic searchGuided by measure of fitness
Problem-specific fitness function
Genetic operatorsMutation
Crossover
ISCIS’03 www.kovan.ceng.metu.edu.tr
Evolutionary Robotics
MotivationController: Sensor-actuator relationshipDifficult to design manually in nontrivial tasksTo be in the shoes of a robot?
Solutions of evolutionary roboticsEvolving controllers
Sensors ActuatorsController
???
ISCIS’03 www.kovan.ceng.metu.edu.tr
Genotype Phenotype:Generic Controller
010101 100111...
Sensor data
Actuator outputs
Convert to controller
parameters Use the controller
in robots
ControllerController
Chromosome
ISCIS’03 www.kovan.ceng.metu.edu.tr
Genotype Phenotype:Neural Network Controller
010101 100111...
Sensor data
Actuator outputs
Convert to neural
network weightsUse the neural network
to control robots
Chromosome
ISCIS’03 www.kovan.ceng.metu.edu.tr
Fitness Evaluation
Use controlleron physical robots
on simulated robots
Observe behavior
Calculate fitness value
Repeat for each generation
• for each chromosome
ISCIS’03 www.kovan.ceng.metu.edu.tr
Physics Based SimulationImportance of realistic simulationsPros
Much faster runtimecompared to physical implementationBehavioral similarity to physical robotsRealistic interactions
ConsHigh processing demand!
Example libraries: ODE, Vortex, Havok
ISCIS’03 www.kovan.ceng.metu.edu.tr
Single Machine Limitations
Computation requiredSolving Ordinary Differential Equations
Increasing complexity with more collisions
Time estimates for single computerOrder of minutes for a single evaluation
For 100 chromosomes and 100 generations• Total time > a week on a single machine
ISCIS’03 www.kovan.ceng.metu.edu.tr
Cluster Computing
Cheap alternative to supercomputers
Large-grained problems
Example applicationSETI@home: Search for Extraterrestrial Intelligence at home
ISCIS’03 www.kovan.ceng.metu.edu.tr
Cluster Computing Solution to Evolutionary Robotics
Fitness evaluations dominate computation time
Fitness evaluations are independent
Master-Slave modelMaster: GA
Slaves: Fitness evaluations
ISCIS’03 www.kovan.ceng.metu.edu.tr
Parallel Evolution System (PES)Parallel Genetic Algorithm libraryDistributed fitness evaluationCentral genetic algorithmSupports interoperability of multiple platforms
ISCIS’03 www.kovan.ceng.metu.edu.tr
PES Architecture
Server: GA
Clients: Fitness evaluation
PES-C
PES-C
PES-C
Client Application
Client Application
Client ApplicationPES-SServer
Application
ISCIS’03 www.kovan.ceng.metu.edu.tr
PES Communication Model
PES Network Adapter
PES-C
PES Network Adapter
PES-S
Ping mechanism
Task and result packets
ping
ping reply
task
result
ISCIS’03 www.kovan.ceng.metu.edu.tr
PES-S Architecture
Server Application
GA Engine
Task Manager
PES-S
Task generator
Best solutions
Network Adapter
ISCIS’03 www.kovan.ceng.metu.edu.tr
PES-C Architecture
Client ApplicationNetwork Adapter
Task
Fitness
PES-C
ISCIS’03 www.kovan.ceng.metu.edu.tr
PES Usage: Server
Server Code
#include <pes.h>int main(){
PES_INIT();for each generation{
PES_EVAL_INDIVIDUALS();PES_NEXT_GENERATION();
}}
ISCIS’03 www.kovan.ceng.metu.edu.tr
PES Usage: Client
Client Code
#include <pes.h>int main(){
PES_INIT();while true{
RECEIVE_TASK();EVAL_TASK();SEND_RESULT();
}}
ISCIS’03 www.kovan.ceng.metu.edu.tr
PES FeaturesMulti-platform support
Linux and Windows via PVM
Improved fault tolerancePing mechanism to detect non-responding clients
Supplies GA facilitiesBuilt-in crossover, mutation and selection functions
Simplified usageAutomatic task distribution / fitness collectionSingle line for evaluating fitness of whole populationBasic load balancing
ISCIS’03 www.kovan.ceng.metu.edu.tr
Our ApplicationTask: Aggregation
Getting 10 robots as close as possible
Minimal sensors and communication
Modified single layer NN for controlNo memory/learning
No world knowledge
Probabilistic inputs
Fitness evaluation 2000 steps of simulation
Total distance as fitness measure
1
2
3
1
3 2
31 2
31 2
R
ISCIS’03 www.kovan.ceng.metu.edu.tr
Sample Application Results
ISCIS’03 www.kovan.ceng.metu.edu.tr
Processor Load BalancingDynamic simulationVarying number of collisionsVarying task complexityVarying processor load
Diamonds: tasks Solid lines: Start of new generation
ISCIS’03 www.kovan.ceng.metu.edu.tr
Fault ToleranceProcessor 2 fails
Detected at ping at 15th sec
Task restart at 19th sec
Red lines: PingBlue lines: GenerationNumbers: Task index
ISCIS’03 www.kovan.ceng.metu.edu.tr
Efficiency & Speedup
ISCIS’03 www.kovan.ceng.metu.edu.tr
Discussions & Future Work
Generation gapAsynchronous reproduction
Dynamic host list
Progress monitor
Extension to the Internet
ISCIS’03 www.kovan.ceng.metu.edu.tr
PES Sources & Documentation
Source distribution under Gnu Public License (GPL)
User manual
Functional reference
Sample applications
http://www.kovan.ceng.metu.edu.tr/software/PES