Introduction to Artificial Intelligence Announcements by wpr1947


• Homework 1 due today – write up on The
  Thinking Machine
• Department Picnic: Thursday, September 13
  – 1:20 to 2:30
• Lab 0 due Thursday, September 13
• Writing Assignments Posted
  • Caves of Steel due 10/4
• Current Events Presentation
                 CS 484 – Artificial Intelligence   1
Representations: Semantic Nets,
      Frames, and Trees
            Lecture 3
       The Need for a Good
• A computer needs a representation of a
  problem in order to solve it.
• A representation must be:
  • Efficient – not wasteful in time or resources.
  • Useful – allows the computer to solve the problem.
  • Meaningful – really relates to the problem.

                     CS 484 – Artificial Intelligence    3
        Semantic Nets
• A graph with nodes, connected by edges.
• The nodes represent objects or properties.
• The edges represent relationships between
  the objects.
  • Label to indicate nature of relationship

                 CS 484 – Artificial Intelligence   4
A Simple Semantic Net

        CS 484 – Artificial Intelligence   5
      Create a Semantic Net
A Ford is a type of car. Bob owns two cars.
 Bob parks his car at home. His house is in
 California, which is a state. Sacramento is
 the state capital of California. Cars drive on
 the freeway, such as Route 101 and
 Highway 81.

                CS 484 – Artificial Intelligence   6
Your Semantic Web

    CS 484 – Artificial Intelligence   7
• Inheritance is the process by which a subclass
  inherits properties from a superclass.
• Example:
   • Mammals give birth to live young.
   • Fido is a mammal.
   • Therefore Fido gives birth to live young.
• In some cases, as in the example above, inherited
  values may need to be overridden. (Fido may be a
  mammal, but if he’s male then he probably won’t
  give birth).
                          CS 484 – Artificial Intelligence   8
• A frame system consists of a number of
  frames, connected by edges, like a semantic
• Class frames describe classes.
• Instance frames describe instances.
• Each frame has a number of slots.
• Each slot can be assigned a slot value.

                CS 484 – Artificial Intelligence   9
Frames: A Simple Example

          CS 484 – Artificial Intelligence   10
         Other relationships
• Aggregation – one object being part of
  another object
  • Fido has a tail
• Association – explains how objects are
  related to each other
  • "chases relationship" – how Fido and Fang are

                  CS 484 – Artificial Intelligence   11
        Create a frame-based
A Ford is a type of car. Bob owns two cars.
 Bob parks his car at home. His house is in
 California, which is a state. Sacramento is
 the state capital of California. Cars drive on
 the freeway, such as Route 101 and
 Highway 81.

                CS 484 – Artificial Intelligence   12
Your Frame-Based

   CS 484 – Artificial Intelligence   13
    Why Are Frames Useful?
• Used as a data structure by Expert Systems
• All information about an object stored in
  one place
  • As opposed to rule-based systems
• In real world systems frames have a large
  number of slots
  • Searching for all relevant information would
    take a long time

                 CS 484 – Artificial Intelligence   14
             Search Space
• A set of possible choices in a given problem
  • One or more are the solution to the problem
• Identify one or more goals
• Identify one or more paths to those goals
• Problem
  • set of states
  • states connected by paths that represent actions

                 CS 484 – Artificial Intelligence   15
           Search Trees
•   Semantic trees – a type of semantic net.
•   Used to represent search spaces.
•   Root node has no predecessor.
•   Leaf nodes have no successors.
•   Goal nodes (of which there may be more
    than one) represent solutions to a problem.

                  CS 484 – Artificial Intelligence   16
  Search Trees: An Example

                                     • A is the root
                                     • L is the goal
H,I, J, K, M, N and O are leaf nodes.
There is only one complete path:
  A, C, F, L
                 CS 484 – Artificial Intelligence      17
Example: Missionaries and
• Three missionaries and three cannibals
• Want to cross a river using one canoe.
• Canoe can hold up to two people.
• Can never be more cannibals than
  missionaries on either side of the river.
• Aim: To get all safely across the river
  without any missionaries being eaten.

              CS 484 – Artificial Intelligence   18
     A Representation

• The first step in solving the problem is to
  choose a suitable representation.
• We will show number of cannibals,
  missionaries and canoes on each side of
  the river.
• Start state is therefore:
  • C=3,M=3,B=1                              0,0,0

                CS 484 – Artificial Intelligence     19
A Simpler Representation
• In fact, since the system is closed, we only
  need to represent one side of the river, as
  we can deduce the other side.
• We will represent the finishing side of the
  river, and omit the starting side.
• So start state is:
  • 0,0,0

               CS 484 – Artificial Intelligence   20
•    Now we have to choose suitable
     operators that can be applied:
    1.   Move one cannibal across the river.
    2.   Move two cannibals across the river.
    3.   Move one missionary across the river.
    4.   Move two missionaries across the river.
    5.   Move one missionary and one cannibal.

                    CS 484 – Artificial Intelligence   21
The Search Tree
• Cycles have been removed.
• Nodes represent states,
  edges represent operators.
• There are two shortest paths
  that lead to the solution.

 CS 484 – Artificial Intelligence   22
What Other Representations are

          CS 484 – Artificial Intelligence   23
 Combinatorial Explosion
• Problems that involve assigning values to a set of
  variables can grow exponentially with the number
  of variables.
• Some such problems can be extremely hard to
  solve (NP-Complete, NP-Hard).
• Reduce state space
   • select good representation help
   • using heuristics (see chapter 4).

                     CS 484 – Artificial Intelligence   24
     Problem Reduction
• Breaking a problem down into smaller sub-
  problems (or sub-goals).
• Can be represented using goal trees (or and-or
• Nodes in the tree represent sub-problems.
• The root node represents the overall problem.
• Some nodes are and nodes, meaning all their
  children must be solved.

                  CS 484 – Artificial Intelligence   25
Problem Reduction: Example

           CS 484 – Artificial Intelligence   26

To top