gbml

80
Introduction to Genetics-based Machine Learning Mahalingam.P.R Semester III, M.Tech CSESIS, RSET

Upload: mahalingam-ramaswamy

Post on 01-Nov-2014

709 views

Category:

Education


1 download

DESCRIPTION

Genetics Based Machine Learning

TRANSCRIPT

Page 1: Gbml

Introduction to Genetics-based

Machine Learning

Mahalingam.P.R

Semester III, M.Tech CSESIS, RSET

Page 2: Gbml

Contents

Background of Machine Learning

About Machine Learning

GA in Machine Learning

Evolution of GBML

Classifier System

Rule and Message System

Apportionment of Credit System

Genetic Algorithm

A simple classifier system in Pascal

Conclusion

2 Introduction to GBML

Page 3: Gbml

Introduction

Introduction to GBML3

Page 4: Gbml

Machine Learning

A machine learns whenever it changes its structure,

program, or data (based on its inputs or in response

to external information) in such a manner that its

expected future performance improves.

Machine learning usually refers to the changes in

systems that perform tasks associated with artificial

intelligence (AI).

Such tasks involve recognition, diagnosis, planning,

robot control, prediction, etc. The “changes" might be

either enhancements to already performing systems

or ab-initio synthesis of new systems.

4 Introduction to GBML

Page 5: Gbml

A typical AI system

Here, the model progressively learns from the experience it earns from the environment

Introduction to GBML5

Page 6: Gbml

Need for Machine Learning

Some tasks cannot be defined well except byexample. We might be able to specify input/output pairs but not a

concise relationship between inputs and desired outputs.

We would like machines to be able to adjust their internalstructure to produce correct outputs for a large number ofsample inputs

suitably constrain their input/output function to approximate therelationship implicit in the examples.

It is possible that hidden among large piles of dataare important relationships and correlations. Machine learning methods can often be used to extract

these relationships (data mining).

6 Introduction to GBML

Page 7: Gbml

Machine learning methods can be used for on-the-jobimprovement of existing machine designs.

The amount of knowledge available about certain tasksmight be too large for explicit encoding by humans. Machines that learn this knowledge gradually might be able to

capture more of it than humans would want to write down.

Environments change over time. Machines that can adapt to a changing environment would

reduce the need for constant redesign.

New knowledge about tasks is constantly beingdiscovered by humans (Vocabulary changes). There is a constant stream of new events in the world.

Continuing redesign of AI systems to conform to newknowledge is impractical.

Machine learning methods might be able to track much of it.

7 Introduction to GBML

Page 8: Gbml

More on Machine Learning

Contributions to Machine Learning

Varieties of Machine Learning

Introduction to GBML8

Statistics

Brain Models

Adaptive Control Theory

Psychological Models

Artificial Intelligence

Evolutionary Models

Functions

Logic Programs and

Rule sets

Finite-state machines

Grammars

Problem solving

systems

Page 9: Gbml

GA in Machine Learning

Introduction to GBML9

Conventional GA systems work with the followingproperties: Probabilistic

Random

Enumerative

The structures adapted cater to the human-likemechanism adopted in the methodology.

This adaptation itself is the biggest hindrance whenincorporating GA into more complex, less completelydefined environments. Too much “guesses” when it comes to searching

Methodology safe under the “sandbox” of searching

Page 10: Gbml

Coming Up

Origins of GBML

Systems

Classifier System

Operation of Classifier

Systems

Implementation of a

Simple Classifier System

in Pascal

Testing classifier in a

problem domain –

Learning a Boolean

function

Introduction to GBML10

Study Machine Learning systems

that use genetic search as their

primary discovery heuristic.

Adapting GA structures to work in

complex environments like Machine

Learning

Page 11: Gbml

Origin of GBML systems

Introduction to GBML11

Page 12: Gbml

Introduction to GBML12

In nature, not only do individual animals learn to

perform better, but species evolve to be better fit in

their individual niches.

Since the distinction between evolving and learning

can be blurred in computer systems, techniques that

model certain aspects of biological evolution have

been proposed as learning methods to improve the

performance of computer programs.

Genetic algorithms [Holland, 1975] and genetic

programming [Koza, 1992, Koza, 1994] are the most

prominent computational techniques for evolution.

Page 13: Gbml

Theoretical Foundation for GBML

Introduction to GBML13

Laid by Holland (1962)

Outline for Adaptive Systems Theory

role of program replication as a method of emphasizing

past programs.

Fundamental role of recombination

Holland (1965)

Schemata Processors

Holland (1968-1971)

Application of a classifier system

Holland and Reitman (1978)

Page 14: Gbml

Introduction to GBML14

Modern classifier systems resemble schemata

processors in both outline and detail

Holland suggested four prototypes in the initial

proposal.

No experiments or implementation have been reported

yet!

Proposal coincided with the development of the

theory of schemata.

Page 15: Gbml

Prototype 1 Prototype 2

Introduction to GBML15

Stimulus-response (SR)

processor that would

link environmental

schemata (conditions)

with particular action

effectors.

Extend type 1 by adding

internal effectors

(internal states).

Page 16: Gbml

Prototype 3 Prototype 4

Introduction to GBML16

Build upon types 1 and

2 by including explicit

environmental state

prediction (a model of

the real world), and an

internal evaluation

mechanism.

Extend the other types

by incorporating the

capability to modify its

own effectors and

detectors, permitting

greater (or lesser) range

of data detection and a

larger behavioural

response.

Page 17: Gbml

Broadcast language

Introduction to GBML17

Derived from early proposals.

Broad

Unimplemented

Creating broadcast units (production rules) from a 10-letter alphabet.

The alphabet added wild card (single and multiple match)characters to an underlying binary alphabet.

If included, the following would have given sufficientpower for computational completeness andrepresentational convenience.

A fundamental punctuation mark, a persistence symbol forcontinued broadcast of a message.

A quotation character for taking the next character literally.

Page 18: Gbml

Introduction to GBML18

The proposal for broadcast language was

instrumental in unifying the earlier suggestions for

schemata operators by:

theoretically permitting a consistent representation of all

operators, data, and rules or instructions.

The generality gained in theory has not been

realized in practice.

Page 19: Gbml

First practical implementation

Introduction to GBML19

Three years following the broadcast languageproposal (Holland and Reitman, 1978).

Cognitive System Level One (CS-1) Trained to learn two maze-running tasks.

Performance system with message list and simple stringrules (classifiers).

GA composed of reproduction, crossover, mutation andcrowding.

Epochal learning mechanism where reward isapportioned to all classifiers active between successivepayoff events.

Learning mechanism has largely been supplanted byanother mechanism – a bucket brigade.

Page 20: Gbml

GBML Applications

Introduction to GBML20

Page 21: Gbml

Introduction to GBML21

Page 22: Gbml

Introduction to GBML22

Page 23: Gbml

Introduction to GBML23

Page 24: Gbml

Introduction to GBML24

Page 25: Gbml

Classifier System

Introduction to GBML25

Page 26: Gbml

Introduction to GBML26

A classifier system is a machine learning system that

learns syntactically simple string rules (called

classifiers) to guide its performance in an arbitrary

environment.

A classifier system consists of three main

components:

Rule and message system

Apportionment of credit system

Genetic algorithm

Page 27: Gbml

Introduction to GBML27

The rule and message system of a classifier system

is a special kind of production system.

A production system is a computational scheme that

uses rules as its only algorithmic device. The general

syntax of such systems are as follows:

if <condition> then <action>

The production means that the action may be taken

(rule is “fired”) when the condition is satisfied.

Page 28: Gbml

Introduction to GBML28

It has been shown that production systems are

computationally complete, as well as convenient.

A simple rule or set of rules can represent a complex

set of thoughts compactly.

But when it comes to situations in need of learning,

this is not advisable due to the complex rule syntax.

Many production systems permit involved

grammatical constructions for the condition and

action part of the rule.

Page 29: Gbml

Introduction to GBML29

Classifier systems depart from the mainstream by

restricting a rule to a fixed length representation.

This restriction has two benefits.

All strings under the permissible alphabet are syntactically

meaningful

A fixed string representation permits string operators of

the genetic kind. This leaves the door open for a Genetic

Algorithm search of the space of permissible rules.

Page 30: Gbml

Introduction to GBML30

Classifier systems use parallel rule activation,

whereas traditional systems use serial rule

activation.

They permit multiple activities to be coordinated

simultaneously. When choices must be made

between mutually exclusive environmental actions,

or size of matched rule set must be pruned to

accommodate the fixed length message list, the

choices are postponed to the last possible moment,

and the arbitration is then performed competitively.

Page 31: Gbml

Introduction to GBML31

In traditional expert systems, the value or rating of a rule relative to other is fixed by the programmer in conjunction with the expert or group of experts to be emulated. But this is not possible in rule learning system.

In such cases, the relative importance has to be “learned”. So, classifiers are forced to coexist in an information-based service economy. A competition is held among classifiers where the right to answer relevant messages goes to the highest bidder. Subsequent bids serve as the income for previously successful message senders.

This competitive nature ensures that good rules (profitable ones) survive and the bad rules (unprofitable) die off.

Page 32: Gbml

Internal Currency

Introduction to GBML32

The exchange and accumulation of an internal

currency provides a natural figure of merit for

applying GA.

Using the “bank balance” as a fitness function,

classifiers may be reproduced, crossed, and

mutated.

So, it can rank extant rules, and discover new,

possibly better rules by innovative combinations of

old ones.

Here, the stress is on “who gets replaced”, not

“replace entire populations”.

Page 33: Gbml

Next…

Each component is

discussed in detail and

the interconnections

studied.

•Rule and message

system

•Apportionment of credit

•Genetic Algorithm

Implementation in Pascal

Testing on real world

problem – learning a

Boolean function

Introduction to GBML33

Thus, apportionment of credit via

competition and rule discovery

using GA form a reasonable basis

for constructing a machine learning

system atop the computationally

convenient and complete

framework of classifiers.

Page 34: Gbml

Rule and Message System

Introduction to GBML34

Page 35: Gbml

This is the schematic of a

complete classifier

system.

Introduction to GBML35

Page 36: Gbml

Introduction to GBML36

The rule and message system forms the backbone of the silicon beast.

Information flows from the environment through the detectors, where it is decoded to one or more finite length messages.

The environmental messages are fed into a finite length message list where the messages activate string rules called classifiers.

When activated, the classifier posts a message on to the message list, which may in-turn invoke other classifiers, or cause an action to be taken through the system’s action triggers called effectors.

Page 37: Gbml

Introduction to GBML37

Classifiers combine environmental cues and internal

thoughts to determine what the system should do

and think next.

Coordinates the flow of information from where it is

sensed (detectors) to where it is processed

(message list and classifier store) to where it is

called to action (effectors).

Informational units

Messages

Classifiers

Page 38: Gbml

Introduction to GBML38

A message within a classifier system is simply a

finite-length string over some finite alphabet. If we

limit to the binary alphabet, we get

<message> ::= {0, 1}L

This means taking the concatenation of 0s or 1s for

“L” times.

Messages are the basic token of information

exchange in a classifier system.

The messages on the message list may match one

or more classifiers or string rules.

Page 39: Gbml

Introduction to GBML39

A classifier is a production rule with the syntax

<classifier> ::= <condition>:<message>

The condition is a simple pattern recognition device

where a wild card (#) is added to the underlying alphabet.

<condition> ::= {0, 1, #}L

So, the condition matches a message if at every position,

a 0 in the message matches a 0 in the condition, 1

matches a 1, or a # matches either a 0 or a 1.

For example, #01# matches 0010, 0011, 1010 and 1011. But it

doesn’t match 0000.

Similar to schema in GA

Page 40: Gbml

Introduction to GBML40

Once the classifier’s condition is matched, it

becomes a candidate to post its message to the

message list in the next time step.

Whether the candidate classifier posts its message

is determined by the outcome of an activation

auction, which in turn depends on evaluation of the

classifier’s value or weighting.

Page 41: Gbml

Sample simulation by hand

Introduction to GBML41

Initial message list is as follows.

Page 42: Gbml

Introduction to GBML42

Page 43: Gbml

Introduction to GBML43

Page 44: Gbml

Introduction to GBML44

Page 45: Gbml

Introduction to GBML45

Page 46: Gbml

Introduction to GBML46

Page 47: Gbml

Introduction to GBML47

Page 48: Gbml

Introduction to GBML48

Page 49: Gbml

Introduction to GBML49

Page 50: Gbml

Apportionment of Credit

Algorithm

THE BUCKET BRIGADE

Introduction to GBML50

Page 51: Gbml

Introduction to GBML51

Many classifiers attempt to rank or rate the individual

classifiers according to a classifier’s role in achieving

reward from the environment.

Most prevalent method

Bucket Brigade Algorithm

John Holland

Page 52: Gbml

About the algorithm

Introduction to GBML52

An information economy where the right to trade

information is bought and sold by classifiers.

Classifiers form a chain of middlemen from

information manufacturer (the environment) to

information consumer (the effectors).

Components of service economy

Auction

ClearingHouse

Page 53: Gbml

Introduction to GBML53

When classifiers are matched, they don’t directly

post their messages.

A matching message entitles a classifier to

participate in an activation auction.

Each classifier maintains a record of its net worth.

Called Strength (S).

Each matched classifier makes a bid B.

Bid proportional to its strength.

In this way, rules that are highly fit (have

accumulated a net worth) are given preference over

other rules.

Page 54: Gbml

Introduction to GBML54

Once a classifier is selected for activation, it must clear its payment through the clearinghouse, paying its bid to other classifiers for matching messages rendered.

A matched and activated classifier sends its bid B to those classifiers responsible for sending the messages that matched the bidder classifier’s condition.

Bid amount divided among the matching classifiers.

Division of payoff among contributing classifiers helps ensure the formation of an appropriately sized subpopulation of rules.

Different types of rules can cover different types of behavioral requirements without undue interspecies competition.

Page 55: Gbml

Introduction to GBML55

In a rule-learning system of any experience, we

cannot search for one master rule.

We must instead search for a co-adapted set of rules

that together cover a range of behavior that provides

ample payoff to the learning system.

Consider the

classifiers as before.

Page 56: Gbml

Introduction to GBML56

Now, lets follow the payments, with initial strength of

200.

Page 57: Gbml

Introduction to GBML57

Page 58: Gbml

Introduction to GBML58

Page 59: Gbml

Introduction to GBML59

Page 60: Gbml

Introduction to GBML60

Page 61: Gbml

Introduction to GBML61

Page 62: Gbml

Introduction to GBML62

Page 63: Gbml

Introduction to GBML63

For steady receipts, the bid value approaches the

receipt. For time-varying receipt values, we see that

the bid is a geometrically weighted average of the

input.

As such, it acts as a filter of the possibly intermittent

and noisy receipt values.

Page 64: Gbml

Genetic Algorithm

Introduction to GBML64

Page 65: Gbml

Introduction to GBML65

Bucket brigade

Clean procedure

Evaluation of rules

Decide among competing alternatives

But we have to devise a way of injecting new rules

into the system.

Similar to SGA, we can inject new rules using the

tripartite rules

Reproduction

Crossover

Mutation

Page 66: Gbml

Introduction to GBML66

The rules are placed in the population and processed by the auction, payment and reinforcement mechanism to properly evaluate their role in the system.

Pay attention to “who replaces whom” Not replacing the entire population

GA in classifier systems strongly resemble those used in search and optimization.

Main difference in Machine Learning

Non-overlapping population model not acceptable here.

In non-overlapping generations, complete generations are selected and replaced by a new population at every run.

Page 67: Gbml

Machine Learning Search and optimization

Introduction to GBML67

High level of on-line

performance.

Learn to perform more

proficiently.

Convergence

Offline performance

Page 68: Gbml

De Jong’s experiments Machine Learning

Introduction to GBML68

Conventional system

GA Parameter

Generation Gap (G)

Implement and test

overlapping population

Genetic Algorithms.

Whole population

should not be replaced.

Quantity

Selection Proportion

(proportion)

Replace that proportion

of the population at a

given algorithm run.

Coupled with a number

of other parameters.

Page 69: Gbml

Other Parameters

Introduction to GBML69

GA Period

Represented as Tga

Specifies number of time steps (rule and message cycles)

between GA calls.

Period can be treated deterministically

GA is called every Tga cycles

Or stochastically

GA is called probabilistically with average period Tga

Invocation of GA learning may be conditioned on

particular events such as:

Lack of match

Poor performance

Page 70: Gbml

Selection

Introduction to GBML70

Roulette Wheel Selection

Classifier’s strength S used as the fitness.

No longer generating entire populations

Careful when choosing population members for

replacement.

De Jong’s crowding procedure

Encourage replacement of similar population memebers

Page 71: Gbml

Mutation

Introduction to GBML71

Modified procedure

Here, ternary alphabet is used

SGA used a binary alphabet

Mutation probability pm defined as before

When a mutation is called for, we change the

mutated character to one of the other two with equal

probability.

0 { 1, # }

1 { 0, # }

# { 0, 1 }

Page 72: Gbml

Next-

A simple Classifier

System in Pascal

•Simple Classifier System

Data Structure

•The Performance System

•Apportionment of credit

algorithm

•Genetic search within the

Simple Classifier System

•Real-world testing

•Results

•Comparison with and

without GA

Introduction to GBML72

With all these changes to the

normal SGA routine, GA may be

dropped into the classifier system

and used in a manner not too

different from normal search and

optimization applications.

Page 73: Gbml

A Simple Classifier System in

Pascal

Introduction to GBML73

Page 74: Gbml

Introduction to GBML74

Construct a system designed to learn a boolean

function

A multiplexer

Collapse the finite-length message list to a single

message (the environmental message)

Immediate feedback

Simple payoff

Page 75: Gbml

Components

Introduction to GBML75

Simple Classifier System Data Structure Adapt to learning strategies

Performance System Heart of SCS

Matching procedures are the heart of the performance system

Apportionment of Credit Procedures

Auction

Clearinghouse

Taxcollector

Genetic Search within Simple Classifier System Similar to SGA

Learning the multiplexing system

Main procedure Reinforcement

Page 76: Gbml

Six – bit multiplexing system

Introduction to GBML76

Page 77: Gbml

Results using the Simple Classifier System

Without GA With GA

Introduction to GBML77

Page 78: Gbml

Conclusion

Introduction to GBML78

The following were discussed

Machine Learning

Role of GA in Machine Learning

The evolution of GA concepts in Machine Learning

Some applications of GBML

Classifier System

Components of Classifier System

Rule and Message System

Apportionment of Credit (The Bucket Brigade)

Genetic Algorithm

A practical implementation in Pascal

Increase in output efficiency when using GA

Page 79: Gbml

References

“Introduction to Machine Learning”, Nils J. Nilsson,

Robotics Laboratory, Department of Computer

Science, Stanford University

“Genetic Algorithms in Search, Optimization and

Machine Learning”, David E. Goldberg, pp 217-260

79 Introduction to GBML

Page 80: Gbml

THANK YOU

80 Introduction to GBML