Taems%20/%20MASS%20Technical%20Overview - PowerPoint PPT Presentation

About This Presentation
Title:

Taems%20/%20MASS%20Technical%20Overview

Description:

Taems / MASS Technical Overview Bryan Horling University of Massachusetts bhorling_at_cs.umass.edu R gis Vincent SRI vincent_at_ai.sri.com Overview Taems - a language for ... – PowerPoint PPT presentation

Number of Views:141
Avg rating:3.0/5.0
Slides: 29
Provided by: 8087
Learn more at: http://mas.cs.umass.edu
Category:

less

Transcript and Presenter's Notes

Title: Taems%20/%20MASS%20Technical%20Overview


1
Taems / MASS Technical Overview
  • Bryan Horling
  • University of Massachusetts
  • bhorling_at_cs.umass.edu

Régis Vincent SRI vincent_at_ai.sri.com
2
Overview
  • Taems - a language for modeling the quantitative
    behavior of tasks and task interactions
  • MASS - a simulation environment that uses Taems
    as the basis of agent activity

3
Source and Licensing
  • Java implementations of Taems and MASS are
    available
  • Java 1.3
  • Source is included
  • Apache 2.0 License
  • http//mas.cs.umass.edu/download.html
  • (Forthcoming from GITI as well)

4
Documentation
  • Implementation
  • JavaDoc APIs available online
  • Topic-specific HOWTOs online
  • Sample code in JAF distribution
  • These slides
  • Concepts
  • Taems white paper
  • Various publications (see Taems and MASS
    webpages)
  • http//mas.cs.umass.edu/

5
High-Level Overview
Agent
Agent
Agent
New Taems Structure Action Started Communication
Action Completed Communication
MASS
Manages Time Simulates Method Execution Enforces
Taems Semantics Reports Activity Results
6
Taems at a glance
  • Task groups represent goals
  • Tasks represent a sub-goal
  • Methods are executable primitives
  • Resources model resource state
  • Interrelationships model interactions between
    nodes
  • QAFs specify how quality is accrued from sub-tasks

7
Inside a Taems Structure
  • Directed graph, made up of nodes
  • Each node has a set of defined properties
  • Methods have outcomes
  • Interrelationships define effect, etc.
  • These fields are explained in the white paper

method name Vacuum-Floor agent Me supertasks
Clean-Floor quality_distribution 5.0 1.0
duration_distribution 10.0 1.0 cost_distribution
0.0 1.0
facilitates name Facilitates_1 from
Vacuum-Floor to Wash-Floor quality_power 0.3
1.0 duration_power 0.2 1.0 cost_power 0.0 1.0
nodes
8
Constructing Taems Structures
  • Textual Taems (ttaems)

(spec_agent (label Me) ) (spec_task_group
(label Clean-Kitchen) (agent Me) (subtasks
Clean-Floor Wash-Counters Put-Away-Dishes)
(qaf q_sum) ) (spec_task (label Clean-Floor)
(agent Me) (subtasks Vacuum-Floor
Wash-Floor) (supertasks Clean-Kitchen) (qaf
q_max) ) (spec_task (label Put-Away-Dishes)
(agent Me) (subtasks Slow-And-Safe
Quick-And-Dirty) (supertasks Clean-Kitchen)
(qaf q_exactly_one) )
(spec_method (label Vacuum-Floor) (agent
Me) (supertasks Clean-Floor) (outcomes
(Outcome_1 (density 1.0)
(quality_distribution 5.0 1.0)
(duration_distribution 10 1.0)
(cost_distribution 0 1.0) )
) ) (spec_method (label Wash-Floor) (agent
Me) (supertasks Clean-Floor) (outcomes
(Outcome_1 (density 1.0)
(quality_distribution 7.0 1.0)
(duration_distribution 15 1.0)
(cost_distribution 0 1.0) )
9
Constructing Taems Structures
  • Visual Editor - taemsview

10
Pre-Taems
  • Preprocessed Taems (ptaems)
  • Taems template language
  • Parameterizable, dynamically generate many
    structures from one specification
  • Conceptually similar to C preprocessor directives
  • Variables (define)
  • Control structures (e.g., if, while)
  • Functions (e.g., sum, prod, random_float)

foo.ptaems
foo.ttaems
foo
parameters
preprocess
parse
11
Reading Taems
  • Taems library includes a parser
  • ReadTTaems reader new ReadTTaems(null)
  • Taems task reader. readTTaems(stream)
  • pTaems
  • PreProcessorParser parser new
    PreProcessorParser(stream)
  • PreProcessor preprocessor parser.Input()
  • Hashtable parameters new Hashtable()
  • String processed preprocessor.toTTaems(parameter
    s)
  • Taems task readTTaems(new StringReader(processed
    ))
  • Parsers are created by JavaCC, source is included

12
Writing Taems
  • Taems object may be converted to its textual
    representation
  • For communication, storage, etc.
  • String text task.toString()
  • String text task.toTTaems(Taems.V1_0)
  • Individual nodes may be stringified similarly
  • Taems object is also serializable

13
Visualizing Taems
  • Taems object is a JPanel
  • Simply add it to a frame to visualize
  • JFrame frame new JFrame("Taems Task
    Structure")
  • frame.getContentPane().add(task,
    BorderLayout.CENTER)
  • frame.setVisible(true)
  • Display is updated as changes are made
  • Can also edit using this interface (danger!)

14
Accessing Nodes
  • Node is the base class for most Taems structures
    (tasks, methods, IRs, resources, etc.)
  • The Taems object itself is a container for Node
    objects (among other things)
  • for (Enumeration e task.getNodes()
    e.hasMoreElements() )
  • Node node (Node)e.nextElement()
  • if (node instanceof Task ((Task)node).isTaskG
    roup()) n
  • // end countTaskGroups
  • Graph structure exists in the relationships each
    Node possesses, e.g.,
  • Task.getSubtasks()
  • TaskBase.getSupertasks()
  • Interrelationship.getFrom() getTo()

15
Modifying Nodes
  • All of the structures characteristics can be
    modified using accessors
  • Task.setQAF()
  • Method.addOutcome()
  • Interrelationship.setEndpoints()
  • Resource.setState()
  • Node.setAgent()
  • Interrelationship.setActive()
  • ConsumesInterrelationship.setConsumes()
  • etc
  • These can be used to read and change structural
    properties

16
Analyzing Taems
  • Finding classes of nodes
  • Enumeration e t.findNodes(new Resource())
  • while (e.hasMoreElements())
  • Resource r (Resource)e.nextElement()
  • // end resourceWalker
  • Enumeration e t.findNodes(new Node(Foobar))
  • while (e.hasMoreElements())
  • Node r (Node)e.nextElement()
  • // end foobarFinder
  • Automatic state propagation
  • (e.g., cost, quality, duration)
  • method.setCurrentQuality()
  • taskgroup.getCurrentQuality()

17
Things not covered here
  • Schedule, ScheduleElement
  • For storing activity schedules
  • Commitments
  • Represent results of coordination
  • Attributes
  • For tagging nodes with arbitrary data
  • Nonlocal methods
  • Actions that one cannot perform locally
  • Merging Taems structures
  • See Taems.unionTaems

18
MASS
  • Interface/GUI
  • Demo
  • Time/pulse driven
  • Pulse cycle
  • Scripting

19
MASS GUI
20
Features
  • Resources modeling
  • Scripting capabilities
  • Separate actual and perceived states
  • what the participants believe may not be true
  • Time and Event based
  • Logging
  • Deterministic
  • to allow for the re-testing of modified components

21
Clock
  • Centralized (at simulation controller)
  • Discrete, pulse-based
  • During each cycle
  • a pulse is sent to each attached client
  • each client converts the pulse to actual CPU time
  • upon completion, each client responds to the
    simulator
  • when all responses have been received, simulation
    continues

start
finished
22
Event Queue
  • Event based system
  • simulated execution
  • message transfer
  • environmental
  • Events have both a start and duration time
  • During each cycle
  • the list of extant events is retrieved for that
    time slot
  • each event is given a time slice to run in

events
1
2
3
4
1
2
time
3
4
5
23
Scripting
  • Highly customizable scripting language
  • Format
  • Script, ScriptClassName, ScriptSpecificName,
    Data
  • Assertion, Assertion1ClassName, Data
  • Assertion, Assertion3ClassName, Data
  • Reaction, Reaction1ClassName, Data
  • Reaction, Reaction2ClassName, Data
  • Over 50 pre-defined scripts
  • Assertion, AgentConnected, AgentWaterHeater
  • Assertion, ResourceLevelCompare,
    Resource1Kitchen_Temp, Opgt, Resource2LivingRoom
    _Temp
  • Reaction, SendMessage, AgentWaterHeater,
    Perfask, CWdisconnect, ControlTrue
  • Reaction, SendCommitment, Labeltests,
    Importance30, MinQuality60, EarliestStartTime10
    , Deadline20, TimeSatisfied450, ToAgent
  • Example
  • Script, AndScript, Agent Disconnect Status,
  • Assertion, NumAgentConnected, Oplt, Value5
  • Assertion, Time, Opgt, Value10
  • Reaction, Write, LineStopping Simulation!

24
MASS Agents
  • GITI/Grid Agent
  • CoABS grid agent
  • Interfaces to MASS
  • Available shortly
  • JAF (Java Agent Framework)
  • Component-based agent framework
  • Uses Taems
  • Available at http//mas.cs.umass.edu

25
BACKUP
26
MASS Interface
  • Hand-shake
  • A-gtS (register sender ExampleAgent type
    control content receiver simulator language
    KQML)
  • S-gtA (tell sender simulator type control
    content (Name ExampleAgent ) receiver
    ExampleAgent language KQML)
  • Init
  • S-gtA (tell sender simulator type control
    content (RandomSeed 889210829049 ) receiver
    ExampleAgent language KQML)
  • S-gtA (tell sender simulator type control
    content (Time 0 ) receiver ExampleAgent
    language KQML)
  • Pulsing
  • S-gtA (tell sender simulator content (pulse)
    type control reply-with (pulse) receiver
    ExampleAgent language KQML)
  • A-gtS (reply sender ExampleAgent in-reply-to
    pulse content (ack pulse) receiver simulator
    language KQML)

27
MASS Interface 2
  • New TAEMS structure
  • A-gtS (tell sender ExampleAgent content
    (AddTaems.) receiver simulator language KQML)
  • Execution of method
  • Activation
  • Termination
  • Query of resources
  • S-gtA (reply sender simulator content (R1 value
    min max) in-reply-to ??? receiver ExampleAgent
    type control language KQML)
  • Reset
  • S-gtA (ask sender simulator content (reset)
    receiver ExampleAgent type control reply-with
    (reset) language KQML)

28
MASS Interface 3
  • Inter-agent communications
  • Point-to-point
  • Broadcast
Write a Comment
User Comments (0)
About PowerShow.com