Download Algorytm GEO

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Birthday problem wikipedia , lookup

Computational complexity theory wikipedia , lookup

Theoretical ecology wikipedia , lookup

Simulated annealing wikipedia , lookup

Mathematical optimization wikipedia , lookup

Graph coloring wikipedia , lookup

Post-quantum cryptography wikipedia , lookup

Signal-flow graph wikipedia , lookup

Travelling salesman problem wikipedia , lookup

Population genetics wikipedia , lookup

Genetic algorithm wikipedia , lookup

Transcript
MULTIPROCESSOR TASK
SCHEDULING
BASED ON
GEO METAHEURISTIC
Piotr Switalski, Franciszek Seredynski
Polish-Japanese Institute of Information Technology
and
Polish Academy of Science
Motivations
´
´
´
´
At the end of last century Nature inspired
metaheuristics became a popular tool to deliver nearoptimal solutions to NP-hard problems, in particular,
to multiprocessor scheduling problem
Today near everybody has an experience in using GA,
SA, tabu search, ant colonies, swarm algorithms, etc.
Process of searching for new effective metahuristics
is continued
Any new efficient metaheuristics at the beginning of
XXI century ?
Plan of presentation
New metaheuristics: short overview
´ The idea of GEO algorithm
´ Multiprocessor scheduling problem (MSP)
´ Solving MSP with GEO
´ Experimental results
´ Conclusions
´
New metaheuristics: short overview
GEP: Gen Expression Programming
(Ferreira, 1999, 2001)
´ Hyperheuristics (Ross et al., 2003)
´ GEO: Generalized Extremal Optimization
(Sousa & Ramos, 2002)
´
Genotype and phenotype
´ Genotype
–
genetic makeup of
an organism
« what is inherited
´ Phenotype –
visible or
measurable
characteristics of an
organism
´
´
Genotype and phenotype
in Evolutionary Computation
Phenotype - a collection of parameters of a
desired solution (solution space).
Genotype - coded version of parameters of a
corresponding phenotype from solution space
Genetic Algorithms (GA) and
Genetic Programming (GP)
Genetic Algorithms
0 1
0 1
0
1
Genetic Programming
solutions’ coding
log
sin
stochastic selection
*
x
crossover
mutation
π
f ( x) = log( x) − sin(π * x)
x
Drawbacks of GA and GP
´
Linear chromosomes in GA play role of simple
replicators, i.e, they serve simultaneosly as genotype
and phenotype
«
«
´
they are both the object of selection and the guardians of genetic information
which is replicated and passed with modifications to next generations
The role of replicators is limited, e.g. it is not possible to use only a particular
region of a replicator as a solution
Nonlinear structures of GP offer richer representations
but also suffer from genotype/phenotype duality and
they can be considered as more complex replicators
«
«
Evolutionary processing these replicators is highly constrained by parsing
trees
the work of some highly efficient operators (point mutation, transposition,
inversion,...) may lead to syntactically incorrect structures
GEP: Gen Expression Programming
(GA and GP – predecessors of GEP)
´
for the algebraic expression:
´
corresponding expression tree (ET) –
the phenotype of GEP chromosoms
a
−d
b+c
y genotype (ORF or
K-expression) inferred
from the phenotype
/
d
Q
a
+
b
c
01234567
-/daQ+bc
Hyperheuristics: intelligent combing
(e.g. with GA) a set of heuristics to solve a problem
´
Algorithm:
1.
P
H(I)
I
2.
3.
P’
4.
Initialize problem P
Initilize a set H of
heuristics
for state I of the
solution find
appropriate solution
H(I); Modify the
problem (P:=P’)
if problem P is solved
then stop
else go to 3
GEO: Generalized Extremal Optimization
Evolutionary biology: Punctuated Equlibrium
Theory (paleontologists: Elredg & Gould, 1972)
´ Bak & Sneppen model (1993) to show the
phenomena of punctuated equlibrium
´ Extremal optimization (EO) (Boetcher & Percus,
2001) and Generalized Extremal Optimization
(GEO) (Sousa & Ramos, 2002)
´
Punctuated Equlibrium
´
´
It states that most sexually reproducing populations
experience little change for most of their geological
history, and that when phenotypic evolution does
occurs (criticality point), it is localized in rare, rapid
events of branching speciations
It is comonly contrasted against the theory of phyletic
gradualism, which states that evolution generally
occurs uniformly, smoothly and continously
Back & Sneppen model
´
a simple coevolutionary model of an ecosystem:
e1e2e3e4e5e6e7e8e9e10e11e12e13e14
N species are placed by side on a line with periodic
boundary conditions
« A fitness number with uniform distribution in the range
[0,1] is randomly assigned to each species
« The least adapted species is then forced to mutate (and
nearest neihgbours), and a new random value of fitness
is assigned
« Change the fitness of the least adapted species alters
the fitness landscape of neighborhood => appearence of
crashes (avalanches)
Consequence of avalanches: punctuated equlibrium
behavior: species usually experiences a large period of
stability before ‘bursts’ of evolutionary activity
«
´
GEO Algorithm
F ( x1 , x2 , …, xn ) − function to be optimized
ΔFi = Fi − Fbest
ki = f ( ΔFi ) = [1, n] (rank of i - th bit)
pi (ki ) = probability of mutation of i - th bit
pi = ki−τ
τ → 0 (random walk)
τ → ∞ (deterministic search)
F ( x1 , x2 )
ki
1 0 0 1 1 0 1 0 1 0 1 1 1 0
i
x1
x2
e1 e2 e3 e4 e5 e6 e7 e8 e9 e10 e11 e12 e13 e14
Bak & Sneppen model
Practical imlementation of GEO
Initialize randomly a population of L species (bits)
that encodes N design variables.
For a configuration of bits flip bit and calculate the
objective function value. Return the bit to its original
value. Repeat it for all bits in a configuration.
Rank the bits according to their
fitness values.
Modify a bit of the population with
probability pi=ki-τ with k=1,L
Keep the new configuration
No
Was the
stopping
criterion met?
Yes
Return the best configuration of bits
(solution) found during the search
2
5
5
Multiprocessor scheduling problem
tt1
1
3
tt2
2
3
P
P11
P
P22
P
P33
P
P44
tt3
3
1
5
1
Fig. 1. Examples of a precedence task
graph (a) and a system graph (b).
tt4
4
a)
b)
Multiprocessor system: undirected, unweighted graph Gs=(Vs,Es), called a system graph.
Parallel program: weighted, directed, acyclic graph GP=<VP,EP>, called a precedence
task graph or a program graph.
The purpose of the scheduling is to distribute the tasks among the processors in such
a way that the precedence constraints are preserved and the response time T (the
total execution time) is minimized.
T = f (allocation, scheduling_policy = const)
16
Representation of the individual in GEO
´
The population consists of one binary string. The number of bits in the string
is equal to:
N t * l bits
processor
where:
Nt - a number of tasks in a program graph,
l bits
processor - a number of bits used to code a processor number.
task # 2
task # 1
1
0
1
0
0
task # 3
1
1
1
0
Each
Each task
task is
is assigned
assigned to
to a
a
processor
processor represented
represented by
by
three
three bits
bits in
in this
this example.
example.
Tau parameter
Program graph: g100_1
System graph: FULL4
τ = 0.5
τ = 2.5
Influence of tau parameter
g200_1, FULL4
gauss18, FULL4
207 tasks
The best results for τ = 1.5 – 3.0
18 tasks
The best results for τ = 1.0 – 1.5
Experiments (2 processors)
GEO parameter:
τ=1.5 for tree15,
g18, g40, gauss18
τ=2.0 for others
GA parameters:
SYSTEM GRAPH: FULL2
Program graph
GEO
GA
9 (9)
9 (9)
g18
46 (46)
46 (46)
g40
80 (80)
80 (80)
gauss18
44 (44)
44 (46)
g25 1
495 (495)
495 (495)
g25 5
94 (95)
99 (99)
g25 10
62 (62)
62 (70)
g100 1
1481 (1481)
1481 (1481)
g100 5
395 (398)
404 (419)
g100 10
174 (177)
178 (182)
g200 1
3025 (3025)
3025 (3025)
g200 5
558 (558)
558 (568)
g200 10
484 (492)
507 (516)
tree15
Mutation
Probability: 0.03
Crossover
Probability: 0.9
Population
size: 200
Population
size: 300
Experiments (4 & 8 processors)
SYSTEM GRAPH:
FULL4
FULL8
GA parameters:
Mutation
Probability: 0.03
Crossover
Probability: 0.9
Population
size: 200
Population
size: 300
GEO parameter:
τ=1.5 for tree15,
g18, g40, gauss18
τ=2.5 for others
Conclusions
GEO metaheuristic based on Punctuated
Equlibrium Theory was presented
´ GEO was applied to solve multiprocessor
scheduling problem; results were compared
with ones obtained with use of GA
´ Preliminary results are encouraging
´
« GEO
is much simpler and more effective than GA
« more deeply study of potentials of GEO is currently
performed
THANK YOU!