Abstract An intelligent agent operating in a complex world cannot base its decisions solely on the world's objective and preprogrammed rules. Rather, the.

Slides:



Advertisements
Similar presentations
Modelling with expert systems. Expert systems Modelling with expert systems Coaching modelling with expert systems Advantages and limitations of modelling.
Advertisements

Russell and Norvig Chapter 7
FIPA Interaction Protocol. Request Interaction Protocol Summary –Request Interaction Protocol allows one agent to request another to perform some action.
First-Order Logic: Better choice for Wumpus World Propositional logic represents facts First-order logic gives us Objects Relations: how objects relate.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Knowledge Fusion Research WorkshopOctober A High-level Language for Military Fusion Problems Richard Scherl Computer Science Department.
ISBN Chapter 3 Describing Syntax and Semantics.
3/30/00 Agents that Reason Logically by Chris Horn Jiansui Yang Xiaojing Wu.
Artificial Intelligence Knowledge-based Agents Russell and Norvig, Ch. 6, 7.
Knowledge Representation & Reasoning.  Introduction How can we formalize our knowledge about the world so that:  We can reason about it?  We can do.
Class Project Due at end of finals week Essentially anything you want, so long as its AI related and I approve Any programming language you want In pairs.
1 Problem Solving CS 331 Dr M M Awais Representational Methods Formal Methods Propositional Logic Predicate Logic.
CS 460, Sessions Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Computing & Information Sciences Kansas State University Lecture 11 of 42 CIS 530 / 730 Artificial Intelligence Lecture 11 of 42 William H. Hsu Department.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Knowledge in intelligent systems So far, we’ve used relatively specialized, naïve agents. How can we build agents that incorporate knowledge and a memory?
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 8 Jim Martin.
LOGICAL AGENTS Yılmaz KILIÇASLAN. Definitions Logical agents are those that can:  form representations of the world,  use a process of inference to.
Managing Agent Platforms with the Simple Network Management Protocol Brian Remick Thesis Defense June 26, 2015.
Logical Agents Chapter 7 Feb 26, Knowledge and Reasoning Knowledge of action outcome enables problem solving –a reflex agent can only find way from.
Describing Syntax and Semantics
Agents that Reason Logically Logical agents have knowledge base, from which they draw conclusions TELL: provide new facts to agent ASK: decide on appropriate.
2APL A Practical Agent Programming Language March 6, 2007 Cathy Yen.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Logical Agents Chapter 7 (based on slides from Stuart Russell and Hwee Tou Ng)
Ontologies Reasoning Components Agents Simulations Belief Update, Planning and the Fluent Calculus Jacques Robin.
Artificial Intelligence Lecture No. 9 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter (this lecture, Part I) Chapter 7.5.
‘In which we introduce a logic that is sufficent for building knowledge- based agents!’
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part A Knowledge Representation and Reasoning.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Class Project Due at end of finals week Essentially anything you want, so long as its AI related and I approve Any programming language you want In pairs.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 17, 2012.
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
1 Logical Agents Chapter 7. 2 A simple knowledge-based agent The agent must be able to: –Represent states, actions, etc. –Incorporate new percepts –Update.
MEMBERSHIP AND IDENTITY Active server pages (ASP.NET) 1 Chapter-4.
For Friday Read chapter 8 Homework: –Chapter 7, exercise 1.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Knowledge-based agents: they keep track of the world by means of an internal state which is constantly updated by the agent itself A Knowledge-Based Agent.
Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 10 of 42 Wednesday, 13 September.
1 UNIT-3 KNOWLEDGE REPRESENTATION. 2 Agents that reason logically(Logical agents) A Knowledge based Agent The Wumpus world environment Representation,
Some Thoughts to Consider 5 Take a look at some of the sophisticated toys being offered in stores, in catalogs, or in Sunday newspaper ads. Which ones.
Logical Agents Chapter 7 Part I. 2 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic.
Securing Access to Data Using IPsec Josh Jones Cosc352.
1 Knowledge Representation Logic and Inference Propositional Logic Vumpus World Knowledge Representation Logic and Inference Propositional Logic Vumpus.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents. Inference : Example 1 How many variables? 3 variables A,B,C How many models? 2 3 = 8 models.
LOGICAL AGENTS CHAPTER 7 AIMA 3. OUTLINE  Knowledge-based agents  Wumpus world  Logic in general - models and entailment  Propositional (Boolean)
Information Systems Development
Hierarchical and K-means Clustering
Knowledge and reasoning – second part
Introduction to Networking
EA C461 – Artificial Intelligence Logical Agent
Learning and Knowledge Acquisition
Logical Agents Chapter 7.
Artificial Intelligence
Class #9– Thursday, September 29
Knowledge and reasoning – second part
Logical Agents Chapter 7.
CS 416 Artificial Intelligence
Artificial Intelligence Lecture 10: Logical Agents
Knowledge Representation I (Propositional Logic)
CMSC 471 Fall 2011 Class #10 Tuesday, October 4 Knowledge-Based Agents
Logical Agents Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

Abstract An intelligent agent operating in a complex world cannot base its decisions solely on the world's objective and preprogrammed rules. Rather, the agent may need to gather information in order to determine its next action. Programming such an agent must be knowledge-based in the sense that the agent must be capable of gathering required information, integrating that information into its knowledge-base, and acting upon both new and prior knowledge. GOLOG is a high-level rule-based programming language that allows knowledge-based programming. A testbed for developing and running GOLOG programs has been developed. This testbed allows GOLOG programs, representing agents, to communicate with external programs representing the outside world. This approach is illustrated with several examples of communication between GOLOG agents and GUI-driven Java programs.

Introduction In addition to the standard cases of true and false, a knowledge-based agent must consider a third case: There is not enough information to answer the query. Such an agent not only needs to know information, but needs to know whether it knows the information. In general, knowledge-based agents will not have complete information about the world. Even in a restricted domain, a truly knowledge-based system will not be fed information regarding a domain; formalism is used to distinguish between the two. The information must trickle in via sensing actions, then must be integrated into the agent’s knowledge base to allow for reasoning based on the new information. Knowledge-based programming attempts to codify logical constructs such as knows and Kweather, as well as sensing axioms, into a programming language. Knowledge- based agents must communicate with the outside world in order to build their knowledge bases, either through user input or by communicating with other agents. The situation calculus, a predicate calculus formalization of states, actions, and effects developed by McCarthy and Hayes in 1969, is an ideal system of logic to implement knowledge-based programming.

A testbed for abstraction Knowledge-based programming demands a unique type of abstraction: For an agent to be truly knowledge-based, it must be cut off from the world, given only a restricted set of fluents that it can sense and change. We have designed a network-transparent system (that is, a system in which it makes no difference whether an agent is local or remote) in which an omniscient graphical interface, written in Java, is presented to the user. A knowledge-based agent, written in GoLog, communicates with the world using a predefined network protocol and a restricted set of interfaces. Whenever the GoLog agent senses, a message representing the sensing action is sent to the Java program, which sends back the sensing result. Ultimately, this result is integrated into the GoLog agent’s knowledge-base, allowing inferences to be drawn based on the new data. If the GoLog agent performs an action that will change the state of the world, the action is sent to the Java program, which checks the validity of the action that the agent is performing and responds with an affirmative or negative confirmation. If the action succeeds, the information displayed to the user will be updated.

GoLog GoLog, an acronym for “ALGOL in Logic”, is a high-level logic-based programming language that implements the situation calculus. It has predefined constructs for the implementation of logical axioms, such as successor-state and sensing axioms, that are found in the situation calculus. There are many implementations of GoLog, typically built upon the Prolog rule-based programming language. Among the most popular of these implementations are Incremental-Deterministic GoLog (IndiGoLog), a very mature implementation that allows concurrency and deterministic reasoning, and an implementation of GoLog with extensive knowledge-based reasoning capabilities defined by Raymond Reiter (henceforth referred to as KGoLog). Some important GoLog constructs are: poss(action) :- condition – Defines a precondition for a given action. prim_fluent(fluent) – Defines a new fluent. prim_action(action) – Defines a primitive action. senses(action, fluent) – Defines action as a sensing action that will modify fluent. proc(body) – Defines a complex procedure. causes_val(axiom, fluent, newval) – Defines a successor-state axiom that modifies fluent. initially(fluent, value) :- condition – Sets a fluent to an initial value, binding it to a condition, in s0. pi([var, domain]) – Iterates a variable over all values in a domain, checking a condition.

Communications With the GoLog foundation in place, we required a method to link Java and GoLog together. Additionally, we wanted to ensure network-transparency between the Java agents themselves. This allowed us to construct a platform in which the Java server representing the world runs on one machine and displays the results to a user on another. For this, we used the freely-available JADE (Java Agent DEvelopment Framework) library ( JADE allows our Java agents to communicate, via ACL messages, with other Java agents, such as the agent that displays the GUI to the user, whether they are local or remote. Additionally, JADE provides a directory facilitator service, allowing agents to find other agents that perform a certain service. For GoLog-to-Java communication, we developed a Prolog socket library and created a JADE cyclic behavior that listens on a Java ServerSocket. We defined a simple text- based protocol that allows GoLog to query Java with a sensing or primitive action, receiving “y” or “n” as an answer. This system provided us with the network transparency that we required.

Examples: Hunt the Wumpus One problem that would benefit from a knowledge-based approach is finding a solution to the “Hunt the Wumpus” game created in the 1970s. This problem is presented in Russel and Norvig’s Artificial Intelligence: A Modern Approach. The agent begins in the lower left corner of a rectangular board bounded by walls. It begins knowing nothing about its surroundings. However, the agent can learn through sensing as it moves. Strewn throughout the cave are bottomless pits, the dreaded wumpus, which instantly eats the agent if it enters the same square as the wumpus, and a hunk of gold. The agent has one arrow with which it may shoot the wumpus. If the arrow hits, it will kill the wumpus. The objective is to find the gold without falling into a pit or being eaten by the wumpus. There are various clues that the agent can use via sensing in order to solve this problem: If the agent senses a breeze, there is a pit adjacent to it. If the agent senses stench, the wumpus is in an adjacent square. If the agent sees a glitter, there is gold on the square that the agent is in. If the agent moves into a wall, it perceives a bump. Finally, if the wumpus is killed, it emits a scream that is heard throughout the entire cave.

The Wumpus Board The Wumpus GUI running in Windows XP. As our agents are designed in Java and Prolog, they are fairly platform-independent. This is the initial state of the board. Squares darken each time the agent visits them.

The Agent in Action The agent and GUI running on two separate Linux machines. One window is being X forwarded. Neither agent cares. The agent is about to pick up the gold.

The Blocks Example Raymond Reiter gives an example of a problem that can benefit from a knowledge- based approach in his book, Knowledge in Action. He defines a world in which blocks are placed on a table. Some blocks begin stacked on top of others. The goal is for the agent to move all of the blocks onto the table, such that there are none stacked on top of others. The agent may only move blocks that it knows are clear. The agent begins by sensing everything about its world. However, as it realizes that certain blocks are clear or on the table, it begins inferring whether others are clear or not. This is an example of an agent that can sense its surroundings, gather and integrate knowledge into its knowledge-base, and use both new and old knowledge to reason about its surroundings.

The Blocks Example The blocks agent running on Mac OS X. Pick a platform, any platform.

The Blocks Example Moving all of the blocks to the table. The two agents are on the same Linux machine.

Rapid Response System: Preventing Agricultural Bioterror We have been commissioned by the Department of Homeland Security to create a system that will, when alerted to contamination of livestock in a region (specifically, contamination due to bioterrorism), consult a knowledge-base containing shipping information and alert the governors of all states that may have potentially been contaminated. This is another example of a problem that can benefit from a knowledge-based solution, as shipping information can change or contamination results can prove inconclusive. The agent sends a sensing query to the agent containing shipping information, which returns a list of states that the requested state ships to. The agent then infers from the data that it has collected which states one state may be shipping to and automatically alerts the governors of those states to the possibility of contamination.

Rapid Response System: Preventing Agricultural Bioterror The state before running the agents. One of these is running on rockhopper.monmouth.edu The other is on my laptop, outside of the university. The exception is a known issue with JADE on rockhopper. It is internal to JADE and does not impact our agent.

Conclusion By encapsulating facts about the world in one agent and creating a protocol allowing the other agent to sense and modify the world in limited ways, we have created a robust, fully network-transparent, and platform-independent system for developing knowledge-based agents using Java and GoLog. We have demonstrated the use of GoLog as a powerful tool for implementing propositional, first-order, and situation calculus logic using this platform. Additionally, we have proven the usefulness and effectiveness of this platform and approach using several real-world problems, ranging from the simple blocks example to the more complex wumpus and anti-bioterror examples. References: 1.Reiter, Raymond. Knowledge in Action: Logical Foundations for Specifying and Implementing Dynamical Systems. Cambridge, MA: MIT Press, Russel, Stuart, and Peter Norvig. Artificial Intelligence: A Modern Approach. Prentice Hall, 1995.