Classifier Systems in Genetic Programming
Classifier Systems in Genetic Programming
Classifier Systems
input
decoder input message list
working memory
internal messages
environment
output
effector output message list
genetic
production memory
operators for
classifier rules
rule changes
Ref: A
5. George F Luger,
working Elaine
memory Rich
for theKevin Knight
classifier Prepared
rules. This by:integrates
memory Abin Philip,
the Asst.Prof,
results of Toc H
production rule firing with input information.
Page 23 of 29 APJKTU CS464 ARTIFICAL INTELLIGENCE
The classifier system of Figure has the following major components:
5. A working memory for the classifier rules. This memory integrates the results
of production rule firing with input information.
Q) explain the purpose of bidding scheme and bucket brigade procedure used in
Classifier systems ( these need to be explain while explaining classifier systems too)
The second form of learning modifies the rules themselves using genetic operators
such as mutation and crossover. This allows the most successful rules to survive and
combine to make new classifiers, while unsuccessful rule classifiers disappear.
Each classifier rule consists of three components: the rule’s condition matches data in
the working memory in the typical production system sense. In learning, genetic
operators can modify both the conditions and the actions of the production rules. The
second component of the rule, the action, can have the effect of changing the internal
message list (the production memory). Finally, each rule has a fitness measure. This
parameter is changed, as just noted, both by successful as well as by unsuccessful
activity. This measure is originally assigned to each rule on its creation by the genetic
operators; for example, it may be set as the average fitness of its two parents.
where each ci in the condition pattern denotes the value {1, 2, ..., 5} of the ith
attribute of the condition. Usually, conditions can also assign a value of # or “don’t
care” to an attribute. Ai denotes the classification, A1, A2, A3, or A4. Table 12.2
presents a set of classifiers. Note that different condition patterns can have the same
classification, as in rulesAi1denotes
attribute. and 2, theor the sameA1,patterns,
classification, A2, A3, or as
A4.in rules
Table 12.2 3 and 5,
presents a setcan lead to
of clas-
sifiers. Note that different condition patterns can have the same classification, as in rules 1
different classifications.
and 2, or the same patterns, as in rules 3 and 5, can lead to different classifications.
(1 # # # 1 #) → A1 1
(2 # # 3 # #) → A1 2
(# # 4 3 # #) → A2 3
(1 # # # # #) → A2 4
(# # 4 3 # #) → A3 5
etc.
(1 # # # 1 #) → (1 0 0 0)
(2 # # 3 # #) → (1 0 0 0)
(1 # # # # #) → (0 1 0 0)
(# # 4 3 # #) → (0 1 1 0)
In this example, the last of these summaries indicates that the condition attributes
support classification rules A2 and A3 and not A1 or A4. By replacing the 0 or 1
assignment with these vectors, the learning algorithm can evaluate the performance
of a rule across multiple classifications.
In this example, we will use the rules in Table 12.2 to indicate the correct classifica-
tions; essentially, they will function as teachers or evaluators of the fitness of rules in
the learning system. As with most genetic learners, we begin with a random
population of rules. Each condition pattern is also assigned a strength, or fitness,
parameter (a real num- ber between 0.0, no strength, and 1.0, full strength. This
strength parameter, s, is com- puted from the fitness of each rule’s parents, and
measures its historical fitness.
At each learning cycle, the rules attempt to classify the inputs and are then ranked by
the teacher or fitness metric. For example, assume that at some cycle, the classifier
has the
Ref: George F Luger, Elaine Rich Kevin Knight Prepared by: Abin Philip, Asst.Prof, Toc H
Page 27 of 29 APJKTU CS464 ARTIFICAL INTELLIGENCE
domain, may consist of standard arithmetic operations, other related programming
opera- tions, and mathematical functions, as well as logical and domain-specific
functions. Pro- gram components include data items of the usual types: boolean,
integer, floating point, vector, symbolic, or multiple-valued.
To initialize the structures for adaptation by genetic operators, we must create two
sets: F, the set of functions and T, the set of terminal values required for the domain.
F can be as simple as {+, *, −, /} or may require more complex functions such as
sin(X), cos(X), or functions for matrix operations. T may be the integers, reals,
matrices, or more complex expressions. The symbols in T must be closed under the
functions defined in F.
The program we have randomly produced is represented in Figure Figure a gives the
tree after the first selection of +, fig b after selecting the terminal 6, and fig c, the
final program. A population of similar programs is created to initialize the genetic
programming process.
Ref: George F Luger, Elaine Rich Kevin Knight Prepared by: Abin Philip, Asst.Prof, Toc H
Page 28 of 29 APJKTU CS464 ARTIFICAL INTELLIGENCE
+
Genetic operators
applied on a tree
+
* 6
+
* 6
8 +
5 7
a. b. c.
of selected
a program.asFora crossover point. a terminal value with another a.value or a function
example, replacing
b.
Figure 12.5 Two programs, selected on fitness for crossover. Point |
subtree. The permutation transform, similar to the inversion Figure 12.5 operator
from andon
Twoa programs, strings,
b are also
selected
randomly on fitness for
selected for crossover.
crossover. Point |
works on single programs, exchanging terminal symbols, or subtrees, fromfor a and b are randomly selected for crossover.
example.
The state of the solution is reflected by the current generation of programs. There is
no record keeping for backtrack or any other method for skipping around + the fitness land- −
scape. In this+ aspect genetic programming − +
is much like the hill-climbing algorithm −
described| in Section 4.1. The genetic programming paradigm parallels nature in that the
+ −
evolution of new programs is a continuing process. Nonetheless, +
COS lacking infinite time and *
computation,
*
| + 8
termination conditions are set. These* COS
are usually a function both + of program 8
8 *
+
fitness and* computational resources. 8
| * 3
The fact that genetic programming is a technique for the computational generation of
SIN *
| 3 10 8
computer
4 6programs
10 places it within the automatic8 programming research tradition.
SIN COS 10 SIN From * 8
the earliest
4 days
6 10 of AI,SIN researchers have
COS worked 8 to automatically produce computer
6
programs from fragmentary 6
information (Shapiro 1992). Genetic programming 6 can be 4 6
3
seen as another tool for 6this important research3 domain. We conclude this section with a 4 6
a. b. a. b.
simple examplea. of genetic programming b.
taken from Mitchell (1996).
a. b.
Figure 12.5 Two programs, selected on fitness for crossover. Point | Figure 12.6 The child programs produced by cross-
Figure 12.5fromTwo programs,
a and selected on
b are randomly fitness for
selected forcrossover.
crossover.Point | Figure 12.6 over
Theofchild programs
the points produced
in Figure 12.5.by cross-
from a and b are randomly selected for crossover. over of the points in Figure 12.5.
CHAPTER 12 / MACHINE LEARNING: SOCIAL AND EMERGENT 527
EXAMPLE 3.2.1: EVOLVING A PROGRAM FOR KEPLER’S THIRD LAW OF PLANETARY MOTION
+ + −− EXAMPLE 3.2.1: EVOLVING A PROGRAM FOR KEPLER’S THIRD LAW OF PLANETARY MOTION
Koza (1992, 2005) describes many applications of genetic programming to solve intere
Koza
ing (1992, but
problems, 2005) describes
most of thesemany applications
examples are largeof and
genetic programming
too complex for ourto solve
presentinte
p
Ref: George F+Luger,
COSCOS + Elaine8Rich Kevin * ing problems,
Knight
poses. Prepared
but most
Mitchell (1996), of by:
these
however, hasAbin
examplesPhilip,
created are Asst.Prof,
large
a simple and too Toc
complex
example that H for
illustratesour present
many of
8 *poses. Mitchell (1996), however, has created a simple example that illustrates many o
concepts of genetic programming. Kepler’s Third Law of Planetary Motion describes
concepts relationship
functional of genetic programming. Kepler’s
between the orbital ThirdP,Law
period, of aofplanet
Planetary Motion
and its averagedescribe
distan
3 3 functional relationship
A, from the sun. between the orbital period, P, of a planet and its average dista
10 SINSIN *
Page 29 of 29 APJKTU CS464 ARTIFICAL INTELLIGENCE
There are a number of secondary, and much less used, genetic transforms of program
trees. These include mutation, which simply introduces random changes in the structures
of a program. For example, replacing a terminal value with another value or a function
subtree.The permutation transform, similar to the inversion operator on strings, also
works on single programs, exchanging terminal symbols, or subtrees, for example.
Ref: George F Luger, Elaine Rich Kevin Knight Prepared by: Abin Philip, Asst.Prof, Toc H