Download presentation
1
CS 484 – Artificial Intelligence
Announcements 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
2
Representations: Semantic Nets, Frames, and Trees
Lecture 3 First too representation used for knoweledge based systems (toward strong AI) Trees broader application – games, planning, etc.
3
The Need for a Good Representation
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
4
CS 484 – Artificial Intelligence
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
5
CS 484 – Artificial Intelligence
A Simple Semantic Net Arrows indicate the direction of the relationship Represents knowledge about objects and relationships that exist between objects semantic nets can be reasoned about in order to produce systems that have knowledge about a particular domain Can't represent negations specific objects are instances of a particular class Is Cheese instance or class? Rule – an object without an "is-a" relationship is a class Semantic Net not always that best representation – bad for a dictionary real world semantic net – Word Net words groups as synsets and interlinked by means of conceptual-semantic and lexical relations CS 484 – Artificial Intelligence
6
CS 484 – Artificial Intelligence
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
7
CS 484 – Artificial Intelligence
Your Semantic Web Bob ->(owns) 2 2 -> (instance of) cars Ford ->(type of) car House -> (own by) Bob 2 -> (parked at) House house -> (located in) California Sacromento -> (capital of) California car -> (driven on) freeway Route 101 -> (instance of) freeway Highway 81 -> (instance of) freeway CS 484 – Artificial Intelligence
8
CS 484 – Artificial Intelligence
Inheritance 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
9
CS 484 – Artificial Intelligence
Frames A frame system consists of a number of frames, connected by edges, like a semantic net. Class frames describe classes. Instance frames describe instances. Each frame has a number of slots. Each slot can be assigned a slot value. instances are objects object can be a physical object object can be property, place situation, or feeling frames are an object-oriented representation used to build expert systems CS 484 – Artificial Intelligence
10
Frames: A Simple Example
fido is a dog – generalization dog is more general than fido CS 484 – Artificial Intelligence
11
CS 484 – Artificial Intelligence
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 related tail is a part of Fido Fido is an aggregation of dog parts CS 484 – Artificial Intelligence
12
Create a frame-based representation
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
13
Your Frame-Based Representation
Bob: owns->house, owns->2 house: located in-> CA Sacromento: capital->CA 2: instance of->car, parked at->house Ford: type of->car car: driven on->freeway Route 101: instance of-> freeway Highway 81: instance of->freeway CS 484 – Artificial Intelligence
14
CS 484 – Artificial Intelligence
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 Expert systems were the bread and butter of AI in the 80s. Digital Equipment Corporation created an Expert System for order for new computers – saved the company $40 million a year CS 484 – Artificial Intelligence
15
CS 484 – Artificial Intelligence
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
16
CS 484 – Artificial Intelligence
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
17
Search Trees: An Example
A is the root node. L is the goal node. 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
18
Example: Missionaries and Cannibals
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
19
CS 484 – Artificial Intelligence
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
20
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
21
CS 484 – Artificial Intelligence
Operators Now we have to choose suitable operators that can be applied: Move one cannibal across the river. Move two cannibals across the river. Move one missionary across the river. Move two missionaries across the river. Move one missionary and one cannibal. CS 484 – Artificial Intelligence
22
CS 484 – Artificial Intelligence
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
23
What Other Representations are Possible?
CS 484 – Artificial Intelligence
24
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). number of configurations of people playing 4 square (position matters) vs. 5 square vs. 100 square CS 484 – Artificial Intelligence
25
CS 484 – Artificial Intelligence
Problem Reduction Breaking a problem down into smaller sub-problems (or sub-goals). Can be represented using goal trees (or and-or trees). 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
26
Problem Reduction: Example
move top disk to different poll or move a,b,c to 2, d to 3 (sub goal) CS 484 – Artificial Intelligence
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.