Academia.eduAcademia.edu

Intelligent agents for an interactive multi-media game

1997

This paper describes research undertaken while developing an interactive game based on a children's science fiction film. The aim of the project is to develop artificial intelligence agents as characters in the game world which interact with the player around various predetermined scenarios. We describe the development of a representation for agent attributes, and how they affect on-going moods and changing relationships between agents during the game.

Intelligent Agents for an Interactive Multi-media Game A. E. Nicholson and A. Dutta, Department of Computer Science, Monash University, Clayton, VICTORIA 3168, Australia, phone: +61 3 9905-52115 fax: +61 3 9905-5146 fannn,[email protected]. ABSTRACT: This paper describes research undertaken while developing an interactive game based on a children’s science fiction film. The aim of the project is to develop artificial intelligence agents as characters in the game world which interact with the player around various predetermined scenarios. We describe the development of a representation for agent attributes, and how they affect on-going moods and changing relationships between agents during the game. Keywords: Agents, interactive games, representation, behaviour. 1. Introduction Traditional, single-player, computer games are based on colourful, dynamic, graphical displays, where players input using the keyboard, a mouse or joy-sticks, and simplistic game objectives revolve around killing “baddies”. In recent times we have seen the development of single player games such as SIM-CITY, where the player has to build, maintain and interact with a dynamic complex environment over time. More complex multi-player computer based games involve multiple human controlled characters, such as the “Shattered Worlds” Multi-User Dungeon (MUD) at Monash University. This MUD is a text-based virtual reality game where MUD characters run by human players compete for limited resources in an attempt to achieve various goals; for many players the social interaction is as important as finishing the specified “quests”. We are interested in a type of computer game that combines many of these features; a multi-media game based on social and competitive interactions between the player and computer generated characters. The focus of this paper is the development of intelligent agents, based on the field of Artificial Intelligence, to be the computer generated characters in such a game. The term agent has been widely and inconsistently used in recent times. At the most simple level, an agent is something that perceives and acts [1, p.7]. Beale and Wood [2] provide one classification of various notions of agents: user agents, agent guides, autonomous agents, symbiotic and co-operative agents, and anthropomorphic agents. This last grouping, anthropomorphic agents or agents that imitate humans, are the type of intelligent software agents required for engaging a human player in an interactive, character-based game. Our research falls into the category of creating lifelike autonomous agents for entertainment purposes, as described in Maes’ [3] overview. An example of such an agent is Julia [4], an agent who hangs around on MUDs, acting like any other (human controlled) character, but can also answer questions about the layout of the MUD and other topics, pass notes, gossip, sing, play cards and so on. Intended as the companion production to a feature film, the game consists of a number of pre-determined general scenarios constructed by the script-writers, with the main focus and interest on aspects of social interaction with characters with differing personality profiles. This use of pre-determined scripts means that the agents are constrained in the general sequence of actions they can take; that is, they do not develop their own plans to achieve goals. However the scenarios are specified for a generic game character, with a range of actions or dialogue utterances available at particular points in the unfolding of the game. The actual choice as to agent action or dialogue is determined by a number of factors. These factors determining agent behaviour are: the agent’s personality profile, which consists of values for personality traits, and physical and mental skills; the mood of the agent, which is continually changing depending on both the player and other agents actions and the personality profile; current relationships with other agents and the player; and the nature of preceding, or trigger, actions or utterances. The organisation of this paper is as follows. Section 2 describes both the original science fiction story and the game which has been developed from it. The agent models are developed in Section 3. The underlying agent attributes are described in Section 3.1. Section 3.2. describes the representation of mood and how it changes, while Section 3.3. shows propagation of changes in the relationship between agents. In Section 3.4., we show how different dialogue and action choices are made during the enactment of a particular scenario. 2. The Game A children’s science-fiction novel 1 is being developed into a film by industrial collaborators. The associated computer game will incorporate film footage and stills into the multi-media interface. A brief synopsis of the story is as follows. Three children are kidnapped and taken to a place they are told is light years away from earth. There they have to perform in a circus with other children from a range of Earth cultures for their survival, controlled by the “Ringmaster”. One child finds out that they are still on Earth. They join forces, outwit and overpower their captors and escape. In the computer game, the player is trapped with other children characters, which are the computer generated intelligent agents. Possible outcome are: getting killed; becoming a ring-master (that is, a “baddie”); and escaping. The objective of the player is to escape with the aid of other characters whom the player must first befriend in the circus arena. 3. Agent Models 3.1. Personality Each computer character in the game has a set of associated personality attributes. We have chosen to use the “Big-Five Factor Structure” based on work in the field of psychology [5]. The major factors are: introversionextroversion, pleasantness or agreeableness, conscientiousness or dependability, emotional stability, and intellect or sophistication. Each of these major factors consists of 7 different sub-parts, which are given a value on a 9 point scale: the entries for the introversion-extroversion scale are shown in Table . Similarly, there are a set of physical skills which are particularly important in this game, since the characters have to perform in the circus. The personality aspects which determine moods and change of mood are given in the next section. Table 1: Extract from Goldberg’s Big-Five Factor structre [3]: introversion-extroversion factor introverted unenergetic silent timid inactive unassertive unadventurous Very 1 1 1 1 1 1 1 2 2 2 2 2 2 2 Moderately 3 3 3 3 3 3 3 4 4 4 4 4 4 4 Neither 5 5 5 5 5 5 5 Moderately 7 7 7 7 7 7 7 6 6 6 6 6 6 6 8 8 8 8 8 8 8 Very 9 9 9 9 9 9 9 extroverted energetic talkative bold active assertive unadventurous 3.2. Mood Representing and displaying emotion is central to the creation of “believable” agents, that is, human-like agents [6]. There are a number of different kinds of moods or emotional scales. The project developers have provided two scales for the preliminary prototypes: the happy/sad scale and the secure/anxious scale. On each scale there is a default value or mood level, MoodD , to which an agent reverts when he or she is left alone. We also specify upper and lower limits on the value of a mood scale for an individual, Moodmax and Moodmin respectively, where Moodmax > Moodmin > 0. These parameters are a function of the relevant personality traits. Each action or dialogue utterance made by the other agents or the players can have an effect on an agent’s moods. We have a simple classification, X , of each action and utterance for a particular situation on a scale, such that X 2 f?V; V g, and which mood scales it influences. In addition to the classification for the action or dialogue, the change in mood depends on personality based factors we call the emotional mutability (EM). Intuitively, if an agent has a high EM factor, its mood changes will be more sudden than those of an agent with a lower EM factor. Triggered mood swings We model changes in mood using Newton’s laws of motion under gravity 2 . After a mood trigger occurs at some time tbegin , the mood for the time this trigger has an effect (until tend ) is determined as follows: X > 0; Mood(tbegin + t) = min(Mood(tbegin ) 1 The title is not specified for commercial reasons. 2h ut 12 gt2 = ? U  t) ? + ( 1 2 g jX j)t2 ; Moodmin ) ( + (1) X < 0; Mood(Tbegin )  0; Mood(tbegin +t) = max(Mood(tbegin ) ? (U t) + 21 (g +jX j)t2; Moodmin ) (2) Here U is the equivalent to the initial velocity along the mood axis when the mood change trigger occurs. If the mood has been constant (such as when the mood is MoodD ), U = EM1 , where EM1 represents one aspect of the agent’s emotional mutability. If the mood was changing when the trigger occured, U is determined from the mood value trajectory at that time. The new mood value for some time t after the trigger is determined either by the equation or limited by the highest and lowest possible moods. With this model, most of the change occurs immediately, then the effect gradually trails off, with the maximum value analogous to a maximum height attained by a ball thrown in the air. The combination of g and the classification of the input X , is analogous to gravitational acceleration. If the input is neutral, i.e. X = 0, no change will occur. It turns out that for each X , g can be calculated in terms of EM1 , Moodmax or Moodmin and MoodD (see [7] for details). For example: g = 2(Mood EM?1 Mood ) max D 2 (3) We have a special handling of mood change in the particular case of an agent being given negative input while in a better than default mood, i.e. if X < 0 and Mood(tbegin ) > 0. Each agent has a probability p that in this situation, the input causes a sudden drop in mood level. The more emotionally mutable the agent is (indicated by EM1 ), the steeper the drop. Returning to default moods Once the full effect of the mood change trigger, X , is reached (analogous to the highest point reached by a ball thrown in the air), assuming no other mood trigger occurs in the meantime, the return of the mood level is modelled by critically damped simple harmonic motion. Assuming the mood value is decreasing towards the default value MoodD , the equation that has been adopted is: Mood(t) = MoodD + sign(X )(Mood(tend ) + K  t)e?EM2 t (4) where  the value is increased if X was positive, reduced if X was negative;  Mood(tend ) is the mood at the most extreme point before the decrease to default begins;  if SDT is the sober down time, that is, the time taken to reach the default if the agent’s mood is going down from Moodmax , then K = (MoodD  e EM2 SDT SDT ? Mood(tend )) (5) This model results in a smooth, increasingly gradual return to the default mood. The SDT and EM2 are constants that depend on the agent’s personality profile; a high EM2 value indicates a faster initial drop, however two agents with the same SDT will reach their default at the same time 3 . A diagrammatic example of mood changes on the happy/sad scale are shown in Figure 1. 3.3. Relationships Suppose that the set of agents is A , where the number of agents is N . The attitude of an agent, Ai 2 A , towards another agent or the player, Aj , which we present by V iewOf (Ai ; Aj ) is influenced by two major factors. 4 The first is the quality of the (more recent) interactions between them, where each interaction is an action or utterance directed from Aj towards Ai , with the classification X 2 f?V; V g. Each agent has a personality factor m which determines how important more recent interactions are compared to previous ones; it can be thought of as a window of interactions or how long a memory a person has! The range of this summary history of interactions is limited to f?m  V; m  V g. The history of interaction value is updated as follows: X > 0; H 0 (Ai ; Aj ) = min(H (Ai ; Aj ) + X; m  V ) (6) 3 Note that EM , is a fraction whose value must be carefully set; if it is too high the function will oscillate (i.e. corresponding to under2 damped motion). 4 Note that we do not as yet attempt to model the attitudes of the human player. Insulted while in a good mood Praised Reached his/her maximum happiness Cannot go any happier Insulted ECSTASY HAPPY Moodmax MoodD DEFAULT SAD Larger Drop d Moodmin Return to default Praised Praised HELL 0 Cheered up. Reaches default state faster TIME Cheered up and becomes slightly happy Figure 1: Example of mood change where H 0 (Ai ; Aj ) is the updated value. The computation for H 0 (Ai ; Aj ) with X < 0 is symmetric. These computations simply mean that this summary of past interactions goes up or down, depending on whether X is positive or negative, unless the extreme limit (determined by the individual agent’s value for m) has been reached. The other factor is the attitude of other agents towards that particular agent, whether those agents are friends or enemies, and how much the agent is influenced by others. More formally, if represents the degree to which one is influenced by others, then the overall attitude is calculated thus: V iewOf (Ai ; Aj ) = H (Ai ; Aj ) + X Ak A 2 V iewOf (Ai ; Ak )  V iewOf (Ak ; Aj ) mV N Ai nf (7) g We can see that the multiplication of the ViewOf values gives us the intuitive results we would expect: a friend of my friend is also a friend (+  + = ?); an enemy of my enemy is my friend (?  ? ! +); and so on. The factor in the denominator is used for scaling purposes. When a dialogue utterance or action with value X 2 f?V; V g occurs, the following updates are made: 1. Update interaction summary: compute H 0 (Ai ; Aj ); 2. Update agent’s view: compute V iewOf 0 (Ai ; Aj ); 8Ak 2 3. Propagate that change into other agents’ views: A n fAi g, compute V iewOf (Ai ; Ak ) 0 3.4. Action or Dialogue Choice The scenarios are written with a number of action and dialogue choice points. During the game execution, these agent choices are determined by the agent’s personality profile and the corresponding profile given to each action or dialogue in the set of possibilities at that point. In the current prototype we are using a 5 digit profile, corresponding to the Big-5 factors: each dialogue or action has profile, say fy1 , y2 , ... y5 g, and the agent has the profile fz1 , z2 , ... z5 g, each zi an average of the 7 sub-traits. We choose the dialogue or action d closest to the agent’s profile which minimises the square of the differences, X (yi ? zi) : 2 i 1;5 2f (8) g This is a pattern-matching problem and other criteria could be substituted. 4. Further work and conclusions We have implemented a simple prototype in Visual Basic which includes the agent personality profile, mood changes and relationship updating for a single scenario. The interface is crude: the players uses buttons and the mouse to choose between alternatives; agents moods are an ongoing real-time background process and are displayed graphically. An agent’s dialogues or actions are displayed with simple pop-up forms. Another part of the overall project is the development of a sophisticated multi-media interface which will incorporate video clips and still from the movie, agent dialogue turned into speech, the use of graphical images and colour to represent agents’ moods, in addition to giving the agents faces [8]. We are not utilising all the 35 subtraits for dialogue or action choice, essentially for reasons of computational efficiency. Similarly, we are aware that the use of canned dialogue is (a) crude, and (b) very time-consuming at the scenario specification stage. While we are investigating the use of more sophisticated natural language processing techniques to generate interesting appropriate dialogue, the current method has the advantage of being simple and fast. It is also intended that the mood be used to index into the dialogue/action choices. We have described models for agent personality profile, moods, and relationships. These models have a compact representation, and allow the moods and relationships to be updated in the computationally efficient manner required for a real-time interactive game. In addition, they appear to have some psychological plausibility. Acknowledgements The authors wish to thank Shane Morris, Kathleen Muller and Dr Conrad Newman for useful discussions in the development of this work. 5. References [1]. Stuart Russell and Peter Norvig: Artificial Intelligence: A Modern Approach, Prentice-Hall, 1994. [2]. Russell Beale and Andrew Wood: “Agent-based interaction,” People and Computers IX: Proceedings of Human-Computer Interaction, pp. 239–245, Glasgow, UK, 1994. [3]. Pattie Maes: “Artificial life meets entertainment: Lifelike autonomous agents,” Communications of the ACM, Special Issue on New Horizons of Commercial and Industrial AI, Vol. 38, Number 11, 1995. [4]. Michael Mauldin: “Chatterbots, Tinymuds, and the Turing test: Entering the Loebner prize competition,” Proceedings of the Twelfth National Conference on Artifical Intelligence, pp. 16-21. AAAI, 1994. [5]. Lewis R. Goldberg: “An alternative ‘Description of Personality’: The Big-Five factor structure,”. Psychological Assessment, Vol. 4, Number 1, pp. 26–42, 1992. [6]. Joseph Bates: “The role of emotion in believable agents,” Communications of the ACM, Special Issue on Agents, 1994. [7]. A.E. Nicholson and A. Dutta: Intelligent agents with personalities, emotions and relationships. Technical Report In preparation, Department of Computer Science, Monash University, 1996. [8]. Tomoko Koda and Pattie Maes: “Agents with faces: The effects of personification of agents,” Proceedings of Human-Computer Interaction, pp. 239–245, London, UK, 1996. View publication stats