Download downloading - Interactive Intelligence group
Transcript
5.7. NOTES 69 Executing an Agent Program As an agent program is a set of modules, executing an agent program means to execute the modules that make up the agent. When an agent program is launched, the agent program is used to create an agent with an initially empty mental state. After executing the init module, other modules then are executed while executing the main decision cycle discussed above. This decision cycle is continuously executed and generates a run of the agent program. 5.7 Notes The Goal programming language was first introduced in [35]. Previous work on the programming language 3APL [34] had made clear that the concept of a declarative goal, typically associated with cognitive agents, was not supported adequately in that language. Declarative goals at that time were part of the “missing link” needed to bridge the gap between agent programming languages and agent logics [19, 47, 38]. The programming language Goal was introduced as a step towards bridging this gap. The design of Goal has been influenced by the abstract language Unity [18]. A temporal verification framework for Goal was provided as a formal specification framework for the agent programming language. In [30], it has been shown that Goal agents instantiate Intention Logic [19], relating Goal agents to logical agents specified in this logic. The execution mode of Goal where action options are randomly chosen when multiple options are available is similar to the random simulation mode of Promela [10]. The Tropism System Cognitive Architecture designed for robot control also uses a random generator in its action selection mechanism [8]. As in Goal, this architecture, based on so-called tropisms (“likes” and “dislikes”), also may generate multiple actions for execution from which one has to be chosen. The selection of one action from the chosen set is done by means of a biased roulette wheel. Each option is allocated a space (slot) on the wheel, proportional to the associated tropism value. Subsequently, a random selection is made on the roulette wheel, determining the robot’s action. A set of action rules can be viewed as a policy. There are two differences with standard definitions of a policy in the planning literature, however [26]. First, action rules do not always generate options for each possible state. Second, action rules may generate multiple options in a particular state and do not necessarily define a function from the (mental) state of an agent to an action. In other words, a strategy of a Goal agent defined by its action rules does not need to be universal and may underspecify the choice of action of an agent.4 5.8 Exercises 5.8.1 Consider again the program of Figure 4.1. By default, the rules are evaluated in linear order. Suppose we change this to random order by adding [order=random] to the program section. After this change, because of the third action rule, an agent can now also put a block that it is holding down on the table even if the block could also be put in position. Change the rule to ensure that a block is only put down on the table if it cannot be put in position directly. (Although it is clear that the linear rule evaluation order is useful to prevent this problem, the aim of this exercise it to show that in principle we can do without this option by specifying the right rule conditions.) 4 “Universal” in the sense of [52], where a universal plan (or policy) specifies the appropriate action for every possible state.