![]() |
Reference Manual |
Agent Description (Printable)
Agent-name: HelloWorld
Creation-time:
Wed Aug 26 13:30:41 PDT 1998
Description: Hello World
agent with a full GUI and demonstrating
connections between the agent
and the user interface.
Location:
Author: sonny
Vendor: Reticular Systems
Ontologies: [Quick Tour Ontology]
Agencies: [Hello World Agency]
Actions:
Name:Start based on:HelloWorldFrame::run
Name:Print based on:HelloWorldFrame::print
Commitments:
JAVA Instances:
PACs:
com.reticular.agents.helloWorld.HelloWorldFrame
com.reticular.agentBuilder.agent.perception.PacCommSystem
com.reticular.agentBuilder.agent.perception.KqmlMessage
com.reticular.agentBuilder.agent.mentalState.Time
com.reticular.agentBuilder.agent.perception.RmiCommInfo
com.reticular.agentBuilder.agent.perception.AgentInfo
com.reticular.agentBuilder.agent.mentalState.Agent
PAC Instances:
Name:currentTime Type:Time
Initial Pac:False
Name:SELF Type:Agent Initial
Pac:False
Name:startupTime Type:Time
Initial Pac:False
Name:myHelloWorldFrame Type:HelloWorldFrame
Initial Pac:False
Rules:
Name: Print Greeting
Description: Activated by
a message from the myHelloWorldFrame PAC.
It calls the "Print"
action which in turn fires an action to write
out a string to the interface.
( %incomingMessage.sender
EQUALS "HelloWorld:PAC" )
( %incomingMessage.performative
EQUALS "achieve" )
( %incomingMessage.contentType
EQUALS String )
( %incomingMessage.content
EQUALS "Say Hello" )
DO Print ( Concat ( "HelloWorld!
the time is: " , currentTime.string ) )
DO SleepUntilMessage ( )
Name: Build HelloWorldFrame
Description: Activated by
the agent belief instance "SELF". The SELF belief is
automatically created by
the agent engine at startup.
The RHS causes the myHelloWorldFrame
instance to be created.
( BIND startupTime )
ASSERT( "myHelloWorldFrame"
HelloWorldFrame ( PacCommSystem ( SELF.agentInfo, "HelloWorld:PAC"
) ))
Name: Quit
Description: Activated by
a message from the myHelloWorldFrame PAC.
It calls the built in action
"shutdownEngine".
( %incomingMessage.sender
EQUALS "HelloWorld:PAC" )
( %incomingMessage.performative
EQUALS "achieve" )
( %incomingMessage.contentType
EQUALS String )
( %incomingMessage.content
EQUALS "Quit" )
DO ShutdownEngine ( )
Name: Launch Interface
Description: Activates after
the creation of the myHelloWorldFrame instance.
It connects the appropriate
actions to the appropriate methods,
and launches the interface
onto a separate thread. The rule then
executes the sleepUntilMessage
action which causes the
agent to sleep.
( BIND myHelloWorldFrame
)
DO ConnectAction ( "Print"
, myHelloWorldFrame )
DO ConnectAction ( "Start"
, myHelloWorldFrame )
DO Start ( )
DO RemoveRule ( "Build
HelloWorldFrame" )
DO RemoveRule ( "Launch
Interface" )
DO SleepUntilMessage ( )