Evolving objects

Download Report

Transcript Evolving objects

Evolving objects
JJ Merelo
[email protected]
Evolution
• Evolution in Nature
• Market evolution
• Evolving inflationary universes
• Memetic evolution
Http://
.ugr.es
Evolution is not about
substrates
it´s about
interfaces
and
survival of the fittest
Http://
.ugr.es
Artificial evolution
• Artificial evolution paradigms focus on
representation
Genetic Algorithms
Bit strings
Evolution Strategies
Floating point vectors
Evolutionary programming
Cellular automata, and
bitstrings
LISP S-Expressions
Genetic programming
Http://
.ugr.es
Evolvable objects: summary
• Objects can replicate (or be replicated), and

create other objects.
• Some objects can change other objects

(create diversity)
• Some objects can combine or eliminate
other objects (decrease diversity)

• Objects can be evaluated, or at least,
compared to each other, that is, they have a
fitness or cost.

Http://
.ugr.es
Evolvability conditions
• Objects can replicate (or be replicated), and
create other objects.
Http://
.ugr.es
Evolvability conditions
• Some objects can change other objects
(create diversity)
Http://
.ugr.es
Evolvability conditions
• Some objects can combine or eliminate
other objects (decrease divesity)
Http://
.ugr.es
Evolvability conditions
• Objects can be evaluated, or at least,
compared to each other, that is, they have a
fitness or cost.
32
122
Http://
.ugr.es
2
Evolving objects in practice
• Program whatever you want to evolve in an
object-oriented language (Smalltalk, Java,
C++).
• Decide evolution paths: changes to that
class of objects, and, if applicable, how to
interchange information among objects.
• Create a population of objects, evaluate,
change and combine them, keeping, cloning
or combining the best, and eliminating the
worst.
Http://
.ugr.es
Genetic algorithm demo
• This is an example of evolvable objects
(http://geneura.ugr.es/%7ejmerelo/EO.html)
• It´s Open Source. You can insert it in yor presentations or do whatever
you want with it. If you want, leave the footnote so that other people
can also download it. If you make any interesting modification, please
tell me.
• It´s a simple GA that evolves character strings, using mutation (which
adds or substracts an integer to the ASCII value) and 2-point crossover.
It uses 2-tournament selection, and fitness is the total ASCII distance
to the correct string.
• Since it´s written in Visual Basic for Applications, it can also be used
from Word or Excel. I´d be interested in hearing any development in
this direction.
• To run it, you have to Show this presentation.
Http://
.ugr.es
Mutation and Crossover
mutationtest
Mutation
crossover
muta}iontest
crostover
Crossover
testtestte
testsestte
Http://
.ugr.es
Example: Genetic algorithm in VB for applications
Search String
evolvable
Mutation prob.
xOver prob.
0,2
0,5
Population
RunGA
Stop
Generation #
65
Http://
.ugr.es
evolvable -> 0
evolvable -> 0
evolvable -> 0
evolvabse -> 7
evolvible -> 8
evolvable -> 0
evolvable -> 0
evolvable -> 0
evplvable -> 1
evolvable -> 0
evolvable -> 0
evolvable -> 0
evplvable -> 1
evolvable -> 0
evolvable -> 0
evolvable -> 0
What´s new about EO?
• Main thing are interfaces, through which
objects can evolve.
– Evolution is paradigm-independent.
– Evolution is representation-independent.
– Evolution is language-independent.
• Any object can be evolved: programs,
graphics, neural nets, mastermind solutions.
Http://
.ugr.es
Objects are everywhere!
• Microsoft´s Common Object Model
(COM).
• Web Document Object Model (DOM).
• Object Management Group’s CORBA, used
in GNOME.
• Java applets, IBM´s aglets, JINI.
Http://
.ugr.es
Meet EO
http://geneura.ugr.es/~j
merelo/EO.html
• C++ class library for evolving objects
– EOs are chromosomes.
– EO-level operator, generic or representationspecific.
– Population-level operators, which are
representation-independent.
– Any evolutionary computation paradigm, or
none at all,
can be used.
Http://
.ugr.es
EO: status
• General GA, simple GA, Evolution
Strategies, Simulated annealing.
• Many different EOs: bitstring, string, float
vector, neural nets.
• Applications: evolved neural nets, play
mastermind.
• Multiplatform: Win, Linux, Unix
Http://
.ugr.es
EO Roadmap
• More language support: Java, Jini,
Objective C
• ActiveX-control, integration with COM
• Graphic interface: Qt or GTK+.
• Integration with GNOME?
Http://
.ugr.es
Neural nets: this is their life.
• What neural nets ain´t.
• What neural nets are.
• How do they work.
• What they don´t do.
• What they do.
• Applications/Case studies
Http://
.ugr.es






What neural nets ain´t
•
•
•
•
A model of the brain.
A way to make machines intelligent.
Massively parallel and fault-tolerant.
Black boxes that can be used with no prior
knowledge.
Http://
.ugr.es
What neural nets are
• A new way to visualize adaptive statistical
data analysis tools.
• Real time signal processors, in hardware or
in software.
• A marketing term that has attracted lots of
researchers to the realm of data analysis.
• Local error minimization and search
procedures: they find only local minima.
Http://
.ugr.es
NNets: what do they look like
• Inputs: data taken from the
environment or a file.
• Weights: Links from inputs to
computing elements.
• Neurons: computing elements
that apply a function f to the
product of their inputs times the
incoming weights. The result is
called activation
• Output: sometimes, activations
are projected by applying a
linear transformation.
Http://
.ugr.es
NNets: how do they work
• After the training phase, NNs are used or
exploited: weights are fixed, and they don´t learn
any more.
• Basically, they associate inputs to outputs or to
other inputs.
Http://
.ugr.es
NNets: their applications
• Classifiers: input = feature vector, output =
classification value. Example: Quality control:
good or faulty.
• Associative memories: input = vector, output=
vector. Retrieve image from a part of it.
• Clustering methods: input = vector, output =
closest vector to that one. Market segmentation:
find “clusters” of similar customers.
• Function approximators: input = vector, output=
vector. Forecasting.
Http://
.ugr.es
What they don´t do
• Always work.
• Train fast.
• Work in real-life problems.
Http://
.ugr.es
What they do
• They always work. At least, most of the
papers published show results (usually on
toy problems).
• They are fast. Or at least, they will be when
they are ported to a hardware accelerator.
• Work in real life problems. There are many
commercial applications of neural networks,
from forecasting, to pattern recognition, to
real-time control.
Http://
.ugr.es
Some applications
• NNs as models. But other networks are more
appropiate for this: autocatalytic networks, for
instance.
• NNs as visualization tools:
– Feature extraction  projection of n-dimensional
spaces
• NNs as data mining tools: creating bottom-up
knowledge from data.
• NNs as the “decision making” part of agents in
multiagent models.
Http://
.ugr.es
Case study: Consumer/ad
interaction
no
yes
yes
yes
Http://
.ugr.es
no
Case Study: Consumer/ad
interaction
• Scenario: commodity product, of which
any amount can be purchased (beer,
tobacco, or any other vice).
• No difference in performance or price. For
instance, Coke/Pepsi.
• Advertising works: ads reach their target,
and they promote the sale of the product
they are intended to promote.
Http://
.ugr.es
Consumer/ad interaction
u There are many agents, each one with
a neural net .
no
uConsumer deciding pro ad are
rewarded. Those deciding anti-ad are
punished.
uReward/punishment depend on
investment on ads.
no
no
yes
Http://
.ugr.es
Consumer/ad interaction: results
• The model reflects very well (qualitatively)
well known facts about advertising:
– Pulsing strategies work better than continuous
ones.
– Introducing a new product in the market costs
much more than keeping market share.
– Total sales of a product segment can decrease
due to bad publicity decisions. For instance, if
all firms in a market segment invest more or
less the same: coopetition.
Http://
.ugr.es
Consumer/ad interaction
Http://
.ugr.es
Information filtering
• Customizing information provided to the
user needs and preferences.
• Documents are represented as “vectors”
Doc1
Doc2
Politics
Golf
About
want
0.4
0.2
1.2
0.5
0.3
0.4
1.3
1.3
• Consumer preferences are sets of vectors,
and adapted using a NN.
Http://
.ugr.es
Evolving neural nets
• Evolving NNets solves the “model selection
problem”:
– Initial weights, neural net size and learning
constant can be evolved.
• Combines local search with global search.
• NNet training can be an operator used to
evolve.
• G-LVQ: evolving LVQ, G-PROP: evolving
BackProp.
Http://
.ugr.es