Concurrent Programming for DAI - PowerPoint PPT Presentation

About This Presentation
Title:

Concurrent Programming for DAI

Description:

Divide and Conquer. Concurrent elaboration of different sub problems and joining the solutions. ... main concurrent programming paradigms is: Divide and conquer. ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 74
Provided by: oferha
Category:

less

Transcript and Presenter's Notes

Title: Concurrent Programming for DAI


1
Concurrent Programming for DAI
  • Gul A. Agha Needem Jamali

2
Concurrent Programming
  • Concurrent programming introduces many
    challenges
  • A key challenge is the difficulty of programming
    parallel and distributed architectures
  • Some models are very low-level (shared variables
    model).
  • One approach would be to use concurrent objects
    in a reflective architecture.
  • Using agent programming is such an architecture.

3
Patterns of Concurrent Problem Solving.
  • Three common Patterns
  • Pipelined Concurrency
  • Enumeration of potential solutions and the
    concurrent testing of these solutions.
  • Divide and Conquer
  • Concurrent elaboration of different sub problems
    and joining the solutions.
  • No interaction between the procedures.
  • Cooperative problem solving.
  • Processes dynamically interact in order to solve
    the problem.

4
Agent Programming Paradigms
  • A few agent programming languages
  • Agent Oriented Programming (AOP).
  • Concurrent MetateM.
  • Telescript.
  • Actors.
  • I will present all four, with a focus on Actors.

5
Agent Programming Paradigms
  • A few agent programming languages
  • Agent Oriented Programming (AOP).
  • Introduction to Multiagent Systems (Wooldridge).
  • An Overview of Agent Oriented Programming
    (Shoham).
  • Concurrent MetateM.
  • Telescript.
  • Actors.

6
Agent Oriented Programming (AOP)
  • Due to Yoav Shoham (Stanford).
  • Based on cognitive and societal view of
    computation.
  • An agent is an entity that functions continuously
    and autonomously in an environment in which other
    agents exist.
  • An agents state is viewed as consisting of
    mental components such as beliefs, capabilities,
    choices, commitments and desires.
  • Agenthood is in the mind of the programmer.
  • What makes a system - an agent, is the fact that
    one has chosen to analyze and control it in these
    mental terms.

7
Agent Oriented Programming AGENT0
  • Shoham has developed a basic programming
    language to support AOP AGENT0.
  • An agent is specified in terms of four sets
  • Capabilities (Things the agent can do).
  • Initial beliefs (Things the agent
    knows/believes).
  • Initial Commitments.
  • Commitment rules.

8
Agent Oriented Programming AGENT0 - 2
  • The component which determines how the agent acts
    is the commitment-rules set.
  • A commitment rule consists of three components
  • A message condition.
  • A mental condition.
  • An action.
  • The rule fires if the agent received a message
    that matches the message condition, and the
    agents beliefs match the mental condition.
  • The agent than becomes committed to the action.

9
Agent Oriented Programming AGENT0 - 3
  • An action may be private (sends no message), or
    communicative(sends messages).
  • Messages are constrained to three type
  • Request.
  • Unrequest.
  • Inform.

10
Agent Oriented Programming AGENT0 Example
  • A commitment rule example
  • COMMIT(
  • ( agent, REQUEST, DO(time, action)
  • ), msg condition
  • ( B,
  • now, Friend agent AND
  • CAN(self, action) AND
  • NOT time, CMT(self, anyaction)
  • ), mental condition
  • self,
  • DO(time, action) )

11
Agent Oriented Programming AGENT0 Main Loop
  1. Read all current messages, update beliefs, and
    hence commitments when necessary.
  2. Execute all commitments for the current cycle
    where the capability condition of the associated
    action is satisfied.
  3. Goto (1).

12
AOP - Properties of the Agents Components
  • The programmer may assume several properties of
    the agents components
  • Internal consistency.
  • Good faith.
  • Introspection.
  • Persistence of mental state.

13
Agent Programming Paradigms
  • A few agent programming languages
  • Agent Oriented Programming (AOP).
  • Concurrent MetateM.
  • Introduction to Multiagent Systems (Wooldridge).
  • Telescript.
  • Actors.

14
Concurrent MetateM
  • Due to Michael Fisher.
  • Based on the direct execution of logical
    formulae.
  • An agent is programmed by giving it a temporal
    logic specification of the behavior it should
    exhibit.

15
Concurrent MetateM - Execution
  • Agents execution
  • Iteratively build a logical model for the
    temporal agents specification.
  • It is possible to prove that the procedure used
    to execute an agent specification is correct.
  • If it is possible to satisfy the specification,
    then the agent will do so.

16
Concurrent MetateM Agent Structure
  • Communication through broadcast message passing.
  • An agent has two main components
  • An interface
  • Computational engine

17
Concurrent MetateM Agent Structure - Interface
  • The interface consists of three components
  • Unique Agent ID.
  • Environment propositions.
  • Component propositions.
  • Example Stack(pop, push)popped, full.

Agent ID
Component propositions
Environment propositions
18
Concurrent MetateM Agent Structure - Engine
  • An agent specification is given as a set of
    program rules, which are temporal logic of the
    formulae of the form
  • antecedent about the past
  • ? consequent about present and future.
  • The name of the paradigm Declarative past and
    imperative future.

19
Concurrent MetateM Syntax
  • PML Propositional MetateM Logic.

20
Concurrent MetateM Syntax Example
Write a Comment
User Comments (0)
About PowerShow.com