Intelligent Systems 2II40 C4 - PowerPoint PPT Presentation

1 / 58
About This Presentation
Title:

Intelligent Systems 2II40 C4

Description:

'Like climbing Everest in thick fog with amnesia' Gradient descent/ ascent ... created '53 by Metropolis et al., for physical process modeling ... – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 59
Provided by: wwwisW
Category:

less

Transcript and Presenter's Notes

Title: Intelligent Systems 2II40 C4


1
Intelligent Systems (2II40)C4
  • Alexandra I. Cristea

October 2005
2
Outline
  • Search
  • Uninformed
  • Informed
  • Heuristic
  • Local
  • Online
  • Knowledge and Reasoning

3
II.2.B. Local Search
  • Greedy local search (hill-climbing)
  • Simulated annealing
  • Genetic algorithms

4
Why local search?
  • path not part of solution
  • optimization problem
  • max(objective function)
  • no goal

Objective function
State space
5
Hill-climbing (gradient ascent/descent)
  • Like climbing Everest in thick fog with amnesia

6
Gradient descent/ ascent
  • Why is it an informed algorithm?

7
Visualizing hill-climbing
  • Problem alg. can get stuck in local minima

8
Simulated annealing
9
Properties of simulated annealing
  • created 53 by Metropolis et al., for physical
    process modeling
  • Metallurgy annealing heating metals/ glass to
    high temperature, then cooling gradually (to
    harden them)
  • used in airline scheduling, VLSI layout, etc.
  • allowing moves up-hill
  • why?

10
Simulated annealing probability
  • Probability of state occupation
  • At fixed temperature T, probability
    Boltzman distribution
  • If T decreases slowly enough, the best state
    is always reached

11
Simulated Annealing Algorithm
  • function S_A(problem, schedule) returns a
    solution state
  • inputs problem, a problem
  • schedule, a mapping from time to temperature
  • local variables current, a node
  • next, a node
  • T, a temperature controlling the
    probability of downwards steps
  • current?MAKE-NODE(INITIAL-STATEproblem)
  • for t ?1 to ? do
  • T ? schedulet
  • if T0 then return current
  • next ? a randomly selected successor of
    current
  • ?E ? VALUEnext VALUEcurrent
  • if ?E gt 0 then current ?next
  • else current ?next with probability e?E/T

12
Simulated annealing
  • Why is it an informed algorithm?

13
Genetic Algorithms(stochastic hill-climbing)
14
GA terminology
  • Chromosome
  • Genes
  • Alleles
  • Locus
  • Crossover
  • Mutation

state, made of genes state
variables possible values for genes position
along the chromosome new child
chromosome generation by aligning two
parents new chromosome generation from
one individual (altering val. of loci)
15
Crossover
Single point cross-over
Multiple point cross-over
16
Mutation
Problems validity check!!
17
Genetic Algorithm
  • function G_A(population, FITNES-FN) returns an
    individual
  • inputs population, a set of individuals
  • FITNESS-FN, a fct. measuring fitness of an
    individual
  • repeat
  • new_population ? empty set
  • loop for i from 1 to SIZE(population) do
  • x ? RANDOM_SELECTION(population,
    FITNESS-FN)
  • y ? RANDOM_SELECTION(population,
    FITNESS-FN)
  • child ? REPRODUCE(x,y)
  • if (small random probability) then child ?
    MUTATE(child)
  • add child to new_population
  • population ? new_population
  • until some individual is fit enough, or enough
    time has elapsed
  • return the best individual in the population,
    according to the FITNESS-FN

18
Selection some examples
  • Fitness-proportionate no. offspring proportional
    w. fitness (roulette wheel)
  • Linear fitness scaling (simfic)
  • Boltzmann fitness sc. (siexp(fi/T))
  • Tournament selection (binary 2 by 2)
  • Elitism (a group of individuals pass unchanged)

19
Genetic algorithm
  • Why is it an informed algorithm?

20
Homework 4 part 1
  • Find the memory requirements (propertiesspace)
    of the simulated annealing algorithm (Hint
    express space in states kept in memory).
  • How many alleles are there for a binary-encoded
    gene that is N bits wide?
  • Find out where the name LTRA comes from? What
    does the L stand for, and how do you explain it?

21
GA Family Evolutionary computing
  • Evolutionary strategies (ES- Rechenberg, 73)
  • Genetic programming (GP - Langdon, 94)
  • Evolutionary programming (EP - Fogel, late 80s)

22
Homework 4 part 2
  • What are schema, schema order, defining length in
    GA?
  • find definitions ES, GP, EP! What are the
    differences to GA?
  • Check out the No Free Lunch Theorem!
  • Perform step FAQ 7 of the project.

23
III.2.c. Online search agents and unknown
environments
24
Online search
  • Exploration
  • unknown environment
  • local algorithms
  • knowledge of limited vicinity of current state
  • outperform random walk !!

25
LRTA steps (in 1-dimensional space)
Initial state
8
9
2
2
4
3
(1)
26
  • function LRTA(s) returns an action
  • inputs s, a percept that identifies the current
    state
  • static result, a table, indexed by action and
    state, empty
  • H, a table of cost estimates indexed by
    state, empty
  • s,a, the previous state and action,
    initially null
  • if GOAL-TEST(s) then return stop
  • if s is a new state (not in H) then Hs ?h(s)
  • unless s is null
  • resulta,s ?s
  • Hs ? min (b?ACTIONS(s)) LRTA-COST(s,b,resul
    tb,s,H)
  • a ? action b?ACTIONS(s) w. min
    LRTA- COST(s,b,resultb,s,H)
  • s ?s
  • return a
  • function LRTA-COST(s,a,s,H) returns a cost
    estimate
  • if s undefined then return h(s)
  • else return c(s,a,s) Hs

27
Homework 4 part 3
  • Perform as many LTRA steps till the current
    state leaves this surface.

10
9
5
4
4
3
8
9
2
2
4
3
8
9
2
2
4
3
8
9
4
3
2
1
8
9
2
2
1
1
28
IV. Knowledge and reasoning
29
IV. Knowledge and reasoning
  • IV.1. Generalities on logics
  • IV.2. Propositional logic short visit
  • IV.3. First-order logic (FOL) short visit
  • IV.4. Knowledge-based agents
  • IV.5. Knowledge representation

30
IV.1. Generalities on logics
31
Types of logic
  • Logics are characterized by what they commit to
    as primitives
  • Ontological commitment
  • what exists facts? Objects? Time? Beliefs?
  • Epistemological commitment
  • what states of knowledge?

32
Basic concepts of logic (PL)
  • Syntax formal structure of sentences
  • Semantics truth of sentences w.r.t. models
  • Entailment necessary truth of sentence given
    another
  • Inference deriving sentences from other
    sentences
  • Soundness deriving only entailed sentences
  • Completeness can produce all entailed sentences
  • Syntax
  • Semantics
  • Entailment
  • Inference
  • Soundness
  • Completeness

33
IV.2. Propositional logic (PL)
34
Models
  • What is a model?
  • What is a model in propositional logics?
  • We say m is a model of a sentence a
    If a is true in m.
  • M(a) is defined as the set of all models of a
  • KB entails a if and only if M(KB) ? M(a)

35
KB entails a
M(a)
M(KB)
Example KB x is a technical university and
x is a Dutch university
a x is a Dutch
university Model xTU/e
36
Proof methods
  • Inference rules
  • Model checking

37
Pros cons of PL
  • Declarative
  • syntax pieces correspond to facts
  • Partial/ disjunctive/ negated info
  • allowed
  • Compositional
  • meaning from components
  • Context-independent
  • unlike nat. lang.
  • Limited expressive power
  • rel. cannot be expressed

38
Extra Hw Revisit read
  • Inferences, de Morgan, model checking, Horn
    clauses, modus Ponens, forward backward
    chaining, conjunctive/ disjunctive normal form
  • Propositional logic (PL)

39
IV.3. First order logic (FOL)
40
Logic programming
41
Extra Hw Revisit read
  • Reducing FOL inference to PL inference,
    unification, generalized modus Ponens, forward
    backward chaining, resolution
  • First order logic (FOL)

42
IV.4. Knowledge-based agents
43
Knowledge bases
  • Set of sentences in a formal language

Domain independent algorithms
Inference engine
Knowledge base
Domain specific content
44
Knowledge based agents
  • Agents that make inferences on KB
  • TELL system what it needs to know
  • ASK system what to do
  • Agent description
  • Knowledge level what agent knows, regardless
    of implementation
  • Implementation level data structures, algorithms

45
Simple knowledge-based agent
46
Rule-based system
  • Oldest and simplest knowledge-based system
  • Contains a set of rules of the form
  • IF ltconditiongt THEN ltconclusiongt
  • e.g.,
  • IF the tap is open THEN water flows
  • Expert systems should respond to
  • Why? (during resolution)
  • How? (after conclusion)

47
Forward chaining simple view
Start
Empty the conflict set
Select rules to examine (often all rules are
selected)
Evaluate condition part of first rule
Evaluate condition part of next rule
no
Condition met?
yes
Add rule to conflict set
yes
no
More rules?
Conflict set empty?
Select a rule from the conflict set and fire it
no
yes
Stop
48
Backward chaining
Start
no
Goal satisfied?
yes
no
yes
More solutions?
success
Rule exists To satisfy goal?
Stop
no
failure
yes
condition part of rule is next goal
49
IV.4. Knowledge representation
50
Why knowledge representation?
  • content?
  • trivial?
  • buzzwords
  • ontology,
  • taxonomy,
  • event calculus (ECA),
  • belief theory,
  • semantic networks

51
IV.4. Knowledge representation
  • Ontological engineering
  • Categories, objects, hierarchies, axioms
  • Actions, situations and events
  • Mental events and mental objects
  • Internet shopping world
  • Reasoning systems for categories
  • Semantic networks
  • Description logic

52
IV.4.A. Ontological engineering
  • Ontology ?

53
Ontology
  • Aristoteles The metaphysical study of the
    nature of being and existence
  • AI (Gruber) A shared and common understanding
    of some domain that can be communicated between
    people and application systems

54
Ontological Engineering
  • in toy domains (vacuum cleaner, minesweeper)
    representation is often not that important
  • in real world applications, you need common
    consensual representations to understand each
    other
  • Ontological engineering knowledge engineering
    on a larger scale

55
Ontology definition
  • Ontology common (consistent)vocabulary for
    a specific domain
  • hierarchy of vocabulary
  • general relations
  • an interpretation of the relations
  • E.g., here, representing
  • physical objects, actions, time, beliefs

56
Upper ontology of the world
Anything
AbstractObjects
GeneralizedEvents
Sets
Numbers
Interval
Places
PhysicalObjects
Representational Objects
Processes
Categories
Sentences
Measurements
Moments
Things
Stuff
Times
Agents
Solid
Liquid
Gas
Weights
Animals
Questions Does a general purpose ontology make
sense? Do all special purpose ontologies fit
in? Is FOL to capture knowledge?
Humans
57
General purpose ontology
  • Should be applicable in any domain
  • Some specific domains/ applications require
    unification (merging) of ontologies

58
Categories objects
Write a Comment
User Comments (0)
About PowerShow.com