Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


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

1 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.

2 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.

3 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.

4 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.

5 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 (http://jade.cselt.it). 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.http://jade.cselt.it 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.

6 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.

7 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.

8 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.

9 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.

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

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

12 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.

13 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.

14 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, 2001. 2.Russel, Stuart, and Peter Norvig. Artificial Intelligence: A Modern Approach. Prentice Hall, 1995.


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

Similar presentations


Ads by Google