KBAI Ch 1-9
Production Systems
"cognitive architecture" in which knowledge is represented in the form of rules
Production Systems - Cognitive Agent Function
- Production Systems help us do *Action selection* ● A cognitive agent is a function that maps a perceptional history into an action (Asterisk on P stands for history percepts) ● *Major task of cognitive agents is to select actions* ○ Driving a car, what action should you do next? Conversing with someone else - what should you do next? ○ Base action partially on history of percepts in that particular situation ● This captures basic notion of a cognitive agent in a very concise manner
Production Systems - Specific Architecture: SOAR
- Specific architecture for deliberation ● Can also cover certain aspects of reaction and some aspects of metacognition ○ Covers metacognition and reaction, but we're going to focus on deliberation component ● Consists of long term memory and working memory ● Different components interacting with each other affords for processes of reasoning and learning
Universal AI Problem Solving Methods
- Universal AI methods have very few guarantees of success, computational efficiency or optimality. Their power is they can be applied to a large class of problems ● Means-Ends Analysis, like generate-and-test, is an example of *"universal AI methods"* that are applicable to very large classes of problems -In future lessons we talk about more specialized problem solving methods that are turned/applicable to a small class of problems
Learning by Recording Cases Examples
- we have new problem of writing a new program in Java - we know we've had cases of starting a java program before - when starting new program last time we started with (public static void main(). This works by transitioning this past solution to new problem. We may subsequently get a null pointer - we can then probe cases of prior null pointer errors ○ Imagine going to doctor and discussing signs and symptoms - Doctor presented with new problem but doctor has cases in memory - Might select most similar case and apply solution from previous case
Production Systems - Production Rules
-How content of working memory invoke different kinds of knowledge from long term memory: ● Imagine Procedural knowledge in SOAR's long term memory is represented in the form of rules (production rules) (r1,r2,r3....) ○ Each rule here is a production rule (Could be more than listed here) ○ Capture procedural knowledge in long term memory ● First thing to decide is to pitch or walk the batter ○ Assume some rules that allow the pitcher to make a decision between these two choices ● Consider r7 - An action has been selected, an action going to be executed, as well as state of working memory will change to "now pitch has been thrown".
Dumb Generate and Test
-Imagine we have a generator that can generate all possible states ○ Tester goes through possible states and removes some of them. Only removes states that are clearly illegal based on specifications of the problem (Ie.. can't have more prisoners than guards on either side) ● We can also collapse common states into one state ○ Continue to do this for each possible move and cause combinatorial explosion. (Computationally inefficient) -GnT is more difficult in an unconstrained domain (infinite options)
Networked Frames - Discourse Understanding
-Just like a frame can help us understand a sentence, as we start hooking up networked framed - we can get discourse level understanding - allowing for more complex understanding -discourse contains a series of sentences. Might construct a frame for each sentence and hook them up to create a discourse level understanding to have a higher understanding ○ Understand larger units of language understanding
Deliberation (Unify reasoning, learning, memory)
-KBAI focuses on theories that unify reasoning, learning and memory into deliberation -Watson is trying to understand natural language sentence (this is reasoning) -Watson is also learning - gets correct/incorrect answer and stores it (learning) -knowledge has to be accessed from somewhere (memory)
Learning by Recording Cases
-Learning method where: Given new problem a - retrieve most similar prior problem b, from memory ● Memory directly provides us with the answer and we don't need to think about it. Already learned about it previously and try to apply same solution. ● Case is encapsulation of past experience. Works in a large variety of problems ○ File away individual cases used in the past to use for future problem solving ● First topic in analogical reasoning- Core process in cognition
CBR - Benefit of Discrimination Tree for Storage
-When we store by index, it can get complicated to retrieve cases as we add more and more cases -With discrimination trees, when we ask a question, we are able to prune away the possible cases we can retrieve - this makes the search process more efficient In both storage by index and storage by discrimination tree, we are trying to accumulate new cases, but in discrimination tree, by asking right questions at right nodes, we are making search more efficient -O(n) searching cases via storage by index - O(n) - O(n) searching cases via storage by discrimination tree - O(lgn)
7 Principles of KBAI (ORLMHRR)
-agents organize knowledge into knowledge structures to reason -reasoning is top down and bottom up -agent learning is incremental -agents specify methods to address tasks -agents use heuristics (efficiency vs optimality tradeoff) -agents solve using recurring patterns in problems -agents enable reasoning, learning, and memory to support/constrain each other
MEA Problems
-all operators increase the distance, so we need to use a different problem solving method -something can get caught in loops ● Means-ends analysis can run into looping problems - so to overcome obstacle we can use problem reduction ○ Problem reduction breaks larger hard problem into smaller easier problems. Jump forward to logic and planning to see how it relates to planning these kinds of things
Production Rules - Working Memory vs Long Term Memory
-based on contents of working memory, some rules get activated, consequents get established, consequences get written on working memory, as contents of working memory changes => new rules get activated (constant interaction between working memory on long term memory) -contents of working memory change rapidly -contents of long term memory change very slowly
Frames in Production Systems
-came across notion of frames in production systems lessons ○ Frames as capturing conceptual knowledge stored in the semantic memory. Long term memory provides the frame of what slots we need to look for from input sensory perceptions ○ Once frame for 'ate' pulled out of semantic memory, it generates expectations in the form of slots of the frame ○ Not just bottom up of knowledge going into mind, but also top down for structures coming out of mind ■ Mind provides rich structural representations for knowledge (such as frames and slot expectations)
Complex Frames (Story Understanding)
-can have frames for nouns as well (frame for Angela, frame for lasagna). ● Can have frames for verbs, nouns, etc ● Frames can be linked. Connect different frames to provide a larger network. Filler for a slot in one frame can point to another frame.
Guards/Prisoner's Representation
-each node is a state -node captures the lexicon of the semantic netowrk -(for NLP) structure part has to do with the transformation to connect different nodes into more complex sentence
CBR - Storage by Index
-indexing scheme - each case indexed by x, y coordinates (ie.. 3E, 9N for A) -Want to use an index structure that allows for *effective and efficient retrieval* - because w are storing things only because we want to retrieve them at later time -Ex - In the case of File input - cases could be indexed by whehter they're python or java, whether they're fast/slow, or what kind of files they read. Each of these values/features becomes a way of indexing/identifying each individual case, such that when we identify a new problem, we can find one with most similar match to variables -If storage doesn't allow for efficient retrieval, then it's not a very good storage mechanism
Characteristics of AI Problems (KRGIWW)
-knowledge arrives incrementally, not at once -use recurring patterns in problems -multiple levels of granularity -computationally intractable -world is dynamic, but knowledge of world is static -world is open-ended, knolwedge of world is limited
Frames - Slots and Fillers
-powerful and common knowledge representation. First step towards building theory of common sense reasoning -focus on verb 'ate' - associate frame w/ verb. (frame can also be associated with noun/objects in sentence ○ List of "slots" / attributes that we associate with a stereotypical value of eating ○ Slots are filled by "fillers" ■ Some fillers are default. Some are filled in by the sentence ○ Subject is Ashok - object is a frog ○ "Object-is" => location of object
CBR - Storing failed cases
-sometimes even storing failed cases is beneficial - can help us anticipate types of problem that can occur w/ new problems ■Ex -David's File Input program - if you read too far in the file it will crash and error - always same error. Must have cases of different ways it's failed in the past, so we can anticipate and do correctly in future. ○ When there's a failure we can have 3 options: ■ Try to repair failure: evaluation to adaptation ■ Try to recover from failure: evaluation to retrieval ■ Try to store failure in case memory to help anticipate failures with new problems ● Not useful to store every successful case ○ Soon case memory will become very large and retrieval step will become less efficient (utility problem). Want to store only those successful cases that help us cover a larger span of problems. Even when a case succeeds we only store it if it has something noteworthy about it
CBR - Model Based Adaptation
-start at office and go to restaurant. One solution is to take previous case to Doctor's office and do a search using this model/map of the world - to extend the route -Example - in David's programming example (reading files). We've read input from a file in python many many times, but never in java before - we have a model of way java works, to know how to translate python case to java. ● When we design various types of products, know about configuration of elements in design, but also a model of how that configuration is supposed to work ○ Use models to adapt, evaluate, and store cases
Production Systems - Fundamentals of Learning
-start with *theory of reasoning* that will help us answer - what to learn? when to learn?why to learn? -Only then can we know How to do the learning -Reasoning first, and then backwards to learning -This princple happens in production systems - when an impasse is reached, it only then said lets learn from episodic knowledge to break impasse -Trying to build unified theory of reasoning, memory, and learning where demands of memory and reasoning, constrain the process of learning
MEA Formal Algo
-try all possible operator/movements - and 'prefer' the one that minimizes distance
KBAI Fundamental Conundrums (ACDWP)
1 - Intelligent agent have limited resources 2 - computation is local, but problems have global constraints 3- logic deductive ((top-down) begin w/ general truth and ending with specific claim) - but many problems are not 4 - world is dynamic, but knowledge is limited 5- problem solving/reasoning/learning are complex, but explanation is more complex
Production System - Assumptions of Cognitive Architecture (GRKKFL)
1) Agents have goals and take actions in pursuit of those goals 2) Agents live in rich,complex, dynamic environments 3) Agents use knowledge about the world to pursue goals in environments 4) Knowledge is represented at particular layer of abstraction that is important and removes all of the details ○ Knowledge is captured in the form of symbols 5)Agent is flexible - Behavior is dependent upon the environment. As environment changes so does their behavior 6)Agents learn from their experiences. Constantly learning as they interact with the world
3 Properties of Frames (RS, PD, EI)
1) Frames represent stereotypes - often very cultural specific - each person has their own boilerplate slots (there is a subject, an object, there's a location, a time etc..) 2)Frames provide default values -might already have default for 'eaten' - means object is no longer alive -can have *exceptions* to default cases. - this is powerful and problematic -Exceptions are powerful in that we can have stereotypes and default values and when needed we can override these defaults - Exceptions are problematic because the more we have, it becomes increasingly complex to manage 3) Exhibit inheritance - use language of classes and subclasses (very similar to object oriented programming) -default values similar to constructors -Frame representation could act as intermediate representation for both sentence comprehension and for sentence generation
KBAI is a collection of 3 Things (KPA)
1) Knowledge representations (semantic networks). 2) Problem solving techniques ( generate and test) 3)Architecture
Knowledge Representation (Language, Content)
1) Language - Some way to represent things, and vocabulary 2) Content - Some type of knowledge, Goes into the representation -Ex: f = ma (simple knowledge representation) ○ Represent the problem, Represent the knowledge, use the knowledge to address the problem
4 Steps of CBR (RAES)
1) Retrieval - Retrieving a case from memory similar to the current case (KNN is one method of retrieving cases from method) 2) Adaptation - Adapt the solution to the case that fit the current problem. (using design of a program that we used before) 3) Evaluation - adapted "Candidate Solution" needs to be evaluated. Evaluating how well the adapted solution addresses the current problem. Do this via simulation, walk through it, etc. - evaluate whether solution succeeds at problem. 4) Storage - Encapsulate new problem/new solution into a case to store into case memory. Storing the new problem and solution as a case. -4 step process unifies memory, reasoning, and learning. Reason when we adapt and evaluate. Learn when we store back into memory
Knowledge Representation vs Problem Solving Method
1)Knowledge representation (ie.. Semantic Network), while useful, by itself doesn't solve any problem solving method. Need a problem solving method using the knowledge FROM the knowledge based representation to actually do the problem solving. Generate and test is one solving method 2)when doing problem solving or reasoning - there is a coupling between knowledge representation and problem solving method - (like semantic network and generate and test)
Assumptions of CBR (PE, SS)
1)Patterns exist in the world - Same problems happen again and again. A lot of science is about finding patterns in the world (physic has recurring laws of nature). Theory of intelligence will give a pattern that a mind will encounter in the real world. 2) similar problems often have similar solutions -this happens most of the time - except in some cases like tying your shoes and then applying this case to tying Velcro shoe, or accounting for multi-point touchscreen for mobile where the previous cases deal with single touch -problem is similar but can sometimes have radically different solutions
Production Systems - 3 Kinds of Long Term Memory Knowledge (PSE)
1)Procedural - How to do certain things? How do you pour water from a jug into a tumbler? 2)Semantic - Generalizations such as concepts and models of the world. Your concept of a human being - or your model of how a plane flies in the air. 3)Episodic- events - Has to do with specific instances of events. What did you have for dinner yesterday?
Smart Tester vs Smart Generator
1)Smart Tester - can detect when any state is identical to previously visited state, identify illegal, rule out paths that have no "future" states, and merge states that are identical 2)Smart Generator - won't generate states that have already appeared (non-productive) or are illegal -intelligence built into one side or the other to make solution more efficient -humans don't have complete/infinite knowledge
Production Systems: Architecture + Content = Behavior
Assume we want to design a cognitive machien that exhibits a particular behavior 1) This equation says to do that, you have to design the right architecture and put the right knowledge content into that architecture to get the behavior that you want for it (complicated) ○ Suppose architecture is fixed - we just need to switch out the knowledge content to get different behaviors ● If we look at it trying to understand human behavior ( from the function for cognitive architectures). The behavior is arising b/c knowledge content is different. Can map behavior to content b/c architecture is fixed. Simplifies understanding of how to design machines and understanding of human cognition. ○ Same thing happens in computer architecture - Architecture has stored programs. Architecture doesn't change, stored program changes to give you different behaviors ○ Same idea with cognitive architectures - Keep architecture the same and change the content
Production Rules - Baseball Walk Example
Based on these rules, r1 will get triggered, leading to the creation of an 'Intentional Walk' goal. Then, because the goal is 'Intentional Walk', r3 will get triggered, thus selecting the intentional-walk operator. ○ R1 => R3 => R7 => Intentional walk and add pitch thrown to state -match the contents of the working memory - with the antecedents of the production rules
RPM vs Guards and Prisoner's
Both use semantic knowledge representation and Generate and Test as problem solving method. -RPM can solve with GnT multiple ways -Guards and Prisoners - balance of power is between generate and test
Case Based Reasoning (CBR) (Phases - RAES)
cognitive agent addresses new problems, by tweaking solutions to previously encountered problems that are similar ○ Builds on "learning by recording cases" In learning by recording cases - the problem was identical to a previous problem RC vs CBR: ------------------ ○In case based reasoning, the new problem is similar to previous problem ○CBR typically has several phases (case retrieval, case adaptation, case evaluation, and case storage) ● When problem is not identical we have to do some sort of reasoning. CBR is 2 parts: case and reasoning ○ Case - extract from memory and use it ○ Reasoning - once you extract from memory, how can you reason about it and adapt to fit new problem
CBR - Incremental Learning via Discrimination Trees
how will we store a new case - how will we incrementally learn knowledge structure as new cases are put in? ● Imagine new case x ○ Acts like a tree insert and rebalances when new cases occur ○ First insert X - but then we have problem of discriminating between A and X - so add a new question is origin east of 3E. Incremental Learning - with the addition of each case, some new knowledge structure is learned ● Ex - David's file input program - we could use similar indexical structure to design a discrimination tree - at top level: "What language is it in?" (Java, Python, C++ , etc..) or "Is it efficient?" "Who's using it" - and so on.,.. until we get down to individual cases. Discrimination trees doesn't have to be binary - could be multiple answers
CBR Block Example
● Block is not like anything we've seen in the block world. David answered wrong (orange) - correct answer is purple ● When problem is not identical we have to do some sort of reasoning. CBR is 2 parts: case and reasoning ○ Case - extract from memory and use it ○ Reasoning - once you extract from memory, how can you reason about it and adapt to fit new problem -same with navigation - if we're trying to go from origin to destination - we pull up a similar recorded case (route) - but it's potentially not useful AS IS - we need to start with this case but also adapt it
Problem Reduction for the Block Problem
● Can think of this as looking at sub goals ○ Think of this as sub goals: 4 sub goals: A on B, B on C, C on D, D on Table. Attack each subgoal one at a time ○ Why start with C on D? ■ Problem reduction by itself does not tell us which sub goal to attack first (this is addressed by *planning*)
CBR - Non-Linear Process through 4 CBR Steps
● Cased based reasoning isn't necessarily linear ○ If evaluation fails, then want to try adapting particular case in a different way ■ Instead of abandoning case, might try to adapt it again ○ If we try to adapt the case several times and it still fails - might want to abandon case and retrieve a different case from case memory ○ Sometimes case retrieved from memory perfectly matches current problem and we can skip the adaptation step
Recording Cases - Higher dimension distance formula
● Formula that is generalized for many dimnsions (k-dimensional space) ●We can put each route as c1,c2,c3,c4 ●Both case and problem are defined in K dimensions -
Frame as a Knowledge "Structure" (atom vs molecule)
● Frame is a knowledge "structure" ○ Difference between an atom of knowledge representation and a molecule of knowledge representation. -Some knowledge representations are like atoms, others are like molecures ■ Production rule is an atom: unit by itself ■ Frames are like molecules: have a structure, large number of things happen, can expand or contract. Can do a lot more w/ frames than you can w/ a simple production rules.
Problem Reduction
● Given a hard complex problem - reduce into multiple smaller simpler problems ● One of the fundamental roles of knowledge is it tells you how to decompose hard problems into simpler problems ○ Once you have solutions to smaller problems you can think of how to compose those smaller solutions into a solution for the problem as a whole
Applying MEA to RPM
● Goal could be to transform from 1 frame to another frame and then trace back and find what transformation was ● How do you measure distance between frames? What are the individual operators you need to get to your goal?
Production Systems - SOAR state space
● State space is a combination of all states that can be achieved by applying various combinations of operators starting from the initial state ● Each state can be described by some features: f1, f2, etc ○ Each feature can take on some values: v1, etc ● Initially at state S0 (initial) and want to achieve some state S101 (goal is accomplished) ○ Think of decision making as some kind of path from initial state to goal state ● Abstract state space - Pitcher hasn't made any action yet - he is setting up an abstract state space in his mind- and exploding it out
Production Systems Baseball Example
● We can create a "force-out" situation by walking batter. If you have knowledge of baseball this decision is easier
Weak vs Strong problem solving methods
● Weak methods - Make only little use of knowledge (means-ends analysis, problem reduction, generate and test) ● Strong methods - demand a lot of knowledge. Will use knowledge of the world to come up with good solutions in an efficient manner. On the other hand, they require knowledge, which is not always available ● Humans use knowledge intensive methods when in an expert domain ● When we're not an expert in a domain. Might go with a method that's weak b/c they don't require a lot of knowledge
Production Systems - Levels of Cognitive Architecture
Can build different levels of abstractions ● Various levels connected with each other ■ Hardware Level provides architecture for implementing what's happening on a higher level ■ Task/Knowledge Level provides content for what needs to be represented or implemented, manipulated or processed in the level below ■ Representing in the form of a semantic network. But what are we going to represent IN the semantic network? Knowledge Level tells us what is the content of the knowledge that is require to play baseball? Once you have the knowledge you can implement it in several ways ○ Similarly once you know what kind of decision you have to make and what the decision making process might look like overall, there might be many different methods for making that decision (many different algorithms, etc) ● All 3 levels and descriptions are legitimate and valid - Need all 3 of them. ○ Hypothesis is that these 3 layers are also useful to trying to analyze how cognitive systems might work (both natural and artificial) ○ Hypothesis is also building theories that are at all 3 of these abstractions ■ What kind of hardware do we have that provides affordances and constraints on algorithms ● Class focused on top 2 layers of abstraction
Production Rules - Goal Oriented
Cognitive architectures are goal oriented, so we expect goals to appear in the production rules -goals are in the consequent -knowledge of rules is very detailed and specific
Deductive (top-down), Inductive (bottom-up), Abductive
Deductive - (top-down , facts to facts) - reasoning logically from factual statements to reach a conclusion -I'm A,B,C thus I can reach my goal D Inductive - (bottom-up - generalizing) - starts w/ question (sensory input) and works its way to general theory (specific to general) Abductive - effects to causes. (Ie.. going to doctor w/ symptoms and doctor comes up w/ cause)
Coupling (between knowledge representation and problem-solving methods) for RPM
For RPM, 1 single knowledge representation of a semantic network supports all three problem solving strategies ● Coupling is weak - between knowledge representation (semantic networks) and problem-solving methods ( problem reduction, means-ends analysis, and generate-and-test ● Other types of knowledge representations have stronger coupling - where the knowledge affords certain inferences - and inferences demand certain knowledge
Generate and Test
Given a problem, generate potential solutions and test efficacy to solve problem If we have complete/correct knowledge of world, infinite computational resources, and reasoning guaranteed to be correct - we can generate the one correct answer and don't need to test it . We can only generate plausible solutions in real life that we need to test -Genetic Algorithms are an example of generate a test - find all states that are possible, then use fitness function that act as tester. This is effective for large number of problems - but it is inefficient method because neither generator or tester is smart
Cognitive Systems - Reasoning, Learning, Memory
In Cognitive Systems - Reasoning, Learning, Memory are closely related. -dealing w/ procedural memory that procedural and episodic knowledge. -dealing w/ reasoning/decision making -dealing w/ learning - chunking
MEA Distance
MEA uses notion of distance in a metaphorical/figurative sense - not a physic sense (such as robotic path finding) -Can synonymously use the word difference and distance here ■ Means end analysis does not help an AI decide on the best course but helps eliminate actions (ie we have two options in the chart)
Production Rules - Impasse
Occurs when decision maker cannot make a decision b/c not enough knowledge is available or b/c multiple courses of action have been selected and agent cannot decide between them ○ Soar will try to learn a rule to break the impasse ○ Soar will invoke the episodic knowledge to *learn* rule to break impasse
Metacognition
Reasoning about internal mental world. Reason about deliberation or reaction for example. -Perhaps when you change lanes the cars behind you honk because you didn't leave enough space. May now think about own actions or deliberation that led to those actions - and might reconfigure/repair this suboptimal plan.
CBR - Case Adaptation ("Almost correct solution...")
● Agents usually face computationally complex problems and have limited resources. How can they address computation complex problems with limited cognitive resources in near real time? Seemingly effortlessly? ○ Part of the answer might be: memory supplies an answer ○ Memory supplies an "almost correct" answer so *adaptation we have to do is very small*; it's a tweak ● Example of being mostly tweaking -Cooking meals - Might have a recipe for favorite meal. Imagine doing favorite meal for different company; do a small change to the dish but not a large overhaul ● "All design is redesign " - Solutions are evolutionary in nature - small tweaks over previous solutions. Design is fundamentally evolutionary. Take old design and evolve them slightly into a new design
CBR Case Storage
• Evaluation decides candidate solution meets requirement of problem. Encapsulate problem as case and store in memory. Home Restaurant - store in memory so we can retrieve case for the flipped trip home ● Important way of learning b/c we're constantly accumulating new cases
Structure of Semantic Networks (Lexicon, Structure, Semantics)
○ 1) Lexicon - Vocabulary of that language (nodes - x,y,z) ○ 2) Structure - How those words can be composed together into a complex representation (Directional links - capture relationships, compose nodes into complex representation) ○ 3) Semantics - tells us how the representation allows us to draw inferences and reason (Application-specific labels - allows us to draw inferences and do reasoning)
MEA Strategy and State Space
○ Come up with a path between initial state to the goal state ■ Pick an operator (movement) that will *help reduce the difference between current state and goal state* Means-Ends Analysis: 1)means - application of operator, 2) end - reduction in difference between current state and goal state ● Means end analysis is a general problem solving method that allows us to look at our goal and to continually move towards it
RPM Representation - Similarity Weights for Disambiguation
○ Given the scale what are the weights of the transformations? ○ ■ See why someone prefers #1 over #2
Characteristics of Good Representation (REWE)
○ Make relationships are explicit - ○ Exposes natural constraints of the problem ■ Works at the correct level of abstraction - brings objects and relations together, captures everything that needs to be captured ○ Excludes extraneous details ○ In summary: transparent, concise, complete, fast, computable ex - Nutrition label - doesn't make relationships explicit
CBR - 3 Ways to Make Case Adaptation (M, R, R)
○ Model based adaptation method ○ Recursive case based method ○ Rule based method
Recording Cases - Limitations of Higher Dimensional distance formula
○ Number of dimensions might be very large - high dimensional space. Deciding which of stored cases are most similar might not be as simple as this example ○ Even if new problem is very close to existing case, doesn't mean that existing case solution can or should be applied to new problem ■ Need alternate method of retrieving cases from memory and adapting past cases to fit the requirements of the new problem (case based reasoning)
Production Systems - SOAR - Putting Content Into Architecture (Baseball Example)
○ One attempt at capturing all of the knowledge from the paragraph. Goal remains go to next inning without batters scoring more points ○ We can generate content of working memory ● Now that all percepts and goals are in a simple form in working memory - with features and values we can work on this
Converting Semantic Nets to Frames
○ Rewrite the network to be in language of frames ■ Frame for each object ■ Capture relationships and point to references with values ● Frames and semantic networks are closely related. They are *representationally equivalent*
Production Rule Summary
○ SOARs long term memory consists of various types of knowledge ■ In SOAR this is represented as production rules - all of the form "IF something THEN something" .There are antecedents and consequences ● Antecedents can be connected through various kinds of relationships like "AND" and "OR" ● Consequence also might be connected ● *"If some antecedent is true then do some consequence* -consequences get written to working memory -contents of the working memory (frame) invoke contents from the long term memory (rules). -Short term/working memory perceptions invoke long term working memory (rules) -Procedural knowledge is the type of knowledge that's represented as production rules
MEA for RPM (and using a combination of AI techniques
○ Think of this as output of means end analysis. Each move brings us a little closer to goal. Apply analysis 1 step at a time ○ With means end analysis we can do a systematic analysis to find the goal state ○ Can also be thought of as problem reduction ■ Originally had big problem to solve - reduced it to 3 subgoals: 1) Find transformations between A and B 2) transfer transformation to C and find candidates for D, 3) compare candidates for D to each choice in the problem ○ Also has generate and test in it - generating solutions that we can then test against choices given to us ● Solving a complex problem uses a combination of AI problem solving techniques . At one point we might use problem reduction, at another point we might use means-ends analysis, and lastly we might use generate-and-test
Means Ends Analysis (MEA) - Block Problem
○ What sequence of operators that will move the blocks into the goal state ■ move(c,table) ■ move(b,c) ■ move(a,b)
MEA Example
● 7 moves since we can put B on Table. (We can't put A on table since it's already on table) ● There is only 1 move to reduce distance but there is an issue with that move ○ Putting A back on B
CBR - Recursive Case Based Reasoning
● Goal to get from home to restaurant: -Retrieve case from home to office -Retrieve another case from office to restaurant - this gives us solution from Home => Restaurant. Can combine to make the new case of home to restaurant ○ First time case is retrieved for solving problem, the case provides a *partial solution*. Remaining part which is not solved is made a new problem and send it back to the case memory to look up a new case - then compose new case with previous case to compose full solution ● Programming Example: File input program (David) is usually part of bigger problem of persisting data between instances of the program. Real problem is save data when program isn't running. Solve problem recursively by breaking down to: 1)solving file input and 2)solving file output. Solved recursively by breaking down into subproblems ○ Ex - Microbot that swims underwater in stealthy manner - similar to case of copabot which swims but slowly. Now we need to achieve new goal of stealthy motion at high speeds. Ie.. retrieve a squid swim stealthily by matching wake around it. ● Compound analogy - Type of adaptation by recursive reasoning
Production Rules - Breaking Impasse (Chunking)
● Imagine SOAR has previous memory of an event ○ Similar situation where pitcher threw a fastball and batter hit a home run ○ SOAR can encapsulate knowledge of this event into a production rule based on this prior event - we can now generate r8 ■ Process of learning called *chunking* ● Impasse immediately tells chunking the goal which is to simply "break the impasse" ● Search episodic memory to find an event that has some knowledge that may break the impasse ○ In particular it looks at percepts of current situation and compares to percepts in similar episodic memory to see if there's any information about current batter ■ If info is found that tells SOAR the result of some previous action that also occurs in the current impasse, then soar picks that event ● Then it tries to encapsulate the result of the previous event in the form of a rule In the example picture - it will avoid the homerun result by dismissing fast-ball operator
CBR - Rule CBR (using heuristics) (Ex- center of town, flipping route)
● Imagine at new city and want to find downtown. Simple heuristic is to find tallest buildings and go in that direction (go towards downtown). Heuristic is rule of thumb that *works often but not always* ● Ex - Store case of home to restaurant. Going home from restaurant - we can retrieve that case that we used to get there. ○ Use heuristic to flip the turns and go back the way you came - obviously doesn't work all the time (works often but not always) - sometimes we can't go certain way down street ○Ex - When doing file input (which is resource intensive). If efficiency is a bigger concern, might have rule/heuristic that says "read entire arrays of data at a time" instead of just "one byte at a time" b/c need to be more efficient. Previous case might have been 1 byte at a time - but we adapt the case. Rule helps us adapt design that more efficient ● Ex of heuristic - if you want to make an artifact lighter - try a different material - this is a heuristic expressed as a rul
Case Retrieval by Nearest Neighbor (Ie.. Finding closest resembling block)
● Knowledge can be represented in a two dimensional grid ● When a new problem comes it can be placed onto the grid ● Calculate the nearest neighbor for the new case ○ Use the euclidian distance ● Table shows that black block is very close to the newest item ● Nearest neighbor is just one method to find most similar (or closest resembling) case Weaknesses: -------------------- -In this problem we have 2d grid because we have 2 coordinates. *In the real world, this is more difficult to use and we might need higher dimensional spaces* -Sometimes we also have to adapt the problem to the given problem (case based reasoning)
CBR - Storage by Discrimination Trees
● Knowledge structure in which cases themselves are leaf nodes of trees ● Root node and intermediate nodes are questions ○ Questions at root node and intermediate node pertain to indexical structures of the cases
Production Systems - Levels of Architecture for Watson
● Layers of Watson: 1) Physical computer, 2) Searching and decision making, 3) answering the inputted clue ● Answer the inputted clue (task layer. Knowledge is a part of it. Knowledge watson has must be necessary.)
Problem Reduction vs MEA and GnT
● Like Generate-and-Test, and Means-Ends, Analysis. *Problem reduction is universal - applicable to large class of problems. Problem reduction does not guarantee means of success.*
Production Systems - SOAR Baseball Pitcher Example - Action Selection
● May conceptualize the decision making as the following ○ If he chooses to pitch he has to decide which kind of ball to throw ○ After this another set of possibilities pop up ● Setting up a state space
Recorded Cases Problem - Navigation Example
● New problem of how to go from Q to arrow -if we focus only on origin - then B case seems closest -If we focus solely on destination, than E case seems closest -Solution => Use formula that is generalized for many dimensions
Production Systems - SOAR Baseball Pitcher Example - Intro
● Pitcher mapping a percept history into an action . Decide on an action in a particular circumstance. ○ Imagine that the Pitcher is embodying a production system ○ Pitcher has several kinds of knowledge ■ A) Some internal - Already has it. Knowledge about goals and objectives ■ B) Some perceived from the world around Bases, batter, current state of game, score in inning, position of team mates, etc - these becomes specific kinds of knowledge the pitcher has
Production Rules - Baseball No Rule Example
● R2 => R4 => R5 (but also R6 since batter left handed - two operators selected) -when we get to Rule 7 - we see more than two operators have been set in R5 and R6. So it doesn't fire. This is called an *impasse* -current ruleset don't provide any goal/action
RPM Representation for 2x2
● Raven: How can we use a representation to determine an answer? ○ Compare representation of states and see if representation are the same ○ This is the right answer b/c the relationships between the objects within each frame are the same and the relationship between the frames are the same (the transformations that each shape undergoes)
CBR - Case Evaluation (Simulation, Critiquing)
●Adaptation step gives us a "candidate solution". In evaluation - how to assess the suitability of the candidate? 1) Simulation ------------------- ○ One method is to do a simulation (Do an execution in the world; do a trial run) ○ Might find out some turns are only one way and the case fails ● Ex - Going from home to restaurant - CBR proposed candidate solution. To find out if it works we can do simulation and we can accept solution. If we go opposite , from restaurant to home - and we flip it - we find out that it does not work as some streets are one way ○ This domain has a low cost of execution so we can just execute it. Some domains might have higher cost of execution - best we can do is first simulate before executing. ○ Every time we run a program and see if it works, we're evaluating whether adaptation is suitable - when it doesn't work we return to adaptation phase and try again. (or might return to retrieval phase to find a better case) 2) Critiquing ----------------- ● Another method of evaluating - could share with other designers and let them critique it. (number of different methods of evaluation