TACL - TaskableAgents Control Language
Commands
These commands can be typed in the shell, or can be put in a file
(.TACL files) and read in by the agent. The TaskableAgents shell now
automatically looks for and reads 'init.TACL', if it exists in the
current directory. This can be used to initialize agents and start
them running (for example, could: load TRL and KB files, bind name,
connect to peers, start a task, and run).
Syntax of .TACL files is: a) each line must start (in column 0) with
'#' for comments or '(' for commands (i.e. no indenting), and b) blank
lines are allowed.
BATCH
- syntax: (batch filename)
- example: (batch domain.KB)
- purpose: read in file of Jare rules (Horn clauses and facts)
QUERY
- syntax: (query predicate+)
- example: (query (fruit ?x) (red ?x))
- purpose: determine if predicates as a conjunction are entailed by Jare knowledge-base
- note: shows ALL sets of variable bindings, prints out substituted query for each solution
- note: can also have NOT, e.g. (not (fruit ?x))
ASSERT
- syntax: (assert fact)
- example: (assert (dog poochie))
- purpose: add new facts (not Horn clauses) to Jare knowledge-base
RETRACT
- syntax: (retract fact)
- example: (retract (dog poochie))
- purpose: delete any Horn clauses in Jare knowledge-base whose head (consequent) unifies with fact
- note: can use variables to remove all instances of a fact, e.g. (retract (dog ?x))
BIND
- syntax: (bind var value)
- example: (bind ?year 2000)
- purpose: binds variables to values in global environment, can get substituted into subsequent commands
- note: by simply typing the name of a variable into the shell, you will get back its current binding
READ
- syntax: (read filename)
- example: (read tasks.TRL)
- purpose: load a TRL file into the agent's process knowledge base
START
- syntax: (start task)
- examples: (start (T1)), (start (monitor tank-5 binoculars))
- purpose: does initial task decomposition to get ready for 'step'
- syntax: (usermi name)
- purpose: creates an RMI MsgQueue for the agent, bound to 'name'
- note: If you want to use this (e.g. as a distributed agent in a multi-agent system), you must:
- be sure you are running 'rmiregistry', and
- use the following flag to run the agent: 'java -Djava.security.policy=policy TaskableAgents.Agent' with an appropriate policy file (try 'make runagent', which runs this command with the policy flag set)
- note: If you DON'T want to use RMI, you can always just run 'java TaskableAgents.Agent' as before.
- note: After 'usermi', the agent will check the message queue and assert messages into it's Jare KB (tagged with sender ID and timestamp) each time around the loop. You can write TRL code to handle these messages in any way you want.
QUIT
- syntax: quit
- purpose: exits from TaskableAgents shell
- note: no parentheses needed
- syntax: (gui)
- purpose: starts visual step-controller window
- syntax: (init filename)
- purpose: dynamically loads TACL script files
STEP
- syntax: (step)
- purpose: execute one action in the agent's current plan