DOC PREVIEW
USC CSCI 561 - session10-11

This preview shows page 1-2-3-22-23-24-44-45-46 out of 46 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS 561, Sessions 10-111Knowledge and reasoning – second part• Knowledge representation• Logic and representation• Propositional (Boolean) logic•Normal forms• Inference in propositional logic• Wumpus world exampleCS 561, Sessions 10-112Knowledge-Based Agent•Agent that uses prior or acquiredknowledge to achieve its goals• Can make more efficient decisions• Can make informed decisions• Knowledge Base (KB): contains a set of representationsof facts about the Agent’s environment• Each representation is called a sentence •Use some knowledge representation language, to TELL it what to know e.g., (temperature 72F)• ASK agent to query what to do• Agent can use inference to deduce new facts from TELLed factsKnowledge BaseInference engineDomain independent algorithmsDomain specific contentTELLASKCS 561, Sessions 10-113Generic knowledge-based agent1. TELL KB what was perceivedUses a KRL to insert new sentences, representations of facts, into KB2. ASK KB what to do.Uses logical reasoning to examine actions and select best.CS 561, Sessions 10-114Wumpus world exampleCS 561, Sessions 10-115Wumpus world characterization• Deterministic?• Accessible?• Static?• Discrete?• Episodic?CS 561, Sessions 10-116Wumpus world characterization• Deterministic? Yes – outcome exactly specified.• Accessible? No – only local perception.• Static? Yes – Wumpus and pits do not move.• Discrete? Yes• Episodic? (Yes) – because static.CS 561, Sessions 10-117Exploring a Wumpus worldA= AgentB= BreezeS= SmellP= PitW= WumpusOK = SafeV = VisitedG = GlitterCS 561, Sessions 10-118Exploring a Wumpus worldA= AgentB= BreezeS= SmellP= PitW= WumpusOK = SafeV = VisitedG = GlitterCS 561, Sessions 10-119Exploring a Wumpus worldA= AgentB= BreezeS= SmellP= PitW= WumpusOK = SafeV = VisitedG = GlitterCS 561, Sessions 10-1110Exploring a Wumpus worldA= AgentB= BreezeS= SmellP= PitW= WumpusOK = SafeV = VisitedG = GlitterCS 561, Sessions 10-1111Exploring a Wumpus worldA= AgentB= BreezeS= SmellP= PitW= WumpusOK = SafeV = VisitedG = GlitterCS 561, Sessions 10-1112Exploring a Wumpus worldA= AgentB= BreezeS= SmellP= PitW= WumpusOK = SafeV = VisitedG = GlitterCS 561, Sessions 10-1113Exploring a Wumpus worldA= AgentB= BreezeS= SmellP= PitW= WumpusOK = SafeV = VisitedG = GlitterCS 561, Sessions 10-1114Exploring a Wumpus worldA= AgentB= BreezeS= SmellP= PitW= WumpusOK = SafeV = VisitedG = GlitterCS 561, Sessions 10-1115Other tight spotsCS 561, Sessions 10-1116Another example solutionNo perception à 1,2 and 2,1 OKMove to 2,1B in 2,1 à 2,2 or 3,1 P?1,1 V à no P in 1,1Move to 1,2 (only option)CS 561, Sessions 10-1117Example solutionS and No S when in 2,1 à 1,3 or 1,2 has W1,2 OK à 1,3 WNo B in 1,2 à 2,2 OK & 3,1 PCS 561, Sessions 10-1118Logic in generalCS 561, Sessions 10-1119Types of logicCS 561, Sessions 10-1120The Semantic WallPhysical Symbol System World+BLOCKA++BLOCKB++BLOCKC+P1:(IS_ON +BLOCKA+ +BLOCKB+)P2:((IS_RED +BLOCKA+)CS 561, Sessions 10-1121Truth depends on InterpretationRepresentation 1 WorldABON(A,B) TON(A,B) FON(A,B) F AON(A,B) T BCS 561, Sessions 10-1122EntailmentEntailment is different than inferenceCS 561, Sessions 10-1123Logic as a representation of the WorldFactsWorldFactfollowsRefers to (Semantics)Representation: SentencesSentenceentailsCS 561, Sessions 10-1124ModelsCS 561, Sessions 10-1125InferenceCS 561, Sessions 10-1126Basic symbols• Expressions only evaluate to either “true” or “false.”•P “P is true”• ¬P “P is false” negation• P V Q “either P is true or Q is true or both” disjunction• P ^ Q “both P and Q are true” conjunction• P => Q “if P is true, the Q is true” implication•P ó Q “P and Q are either both true or both false” equivalenceCS 561, Sessions 10-1127Propositional logic: syntaxCS 561, Sessions 10-1128Propositional logic: semanticsCS 561, Sessions 10-1129Truth tables• Truth value: whether a statement is true or false.• Truth table: complete list of truth values for a statement given all possible values of the individual atomic expressions.Example:PQP V QTTTTFTFTTFFFCS 561, Sessions 10-1130Truth tables for basic connectivesP Q ¬P ¬Q P V Q P ^ Q P=>Q PóQTTFFTTTTTFFTTFFFFTTFTFTFFFTTFFTTCS 561, Sessions 10-1131Propositional logic: basic manipulation rules• ¬(¬A) = A Double negation• ¬(A ^ B) = (¬A) V (¬B) Negated “and”• ¬(A V B) = (¬A) ^ (¬B) Negated “or”• A ^ (B V C) = (A ^ B) V (A ^ C) Distributivity of ^ on V• A => B = (¬A) V B by definition• ¬(A => B) = A ^ (¬B) using negated or•A ó B = (A => B) ^ (B => A) by definition•¬(A ó B) = (A ^ (¬B))V(B ^ (¬A)) using negated and & or•…CS 561, Sessions 10-1132Propositional inference: enumeration methodCS 561, Sessions 10-1133Enumeration: SolutionCS 561, Sessions 10-1134Propositional inference: normal forms“sum of products of simple variables ornegated simple variables”“product of sums of simple variables ornegated simple variables”CS 561, Sessions 10-1135Deriving expressions from functions• Given a boolean function in truth table form, find a propositional logic expression for it that uses only V, ^ and ¬.• Idea: We can easily do it by disjoining the “T” rows of the truth table.Example: XOR functionPQ RESULTTT FTF T P ^ (¬Q)F T T (¬P) ^ QFF FRESULT = (P ^ (¬Q)) V ((¬P) ^ Q)CS 561, Sessions 10-1136A more formal approach• To construct a logical expression in disjunctive normal form from a truth table:- Build a “minterm” for each row of the table, where:- For each variable whose value is T in that row, include the variable in the minterm- For each variable whose value is F in that row, include the negation of the variable in the minterm- Link variables in minterm by conjunctions- The expression consists of the disjunction of all minterms.CS 561, Sessions 10-1137Example: adder with carryTakes 3 variables in: x, y and ci (carry-in); yields 2 results: sum (s) and carry-out (co). To get you used to other notations, here we assume T = 1, F = 0, V = OR, ^ = AND, ¬ = NOT.co is:s is:CS 561, Sessions 10-1138Tautologies• Logical expressions that are always true. Can be simplified out.Examples:TT V AA V (¬A)¬(A ^ (¬A))A ó A((P V Q) ó P) V (¬P ^ Q)(P ó Q) => (P => Q)CS 561, Sessions 10-1139Validity and satisfiabilityTheoremCS 561, Sessions 10-1140Proof methodsCS 561, Sessions 10-1141Inference RulesCS 561, Sessions 10-1142Inference RulesCS 561, Sessions


View Full Document

USC CSCI 561 - session10-11

Download session10-11
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view session10-11 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view session10-11 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?