170 likes | 687 Vues
Representation. A farmer wants to move himself, a hunrgry silver fox, a hungry, fat goose, and a sack of tasty grain across a river. Unfortunately, his boat is so tiny he can move only one of his possessions across on any trip. What is he to do?. Fox, Farmer, Goose, Grain.
E N D
Representation • A farmer wants to move himself, a hunrgry silver fox, a hungry, fat goose, and a sack of tasty grain across a river. Unfortunately, his boat is so tiny he can move only one of his possessions across on any trip. What is he to do?
Fox, Farmer, Goose, Grain • 5 minute break for solving the problem • Keep track of how you solve the problem (think about how you think to solve the problem)
Representation • Look at the representation in figure 2.1. • Graph like representation • Nodes: A safe distribution of entities on both banks of the river • Edges: connect nodes separated by a single boat trip • Solution: draw a line from start state to end state
Analysis • How many nodes? • How many safe nodes? • How many links? • How many legal links?
Representation is key • Node/Link representation is good • Once represented using nodes and links, problem is simple to solve
Representation • A lexical part: What symbols are allowed in your vocabulary/lexicon • A structural part: constraints on how symbols can be arranged • A procedural part: access procedures to create, modify descriptions • A semantic part: associates meaning with description
Semantic Nets • Lexical: Nodes, links, and app-specific link labels • Structural: Each link connects a tail node to a head node • Semantic: Nodes and links denote application specific entities • Procedural: node, link constructors, readers/visitors to traverse the net
Good Representations • Example of a good representation in object identification • Identify an object as belonging to a class • Basic Method: Describe and Match • Describe Object (using a “good” representation) • Match to library of object descriptions • Return closest match
Object Identification • Feature based object identification • Feature extractor, extracts easily identifiable object features (area, perimeter, hole count, hole area, …) • Values of these features locate the object in an n-dimensional feature space (an object occupies a feature point in feature space) • Compare the distance of unknown object’s feature point to library of known (idealized) object’s feature points. The most likely identity is determined by smallest distance.
Administrivia • Read Chapters 1 and 2 • Assignment 1 considers Missionaries and Cannibals is available, due Feb 4. • Back of book contains hints • Need help, talk to me
3 Missionaries 3 Cannibals • Three cannibals and three missionaries are standing on the west bank of a river. A boat is available that will hold either one or two people. If the missionaries are ever outnumbered -- on either bank or in the boat -- the cannibals will eat them. Your job is to design a program (come up with a representation and implement a search algorithm) that will get everyone across the river to the east bank safely.
Burglar and combination lock • Generate a combination • Test if it opens the safe • Consider 6 digit combination • 10^6 combinations • 10^6/2 combinations on average to find correct combination, 3/min 16, 24 hr weeks
Generate and Test • Powerful problem solving method • Until a satisfactory solution is found or no more solutions can be generated • Generate the candidate solution • Test the candidate solution • If an acceptable solution is found, announce it; otherwise announce failure
Dendral • Good generator – complete, nonredundant, only generates structures arising from known formula • Tester – Spectrogram comparator
Terminology • State (of a system): Description of a system that is sufficient to determine the future • State space: Each node denotes a state, and each link denotes a possible one-step transition from one state to another
State Space • A state space is a representation • That is a semantic net • In which • Nodes denote states • Links denote transitions between states • Initial state, current state, goal state