Digital Media
Moshell -Spring 98
Lecture 19: Agents and Avatars
from a paper ON RESERVE by Athomas Goldberg
This presentation is being inserted where "Cookies" should have been for three reasons: (1) We looked at Alpha worlds the other day, and the topic of avatars is fresh on my mind; (2) I have a research project proposal due next week and must learn this stuff ASAP, and (3) I can't find my CGI book right now to make lecture notes about cookies!
Goldberg, Athomas. "Avatars and Agents, or Life among the Indigenous Peoples of Cyberspace". Chapter 10 of Digital Illusion: Entertain the Future with High Technology. Clark Dodsworth, Ed. Addison-Wesley, 1998. The article is on reserve in the main library.

See also http://www.mrl.nyu.edu/improv/

DEFINITIONS:

Avatar: 2a :an incarnation in human form. 2b. an embodiment ... usually in a person. 3. a variant phase or version of a continuing basic entity.

The term "avatar" is normally used in cyberspace to denote a figure that represents a human being who is participating in, interacting with or visiting the virtual space. The term was introduced by Ken Stephenson in Snow Crash and independently by Farmer and Morningstar in the Habitat distributed virtual environment system.

Agent: 1a. something that is capable of producing an effect: an active or efficient cause... 2. one who acts for or in place of another by authorith from him as a representative, emissary, or oficial ... or as one engaged in undercover activities. 3. a means or instrument by which a guiding intelligence achieves a result. 4. one that acts or exerts power. 5. a person responsible for his acts.

Software agents are a major current topic of research. An agent has knowledge of what you want, and takes the initiative to try to get it for you. You don't have to "run" your agent software; it's always running, looking for the best deal or the new data.

IMPROV is a project at New York University's Media Research Lab. Its goal is to find ways to script the behavior of both avatars and agents. "Actor" denotes a figure representing either an avatar (live human) or agent (simulated human.)

Behavior Group: A collection of mutually exclusive behaviors. Consider

writing with a pen
throwing a ball
coming one's hair

These activities, all normally done with the dominant hand, can't be done at once. They're mutually exclusive. In IMPROV terms, they are members of a Group of actions.Let's call it the Handwork group.

A different group might include

walking
riding in a car
sitting in a chair

This Transportation group (well, maybe the chair has wheels!) is capable of being done simultaneously with the Handwork group.

Query 19.1: Think up, and name, at least four groups of human activity which can be done together (i. e. one element of each group can be mixed with one element of the other groups, without becoming humanly impossible.) Name at least two actions in each group.

Specifying Body Action: Each action can be specified in terms of joint angles, but if you have to make the changes one at a time, it's very tedious and not natural-looking. Consider

SCRIPT drink
Steps:
1. rotate shoulder Horizontal-axis -45 degrees
2. rotate elbow Horizontal-axis 40 degrees
3. Open hand
4. rotate elbow Horizontal-axis 5 degrees        # hoping it's over the beer glass
5. close hand to contact
6. rotate elbow Horizontal-axis 90 degrees    # but the beer runs down your shirt...

You can see that this kind of thing is quite difficult to do in a step by step fashion. We need a script which supports concurrent actions. For instance we might have this:

SCRIPT moveHandto(x,y,z)
Steps:
1. Calculate_target_angles(x,y,z, *shoulderAngle, *elbowAngle)
2. Schedule rotate shoulder Horizontal-axis shoulderAngle
3. Schedule rotate elbow Horizontal-axis elbowAngle
4. Execute

At least this gives us a way to concurrently rotate the shoulder and elbow. It doesn't yet protect us from asking for impossible joint angles, though.

Query 19.2. Consider the problem of specifying how a robot's (or an avatar's) arm should be positioned. Assume that the torso is fixed in space. The hand is considered to be a separate unit (don't worry about controlling the fingers, etc.) but you do have to allow for the wrist's motion. Your question: How many independent numbers does it take to specify the exact position of one arm? (Consider the angles through which each joint can move.) What are they, and what are the allowable ranges (approximately) for each one?

Assume that one could use low level scripts such as the above to define basic actions, including the most challenging one: walking. Now, how shall we combine these together into higher level behaviors?

SCRIPT Greeting
Steps:
1. Enter room
2. Wait 4 seconds
3. Turn to Camera
4. Wait 1 second
5. Wave to Camera, say hello to Camera
6. Wait 3 seconds
7. Leave room

Each of these is in fact a high level script,such as "Leave Room." The actor must know where the exit is, and must know that leaving the room normally involves walking (not flying or sliding horizontally like a snake.) We're trying to avoid the usual trappings of "Artificial Intelligence" here (with its search of complex model spaces for the right logical sequence of action), by building specific action routines to meet each need. On that basis, the above scripts' individual elements seem do-able.

How about multiple actors, needing to do things together?
SCRIPT hello-hello
Steps:
1. Turn to my target
2. Wait 1 second
3. Wave to my target
4. Cue my target to Wave to me
5. Wait 1.5 seconds
6. Cue my target to Wave to me
7. Wait 1.5 seconds
8. Turn to Camera, cue my target to Turn to Camera
9. Wait 1 second
10. Wave to Camera, cue my target to Wave to Camera

This gets me and the target (other actor) to working both in sequence, and simultaneously.

Autonomy. We can add autonomous behaviors using simple statistical methods to randomize them.

SCRIPT fidget
Steps:
1. Choose from (Twiddle thumbs=.7, Scratch head=.3, Pick nose=.2)
2. Wait 3 seconds
3. Do again

This would have to be part of the HandWork group, since all actions use the hand. However it could be mixed into a larger random sequence in which whenever no other Handwork was running, fidget would run.

Personality Definition

Avatars can have attributes, like those in Dungeons and Dragons.  Consider

ACTOR Gregor
Attribute            Value
Intelligence        .99
Amiability        .5
Strength        .33
Coordination    .3
Sympathy toward Otto    .18
Sympathy-toward Gabrielle    .9
Knowledge-of ancient Greece    .75
Skill-at public speaking        .9
Skill-at driving cars            .25

These are then used to modulate the probability of successful actions in scripts. You can modify others' attributes too, of course:

SCRIPT excuse me
Steps:
1: belch
2. Wait 1 second
3. Set other-actors' sympathy-toward me to .01

... we skip a few examples to save some time ...

SRIPT Go to Store
Steps:
1. Exit home
2. Choose from (Walk, Take bus, take cab, ride bike) using criteria "Best way"
3. Enter store
4. etc...

CRITERIA Best Way
Criteria                                                    Importance
1. My energy compared to its physicality    .7
2. My wealth compared to its cost            .3

But, this script assumes that all actors have the same 7 to 3 ratio of concern for getting tired, vs. getting poor.

CRITERIA Better Way
Criteria                                                    Importance
1. My energy compared to its physicality    my importance-of-physical pleasure
2. My wealth compared to its cost             my importance-of-money

This puts in second-level parameters and makes the situation more adaptive to individual actors.

Inverse Causality

In new situations your actor may not know what to do. Go in a bar for the first time; here's a beer. How to pick it up and drink it? What should its effects be?

Solution: build the appropriate behavior into the beer, not the actor. When he looks at the beer, it tells him what to do with it. This might happen by a menu popping up, if it is an avatar. It might happen by adding an action to the list of available "Time wasting actions" (if such a list exists for the standard actor in that space.).

Other examples of object-supplied methods include fighting (attacker tells attackee what its options are, and how to do them.), dancing, etc.

Query 19.3: Work out the "dancing" scenario in a paragraph. What would your avatar-software need to tell a NPC (non-player character) actor, to get it to dance reasonably well with your avatar? Include both pre-dance setup information, and real-time messages during the dance itself.

Camera control; Directing the story

It's a big problem in VR to keep the viewer oriented toward the action. They're often just looking around here and there, and will miss the whole thing. A solution is to make the camera an actor, too, and constrain it to watch what the live actors are doing.

Likewise, improv drama requires that somebody keep the story flowing. A director-actor can perhaps do this.

Pretty far fetched, huh?