Information Technology Reference
In-Depth Information
In particular, the top rectangle of the diagram denotes Alice's top-level Goal (that
she has collected sufficient gold pieces). Contained within this rectangle is another,
depicting an Organizer comprising three States—an initial State, a subGoal and a
final State.
The subGoal is shown as the rightmost of the two rectangles on the second level.
Its Organizer, in turn, has two subGoals—one that continually mints more gold until
enough has been produced and the other determining when to end the game. The
bottom two rectangles represent Operations, responsible for interacting with the
Freeciv server.
Complementing theGoals andMechanisms shown in the figure is Alice's Environ-
ment (not shown). Example Concepts represented by Instances in the Environment
include City, Tile, Player, and Unit.
17.3.5 TMKL2 Semantics
A TMKL2 program connects the Goals of a software agent to the Mechanisms by
which the Goals are accomplished. The program is declarative in the sense that
all behavior is defined in terms of logical expressions (Given, Makes, Requires,
Provides). Consequently, one semantic interpretation of a TMKL2 program is that it
describes the behavior that a software agent must exhibit in order for it to accomplish
a set of top-level Goals.
TMKL2 programs are not just descriptive, however: They can be used to actually
control the modeled agent. To convey how this is accomplished requires a description
of the operational semantics of the language. Operationally, a TMKL2 Model can
be viewed as a hierarchy of finite state machines (FSMs) controlling communication
with the external software with which the agent interacts and with the Environment.
Superior state machines correspond to superior Goals. FSMs corresponding to Goals
without any subGoals are called leaf FSMs.
All state machines execute synchronously; that is, at any given time, each machine
is in a specific State. At the next virtual clock tick, all pending Data Conditions for
active leaf machines are evaluated, and the outgoing Transitions evaluating to true are
traversed, resulting in entry into new States. Upon entry into a State, the correspond-
ing Mechanism is interpreted. Mechanism interpretation ultimately resolves into
Operation invocations and updates to the Environment. After all invocations have
been processed, the Environment is updated to reflect any changes to the agent's
run-time data structures made by the invocations. Interpretation terminates if the
Organizer for the top-level Goal enters either a success or failure State.
Search WWH ::




Custom Search