paulo moisés vidica and gina maira barbosa de oliveira- cellular automata-based scheduling: a new...

26
Cellular Automata Cellular Automata - - Based Based Scheduling: A New Approach to Scheduling: A New Approach to Improve Generalization Ability of Improve Generalization Ability of Evolved Rules Evolved Rules Paulo Moi s Vidica Gi na Mai ra Barbosa d e Oliveir a Universidade Federal de Uberlândia

Upload: irokk

Post on 06-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 1/26

Cellular AutomataCellular Automata

--BasedBased

Scheduling: A New Approach toScheduling: A New Approach to

Improve Generalization Ability of Improve Generalization Ability of Evolved RulesEvolved Rules

Paulo Moisés Vidica

Gina Maira Barbosa de Oliveira

Universidade Federal de Uberlândia

Page 2: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 2/26

Cellular Automata (CA)

• Cellular Automata are discrete dynamic systems

formed by simple and identical components (called cells)

with local connectivity.

• The simplest CA is the one-dimensional binary

formed by a line of cells (the lattice) where each cell canassume states 0 or 1.

• A cellular automaton is characterized by a transitionrule, that determines which will be the next state of the

lattice, from the current state of the CA. For each cell i,

a neighborhood of radius r is defined.

Page 3: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 3/26

Transition Rule:

Cellular Automata (CA)

Page 4: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 4/26

Space-time diagram

Page 5: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 5/26

Areas of Research

CA

Dynamics Computation

This

work

Modeling Artificial Life

Page 6: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 6/26

Dynamic behaviorDynamic behavior

Page 7: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 7/26

Computation in CAs•

Ability: capacity to perform computations.• Parallel Structures (cells) with an extremely simple logic: an

option for decentralized architectures of computers

• Understanding of how computations are performed is still vague.Approaches for make feasible its programming are being studied.

• A successful approach: use of Genetic Algorithms (GAs) onsearch of CAs with a desired computational ability.

• Example of computational tasks:• Task of Density Classification

• Synchronization Task

Cryptography• Scheduling

Page 8: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 8/26

Multiprocessor Scheduling

• Architecture: 2 processors (P0 and P1)• Parallel program: program graph. Ex.: Gauss18

Page 9: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 9/26

Page 10: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 10/26

CA-Based Scheduling

- Lattice: cell associated with each task

- Configuration: allocation of tasks in P0 and P1

Problem: to find a CA rule able to converge, after some time steps

(temporal evolution), to an allocation of tasks which minimizes T 

starting from any initial allocation (T  min)

 

t = 01 1 0 0 1 0 1 1 1 1 0 0 0 0 1 0 1 1

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

t = 500 1 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Aplly rule

Page 11: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 11/26

- Neighborhoods studied in the literature: linear (standard

CA) and nonlinear (Selected and Full with Totalistic Rules).

- Nonlinear models: successors, predecessors and brothers- Example: Task 8 of Gauss18

Predecessors(8)={3,6}

Successors(8)={11,12}Brothers(8)={7,9,10,11}

CA Neighborhood Model

(Seredinsky, 2001)

Page 12: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 12/26

Selected NeighborhoodNeighborhood: (q

k

,qP

k

,qB

k

,qS

k

)

qk →→→→ current state of cell k

qPk→→→→ state associated with the predecessors of  k

qBk →→→→ state associated with the brothers of  k

qSk →→→→ state associated with the successors of  k

• For each set (P, B e S) is associated an attribute of graph. The

attributes selected for each set may be different.

• Attribute used for P, B and S: dynamic level.• Only two representative tasks are selected of each set:

maximal (max_v) and minimal (min_v) value for the chosen

attribute.• Irregular structure of program graph:

• If P (B or S) do not exist for a given task

then max_v = min_v = special value.

Page 13: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 13/26

Selected Neighborhood• If only one P (B or S) exists for a given task

Then max_v = min_v = state of cell corresponding to the

existing task.

• If the number of P (B or S) is greater than 2 and all of 

them have the same value of an attributethen max_v = state of cell with smallest order

number and min_v = state of cell with the largest

order number.• The value of qP

k (similar to qBk e qS

k) is defined as:

• 0, if max_v = min_v = 0 (both tasks are in the processor P0)

• 1, if max_v = 0 and min_v = 1 (the first is in the processor P0

and the second is in the processor P1)

• 2, if max_v = 1 and min_v = 0 (the first is in the processor P1

and the second is in the processor P0)

• 3, if max_v = min_v = 1 (both tasks are in the processor P1)• 4 if max_v = min_v = s ecial value there are no redecessors

Page 14: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 14/26

Selected Neighborhood

The transistion rule must define all the mappings:

(qk,qPk,qB

k,qSk) →→→→ q’

k

The rule length: 250 bits

The total number of rules: 2250

Genetic Search

Page 15: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 15/26

Architecture of CA-based scheduler (Seredinsky, 2001)

Two phases:

-Learning: GA is used in the search of CA rules able to

schedule a specific program graph. Ex: GAUSS18

-Operating: The rules found are used to schedule different

program graphs (the program graph used in the learningphase and others).

The best discovered rules by the GA are stored

in a repository of rules.

Page 16: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 16/26

(Seredinsky, 2001)

Page 17: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 17/26

GA Environment

• Population: P CA transition rules

• Random initial population

• Fitness: each CA rule is applied to C  initial configurations (ICs),

each one corresponding to an initial allocation of a program graphin the processors, for M time steps. A fitness value for the rule is the

sum of found values of total execution time T corresponding to each

final configuration of CA (∑C T final). The smaller is the fitness the

better is the rule.

• Elite:  E best rules are copied without modification to the next

generation

•Selection: randomly formed pairs using the elite• Crossover and Mutation: ( P - E) new rules formed by single-point

crossover and mutation (flipping bits at random)

• Stop condition: G generations

• P = 100, E = 10, pc = 90%, pm = 1.2%, G = 100, C = 25 e M = 50

Page 18: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 18/26

Analise of Published Results

– The CA-based scheduler was able to discover rulesthat can successfully schedule several program graphs

previously studied in literature (learning phase).

– But when the discovered rules evolved for a specific

graph were applied to other graphs, the rules did not

present a good generalization ability.

– The published works are promising but have not

presented the desired performance yet.

Page 19: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 19/26

Generalization Ability

– Crucial to the CA-based scheduling.

– The huge computational effort necessary in the

discovery of the CA rules is justified only if these rulesare able to be reused in new problems.

– Otherwise, a GA can be directly used in the search for

optimal configurations of each graph independently,

without the need to involve the CA in the model.

–The idea behind using CA rules is the possibility of these rules being reused in new problems, without the

need for a new process of evolutionary learning.

Page 20: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 20/26

Generalization Ability

– A little information about this generalization abilitywas shown and just a few examples of the reusing of 

rules were indeed verified.

– We realized initial experiments applying the evolvedrules for Gauss18, in the learning phase, to graphs

totally different from it and we concluded that

reasonable results were found only in graphs where an

optimal solution was easy to reach.

– Central question: a rule evolved based on a specific

program graph should return at least reasonable

results (near to the optimal) when applied to new

graphs that are small variations of the original.

Page 21: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 21/26

New Approach: JOINT EVOLUTION

•Simple Evolution: In the learning phase, the GA is used inthe search of CA rules able to schedule based on only a

specific program graph (approach proposed by Seredinsky

and collaborators).

•Joint Evolution: In the learning phase, the GA is used in

the search of CA rules able to schedule a program graph

and some of its variations.

•In both approach, in the operating phase, this rules are

applied to the original graph and also applied to its

variations.

•We expect that in the Joint Evolution approach the

evolved rules will be more general than the rules evolved

Page 22: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 22/26

Example of Gauss18 Variation

Page 23: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 23/26

Experiments

1. Random allocation: 10.000 random initial allocation weregenerated, for each program graph analised.

2. Simple GA: a GA was implemented to schedule the tasks,

for each program graph analised.

3. Simple Evolution: Learning phase based only on Gauss18.4. Joint Evolution: Learning phase performed with Gauss18

and more 5 of its variations.

The evaluation was made calculating T for 15 variations of Gauss18 (10 different + 5 of the Joint Evolution)

Each variation of Gauss18 was evaluated in 100 ICs (T  med  ).

Experiments with GA: 30 runs (results presented for the best

rule).

CA model: Sequential mode operation.

Page 24: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 24/26

Results

Learning phase (Simple Evolution)

Learning phase (Joint Evolution)

T  min=44

T  min=282

Page 25: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 25/26

Results

Confidence Interval and Null Hypotheses:Simple Evol.: 95% confident that T  med  is in 54,42 and 56,54

Joint Evol. : 95% confident that T  med is in 47,52 and 48,15:

95% confident this improvement lies between 6,51 and 8,73

Page 26: Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

8/3/2019 Paulo Moisés Vidica and Gina Maira Barbosa de Oliveira- Cellular Automata-Based Scheduling: A New Approach to Improve Generalization Ability of Evolved Rules

http://slidepdf.com/reader/full/paulo-moises-vidica-and-gina-maira-barbosa-de-oliveira-cellular-automata-based 26/26

Conclusions

• The rules evolved by Joint Evolution have presented a better

generalization ability than Simple Evolution (Seredynski, 2001),

which guarantees them power to schedule new program graphs.

• This generalization ability is essential to the CA-based scheduler

model

• The rules discovered with Joint Evolution have an intrinsicscheduling strategy in such a way that when they are applied to a

new program graphs, optimal or suboptimal allocations are

returned without the need for a new evolution.