1 How the electronic mind can emulate the human mind: some applications of Artificial Intelligence 7...
-
Upload
alyson-french -
Category
Documents
-
view
212 -
download
0
Transcript of 1 How the electronic mind can emulate the human mind: some applications of Artificial Intelligence 7...
11
How the electronic mind can How the electronic mind can emulate the human mind: some emulate the human mind: some
applications of Artificial applications of Artificial Intelligence Intelligence
77thth International Interdisciplinary Seminar International Interdisciplinary Seminar
Luca Arcara, Federico Cassoli, Mattia Ferrini
Politecnico di Milano – Campus of Como
22
AgendaAgenda
IntroductionIntroduction
Expert SystemsExpert Systems
Neural NetworksNeural Networks
A sample applicationA sample application
Genetic AlgorithmsGenetic Algorithms
33
IntroductionIntroduction
What is Artificial Intelligence?What is Artificial Intelligence?
Systems that think like humansSystems that think like humans
Systems that think rationallySystems that think rationally
Systems that act like humansSystems that act like humans
Systems that act rationallySystems that act rationally
44
Acting humanly – the Turing testActing humanly – the Turing test
Described in “Computing machinery and Described in “Computing machinery and intelligence” – Turing (1950)intelligence” – Turing (1950)
““Can machines think?” becomes “Can machines Can machines think?” becomes “Can machines behave intelligently?”behave intelligently?”
Operational test for intelligent behavior: the Operational test for intelligent behavior: the Imitation Game.Imitation Game.
55
Acting humanly – the Turing testActing humanly – the Turing test
Suggested major components of AISuggested major components of AI KnowledgeKnowledge ReasoningReasoning Language understandingLanguage understanding LearningLearning
Problem: Turing test is not Problem: Turing test is not reproduciblereproducible, , constructiveconstructive or apt to or apt to mathematical mathematical analysisanalysis
66
Subjects linked to A. I.Subjects linked to A. I.PhilosophyPhilosophy
Logic, methods of reasoningLogic, methods of reasoning
Mind as physical systemMind as physical system
Foundations of learning, Foundations of learning, language, rationalitylanguage, rationality
MathematicsMathematicsFormal representation and proofFormal representation and proof
Algorithms, computation, Algorithms, computation, (un)decidability, (in)tractability(un)decidability, (in)tractability
ProbabilityProbability
PsychologyPsychologyAdaptationAdaptation
Phenomena of perception and Phenomena of perception and motor controlmotor control
EconomicsEconomicsFormal theory of rational Formal theory of rational decisionsdecisions
LinguisticsLinguisticsKnowledge representationKnowledge representation
GrammarGrammar
NeuroscienceNeurosciencePlastic physical substrate for Plastic physical substrate for mental activitymental activity
Control theoryControl theoryStability of systemsStability of systems
Simple optimal agent designsSimple optimal agent designs
77
State of the artState of the art
Artificial Intelligence
Expert systemsNeural networks
Genetic algorithms…
88
Expert systemsExpert systems
Def:Def: software systems simulating expert-like software systems simulating expert-like decision making while keeping knowledge decision making while keeping knowledge separate from the reasoning mechanism.separate from the reasoning mechanism.
Replace Replace human expert decision makinghuman expert decision making when when not availablenot available
Assist human expert when Assist human expert when integratingintegrating various various decisionsdecisions
Provides a user with:Provides a user with: an an appropriate hypothesisappropriate hypothesis;; methodologymethodology for knowledge storage and reuse. for knowledge storage and reuse.
99
Expert systems architectureExpert systems architecture
Knowledge base
Inference engine
Update module
Explanation module
User interface
User
Lets the user change the
k.b.
Uses the k.b. to infer new facts and produce
solutions
Tells the user the steps that produced the
solution
Expert’s knowledge –
facts and rules
Simplifies the user’s
interaction
1010
Rule-Based SystemsRule-Based Systems
Knowledge in the form of Knowledge in the form of if condition if condition
then effectthen effect rules rules
Example:Example:here here fine fine
not here not here absent absent
absent and not seen absent and not seen at home at home
absent and seen absent and seen in the building in the building
in the building in the building fine fine
at home and not holiday at home and not holiday sick sick
here and holiday here and holiday sick sick
? here no? seen no? holiday nosick
? here yesfine
? here yes? holiday yessick?
1111
Expert systems vs. conventional programsExpert systems vs. conventional programsAspectAspect Expert systemsExpert systems Conventional programsConventional programs
ParadigmParadigm Heuristical rules, exploration of Heuristical rules, exploration of the space of statesthe space of states
Algorithms, explicit pre-Algorithms, explicit pre-defined stepsdefined steps
ApproachApproach DeclarativeDeclarative ProceduralProcedural
Data Data manipulatedmanipulated
Knowledge, often rulesKnowledge, often rules Vectors and matrixes of Vectors and matrixes of datadata
Control systemControl system Inferential engine separated from Inferential engine separated from the knowledge basethe knowledge base
Data and information Data and information integrated with programsintegrated with programs
User interfaceUser interface Highly interactive, usually Highly interactive, usually questions and answersquestions and answers
No standard typologyNo standard typology
Explanation Explanation capabilitycapability
It presents the steps that led to It presents the steps that led to the proposed solutionthe proposed solution
Not availableNot available
Learning Learning capabilitycapability
PresentPresent Not availableNot available
1212
ApplicationsApplications
InterpretationInterpretation
DiagnosisDiagnosis
MonitoringMonitoring
Planning and schedulingPlanning and scheduling
ForecastingForecasting
Project and configurationProject and configuration
1313
Def:Def: mathematical models that mathematical models that try to emulatetry to emulate the the human nervous system.human nervous system.
Final target of neural networks is to simulate the Final target of neural networks is to simulate the process of learning of the human brain, so that it process of learning of the human brain, so that it can interact with the external environment can interact with the external environment without human help, except for the creation.without human help, except for the creation.
The first models were developed by The first models were developed by W. W. McCullochMcCulloch and and W. PittsW. Pitts in in 19431943, with their , with their manifest: “A logical calculus of the ideas manifest: “A logical calculus of the ideas immanent in nervous activity”.immanent in nervous activity”.
Neural NetworksNeural Networks
1414
Brain and NeuronsBrain and Neurons
General Structure of a NeuronGeneral Structure of a Neuron
LearningLearning
nucleus
dendrites
synapses
axon
1515
Artificial neural networks are typically composed Artificial neural networks are typically composed of interconnected units which serve as a model of interconnected units which serve as a model for for neuronsneurons..
The synapse is modelled by a The synapse is modelled by a modifiable weightmodifiable weight associated with each particular associated with each particular connectionconnection..
Each unit converts the pattern of incoming Each unit converts the pattern of incoming activities that it receives into a single outgoing activities that it receives into a single outgoing activity that it sends to other units.activity that it sends to other units. First: First: biased weighted sumbiased weighted sum Second: Second: transfer functiontransfer function
The structure of neural networksThe structure of neural networks
1616
Example of a two levels networkExample of a two levels network
1
1
0
0.19
0.88
0
-0.13
0
x
x
x
0.4x
x
1
00
0
0.19 + 0.88 + 0 - 0.8 = 0.27
-0.13 + 0 - 0.82 = -0.95
0.4 + 0 - 0.73 = -0.33
How do they work?How do they work?
1717
After a neural network has been created it can After a neural network has been created it can be trained using one of the supervised learning be trained using one of the supervised learning algorithms (an example is algorithms (an example is back propagationback propagation), ), which uses the data to adjust the network's which uses the data to adjust the network's weights and thresholds so as to minimize the weights and thresholds so as to minimize the error in its predictions on the training set.error in its predictions on the training set.
LearningLearning
1818
If the network is properly trained, it can model If the network is properly trained, it can model the (unknown) function thatthe (unknown) function that relates relates the the input input variables to thevariables to the output output variables, and can variables, and can subsequently be used to subsequently be used to make predictions make predictions where thewhere the output is not known output is not known..
They are based on the concept that often (not They are based on the concept that often (not always), it is possible to teach to a mathematical always), it is possible to teach to a mathematical system some laws that system some laws that we did not know beforewe did not know before, , only by letting it analyze a lot ofonly by letting it analyze a lot of real cases real cases..
Why are they useful?Why are they useful?
1919
ApplicationsApplications
Common fields of application are when the Common fields of application are when the statistical analysis of all the problem’s variables statistical analysis of all the problem’s variables is is too difficulttoo difficult or or expensiveexpensive (at the calculation (at the calculation level), but overall islevel), but overall is not clear beforehand not clear beforehand what what kind of deterministic kind of deterministic relationships relationships there are there are between the different variables.between the different variables.
OCR (Optical character recognition)OCR (Optical character recognition) DiagnosisDiagnosis Control of industrial productions qualityControl of industrial productions quality Recognition of potentially dangerous molecules (using Recognition of potentially dangerous molecules (using
“electronic noses”)“electronic noses”) Engine managementEngine management Control of robotsControl of robots
2020
A sample application (1)A sample application (1)
Problem:Problem:We want to create a neural network that is able We want to create a neural network that is able
to determine if one binary number with 4 to determine if one binary number with 4 figures is even.figures is even.
2121
A sample application (2)A sample application (2)
We use a network with:We use a network with: 4 input4 input nodes; nodes; 2 hidden2 hidden nodes; nodes; 1 output1 output node (1 if the number is even, 0 if it node (1 if the number is even, 0 if it
is odd).is odd).
2222
A sample application (3)A sample application (3)
Training Data:Training Data:
2323
A sample application (4)A sample application (4)
DEMODEMO
To solve the problem we will use a program To solve the problem we will use a program that was produced at the Laboratory for that was produced at the Laboratory for Computational Intelligence at the Computational Intelligence at the University of British Columbia.University of British Columbia.
2424
GAs Definition – The ideaGAs Definition – The idea
Genetic algorithms are based on a biological metaphor: they view learning as a competition among a population of evolving candidate problem solutions. So a GA is a probabilistic optimization algorithm that makes use of a population of test solutions which artificially reproduce through operations analogous to gene transfer in sexual reproduction.
2525
HistoryHistory
Genetic AlgorithmsGenetic Algorithms (GAs) originated from the (GAs) originated from the studies conducted by studies conducted by John H. HollandJohn H. Holland and his and his colleagues at the University of Michigan. colleagues at the University of Michigan. Holland’s book “Adaptation in Natural and Holland’s book “Adaptation in Natural and Artificial Systems”, published in 1975, is Artificial Systems”, published in 1975, is generally acknowledged as the beginning of the generally acknowledged as the beginning of the research of genetic algorithms.research of genetic algorithms.
2626
Definitions(1) – ChromosomeDefinitions(1) – Chromosome
A chromosome, a collection of genes, represents a A chromosome, a collection of genes, represents a possible solution of the problem. possible solution of the problem.
ENCODING EXAMPLESENCODING EXAMPLES
Binary encodingBinary encoding – A chromosome is a collection of bits – A chromosome is a collection of bits
Tree encodingTree encoding - In the tree encoding every chromosome is a tree of some objects, such as functions or commands in a programming language ( i.e. LISP )
2727
Definitions(2) – Fitness FunctionDefinitions(2) – Fitness Function
Fitness FunctionFitness Function
A fitness function evaluates the ability of A fitness function evaluates the ability of a candidate solution to solve the given a candidate solution to solve the given problem. problem.
2828
101FATHER - 101100
111
Definitions(3) – CrossoverDefinitions(3) – Crossover
Crossover Crossover operates on selected genes from parent operates on selected genes from parent chromosomes and creates new offspring.chromosomes and creates new offspring.
EXAMPLE – SINGLE POINT CROSSOVER WITH BINARY ENCODING
MOTHER - 010111
OFFSPRING
2929
Definitions(4) – MutationDefinitions(4) – Mutation
The chromosome is randomly mutated to prevent premature The chromosome is randomly mutated to prevent premature convergence upon a local maximum. convergence upon a local maximum.
It’s a further techique through wich a GA explores the It’s a further techique through wich a GA explores the solution space: mutation gives an extra-probability to every solution space: mutation gives an extra-probability to every possible solution of the problem out of the finite population possible solution of the problem out of the finite population of solutions generated by the GA. of solutions generated by the GA.
Mutation should not occur very often, because then GA will in Mutation should not occur very often, because then GA will in fact change to random search.fact change to random search.
3030
Outline of a basic GA: FlowchartOutline of a basic GA: Flowchart
3131
Parameters(1)Parameters(1)
Crossover probability ( Pc )Crossover probability ( Pc ):: how often crossover will be how often crossover will be performed. If there are too few chromosomes, GAs have few performed. If there are too few chromosomes, GAs have few possibilities to perform crossover and only a small part of search possibilities to perform crossover and only a small part of search space is explored. On the other hand, if there are too many space is explored. On the other hand, if there are too many chromosomes, GA slow down. Crossover probability is usually chromosomes, GA slow down. Crossover probability is usually beetween beetween 0.40.4 and and 0.70.7. .
Mutation probability ( Pm )Mutation probability ( Pm ):: how often parts of chromosome will how often parts of chromosome will be mutated. Mutation should not occur very often, because then be mutated. Mutation should not occur very often, because then GA will in fact change to random search. Tipical Pm is GA will in fact change to random search. Tipical Pm is 0.01-0.01-0.0010.001..
Population sizePopulation size:: how many chromosomes are in a population (in how many chromosomes are in a population (in one generation). Good population size is reported to be about one generation). Good population size is reported to be about 20-100.20-100.
3232
Parameters(2)Parameters(2)
Elitism NumberElitism Number: Elitism is the name of the method that : Elitism is the name of the method that first copies the best chromosome (or few best first copies the best chromosome (or few best chromosomes) to the new population. Elitism can rapidly chromosomes) to the new population. Elitism can rapidly increase the performance of GA, because it prevents a increase the performance of GA, because it prevents a loss of the best found solution. Elitism number specifies loss of the best found solution. Elitism number specifies how many chromosomes copy directly in the new how many chromosomes copy directly in the new population.population.
3333
GAs vs. GAs vs. Ad-hocAd-hoc approach approach
Genetic Approach is a rather brutal approach, requiring large amounts of processing power, but with the immense advantage of supplying solutions to things we don't know how to solve, or don't know how to solve quickly. In fact no knowledge of how to solve the problem is needed BUT you need to be able to encode the chromosome and design the fitness function. This means implementation relies on a problem-independent "engine”.
3434
What are GAs used for ? What are GAs used for ?
GAs are excellent for all tasks requiring optimization and are highly effective in any GAs are excellent for all tasks requiring optimization and are highly effective in any situation where many inputs (variables) interact to produce a large number of possible situation where many inputs (variables) interact to produce a large number of possible outputs (solutions). outputs (solutions).
Some example situations are:Some example situations are:
OptimizationOptimization such as data fitting, clustering, trend spotting, path finding, ordering. such as data fitting, clustering, trend spotting, path finding, ordering.
ManagementManagement: Distribution, scheduling, project management, courier routing, container : Distribution, scheduling, project management, courier routing, container packing, task assignment, time tables. packing, task assignment, time tables.
FinancialFinancial: Portfolio balancing, budgeting, forecasting, investment analysis and payment : Portfolio balancing, budgeting, forecasting, investment analysis and payment scheduling. scheduling.
Data MiningData Mining
………………………………..