golog david mui eel6938 l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
GOLOG David Mui EEL6938 PowerPoint Presentation
Download Presentation
GOLOG David Mui EEL6938

Loading in 2 Seconds...

play fullscreen
1 / 40

GOLOG David Mui EEL6938 - PowerPoint PPT Presentation


  • 246 Views
  • Uploaded on

GOLOG David Mui EEL6938 . Outline. Introduction Situational Calculus GOLOG Personal Banking Assistant Using GOLOG ConGOLOG – GOLOG variant Conclusion. Introduction. Computers System Embedded in complex environments

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'GOLOG David Mui EEL6938' - elina


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
golog david mui eel6938
GOLOG

David Mui

EEL6938

outline
Outline
  • Introduction
  • Situational Calculus
  • GOLOG
  • Personal Banking Assistant Using GOLOG
  • ConGOLOG – GOLOG variant
  • Conclusion
introduction
Introduction
  • Computers System
    • Embedded in complex environments
    • Software for such systems does not maintain explicit model of the world
      • Users and designers of the system have a general mental model of the environment
  • Designers/Programmers
    • Problematic because they need to reconstruct the model
    • Difficult to extend because of high level abstraction
  • Solution: GOLOG
golog
GOLOG
  • What is GOLOG?
    • Logic Programming Language for Dynamic Domains
    • Maintains explicit model of environment domain
    • Can be queried, reasoned at runtime
    • Based on theory of actions and preconditions
  • An Extension of situational calculus
    • First,Second order logic
  • Applications of GOLOG?
    • Robotics
    • Artificial Intelligence
    • Mechanical Devices
    • Modeling and Simulation
situational calculus
Situational Calculus
  • Logic Formalism designed for representing dynamic domains
    • First Order/Second Order logic formulae
    • Actions performed in the world
    • Fluent describe the world state
      • Can be thought of as properties of the world
    • Situations
      • Finite sequence of actions
  • Changes to the environment result in Actions.
  • Actions can be parametrized
  • Sequence of actions is described as a situation
  • S0 defined as initial situation constant (no action or situation)
situational calculus cont
Situational Calculus Cont.
  • Binary function do:
    • do(a,s), denotes successor situation based on “a” (action) on “s” (situation), (i.e. the new situation)
  • Example:
    • pickup(A ,S0)
    • do(putdown(A) ,do(walk(L), do(pickup(A) ,S0)))
situational calculus cont7
Situational Calculus Cont.
  • Properties of the environment or world can be seen as fluents
  • Relational Fluents
    • Truth values that may change
      • is_carrying(robot, item, s)
  • Functional Fluents
    • Functions that take the situation as their final argument
    • Returns a situation dependent value
      • loc(robot, s)
creating axioms from actions
Creating Axioms from Actions
  • Actions and effects of the actions are axiomatized
  • Actions have preconditions.
  • World Dynamics are specified by effect axioms
frame problem
Frame Problem
  • To define a dynamic world it requires more than just action preconditions and effect axioms
  • Frame Axioms
    • Defines action invariants of the domain
    • Could be a vast number of frame axiom in a domain
    • Fluents unaffected by the action
  • Example:
    • If robot picks up an object location does not change.
solution to the frame problem
Solution to the Frame Problem
  • Generate Successor state Axiom
    • Collect all effect axioms from fluent and make a completeness assumption
    • Assume it specifies all possibilities the fluent may change
    • Transform effect axioms to generate successor state axiom of given fluent
situational calculus cont11
Situational Calculus, Cont.
  • A domain is defined by the following theory:
    • Axioms defining the world in different situations
    • Action preconditions
    • Successor state axioms
    • Foundational axioms
complex actions in golog
Complex Actions in GOLOG
  • Situational Calculus methods described in previous slides can not handle complex actions and reasoning
    • Procedures
    • Loops
    • Nondeterministic actions
  • Need to define complex actions with additional symbols
complex actions cont
Complex Actions, cont.
  • Define Complex Actions using extralogical symbols (e.g., while, if, etc.)
  • Extralogical expressions are macros that expand into formulas
  • Do(δ, s, s`) is the basic abbreviation in the GOLOG language, where δ is a complex action expression, for complex operations
  • Do(δ, s, s`) means that executing δ (complex action) in situation “s” has s` as a terminating situation
complex actions cont14
Complex Actions, cont.

Complex Actions, cont.

Complex Actions, cont.

Complex Actions, cont.

1.Primitive Actions

2. Test Actions

3. Sequence

complex actions cont15
Complex Actions, cont.

4. Nondeterministic choice of two actions

5. Nondeterministic choice of two arguments

6. Nondeterministic Iterations

complex actions cont16
Complex Actions, cont.
  • Conditional and loops definition in GOLOG
  • Procedures difficult to define in GOLOG
    • No easy way of macro expansion on recursive procedure calls to itself
complex actions cont17
Complex Actions, cont.
  • Create auxiliary macro definition: For any predicate symbol P of arity n+2 taking a pair of situation arguments
  • Define a semantic for procedures utilizing recursive calls
golog in a nutshell
GOLOG in a Nutshell
  • GOLOG programs are executed uses a theorem prover
  • User supplies, axioms, successor state axioms, initial situation condition of domain, and GOLOG program describing agent behaviour
  • Execution of program gives:
example golog
Example GOLOG
  • Elevator Controller Example
  • Primitive Actions
    • Up(n): move the elevator to a floor n
    • Down(n): move the elevator down to a floor n
    • Turnoff: turn off call button n
    • Open: open elevator door
    • Close: close the elevator door
  • Fluents
    • CurrentFloor(s) = n, in situation s, the elevator is at floor n
    • On(n,s), in situation s call button n is on
    • NextFloor(n,s) = in situation s the next floor (n)
example cont
Example, cont.
  • Primitive Action Preconditions
  • Successor State Axiom
example cont21
Example, cont.
  • One of the possible fluents
  • Elevator GOLOG Procedures
example cont22
Example, cont.
  • Theorem proving task
  • Successful Execution of GOLOG program
  • Returns the following to elevator hardware control system
personal banking assistant using golog
Personal Banking Assistant Using GOLOG
  • Personal Banking Assistant (PBA)
    • Assists users in personal banking over computer networks
    • Perform transactions based on certain actions, preconditions, and situations
    • Collection of GOLOG agents that interact
    • Over 2000 lines of GOLOG Code
    • Currently implemented in simulated financial environment
system components
System Components
  • Personal Banking Assistant Agents
    • User interface, performs actions directed by user, and monitors for certain situations
  • Bank Agents
    • Perform backend bank operations on accounts
  • Transfer Facilitator Agents
    • Conducts fund transfers between different bank institutions
  • Router Agents
    • Performs network operations/maintenance
  • Automated Teller Agents
    • Provides ATM interface to bank agents
pba fluents
PBA Fluents
  • Fluents used by the PBA to model the world:
    • USERACCOUNT(type, bank, account, balance, lastUpdate, rateOfReturn, moveFunds, minBalance, penalty, refreshRate, s)
    • Monitor(type, bank, account, limit, lowerOrHigher, priority, response, monID, s)
    • ALERT(alertMessage, maxPriority, monID, s)
    • ALERTACKNOLWEDGED(monID,s)
    • WAITINGUPDATE(bank, account, s)
pba primitive actions
PBA Primitive Actions
  • SENDMESSAGE(method, recipient, message)
  • STARTWAITINGUPDT(bank, account)
  • STOPWAITINGUPDT(bank,account)
  • CREATEALERT(message, maxPriority, monID)
  • SENDALERT(priority, message, medium, monID)
pba cont
PBA, cont.
  • ControlPBA
    • Requests balance updates for accounts
    • Process messages
    • Send out alert messages to users
pba cont29
PBA, cont.
  • RefreshMonitoredAccts
    • Request balance updates for accounts
    • Process new messages
    • Send out new messages to users
pba cont30
PBA, cont.
  • HandleCommunications Procedure
    • Main message handling loop
    • Reads message from port and dispatches to appropriate action
  • GenerateAlerts Procedure
    • Directs agent to monitor triggers defined by user
    • Alerts the user
pba results
PBA Results
  • Pros:
    • GOLOG capable of building useful applications
    • Provides structure for the programmer
      • Preconditions, successor state axioms
    • Encourages a layered design
  • Cons:
    • Certain operations are tricky to accomplish
      • Performing arithmetic
      • Assigning a value to a variable
    • Limited debugging tools
    • Lack of standard libraries
    • Lack of event driven reactive behaviors
congolog33
ConGOLOG
  • Extended version of GOLOG that incorporates concurrency
    • Concurrent processes with different priorities
    • High level interrupts
    • Arbitrary actions
  • ConGolog differs from other formal models of concurrency
    • Allows incomplete information about the environment
    • Allows primitive actions to affect the environment in a complex way and such changes to the environment can affect the execution of the remainder of the program
new semantic for concurrency
New Semantic for Concurrency
  • ConGOLOG adopts a transition semantic
  • Trans Predicate
    • Defines a transition relation between two processes
  • Final Predicate
    • Final process
    • Determines when process is completed
trans axioms
Trans Axioms

1. Empty Program

2. Primitive Action

3. Wait/Test Actions

new concurrency constructs
New Concurrency Constructs
  • Constructs to handle concurrent programming in ConGOLOG
other golog variants
Other GOLOG Variants
  • CcGOLOG
    • Incorporates continous change and event driven behavior
  • GOLEX
    • Execution and monitoring system, distributed control software
    • Autonomous mobile robots, sensing and interaction
  • IndiGOLOG
    • Incremental Interpreter for high level programs involving nondeterminisim and sensing actions
conclusion
Conclusion
  • Logic programming for dynamic domains such as robotics, intelligent software agents, and modeling and simulations
  • GOLOG is based on situational calculus, utilizing first/second order logic and formal theory of actions
  • Variants (ccGOLOG, ConGOLOG…etc.)
    • To solve weakness such as concurrency, event driven, sensing
references
References
  • Hector J. Levesque, Raymond Reiter, Yves Lesperance, Fngzhen Lin, and Richard B. Scherl. GOLOG: A logic programming language for dynamic domains. To appear in the Journal of Logic Programming, special issue on Reasoning about Action and Change, 1996.
  • Yves Lesperance, Hector J. Levesque, and Shane J. Ruman. An Experiment in Using GOLOG to Build a Personal Banking Assistant. To Appear in Intelligent Agent Systems: Theoretical and Practical Issues, 1997.
references cont
References, cont.
  • Giuseppe De Giacomo, Yves Lespérance, and Hector Levesque. ConGolog, a concurrent programming language based on the situation calculus. Artificial Intelligence, 121(1-2):109-169, 2000.
  • Yves Lespérance, Todd G. Kelly, John Mylopoulos, and Eric S.K. Yu. Modeling dynamic domains with ConGolog. In Proceedings of CAiSE-99, Heidelberg, Germany, June 1999.