Download Artificial Intelligence in Virtual Reality Introduction Problems and

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Visual Turing Test wikipedia , lookup

Affective computing wikipedia , lookup

Ecological interface design wikipedia , lookup

Augmented reality wikipedia , lookup

Embodied cognitive science wikipedia , lookup

Transcript
Artificial Intelligence
in Virtual Reality
Daniel Sjölie
VRlab, Ume å University
Introduction
n
Why do we want AI in VR?
– Simulation of humans (or animals)
– Interactive and realistic scenarios
– Intelligent Virtual Environments
n
Problems and possibilities for AI in VR
– Simulated perception
– Dynamic behaviours
n
Some examples
Problems and possibilities
n
Perception in Virtual Worlds
–
–
–
–
–
n
Why simulate perception?
The senses
Active and passive sensing
Detection and identification
Perception solutions
Decisions and control
–
–
–
–
Plan or react?
Emergence
Emotions
Behaviour solutions
1
Why simulate perception?
n
Brute force alternative
n
Realistic behaviour
– All data is already available in the virtual world.
– Characters should only react to events they would
perceive in a real world.
n
Efficiency
n
Design modularity
– You do not have to process events not perceived.
– Separating perception from decision makes it possible
to refine each part separately.
The senses
n
Sight
– The most important sense in most applications.
– Simple in principle, harder to make efficient.
– Many different solutions available.
n
Sounds & smells
– These both propagate through a medium (air).
– Easy to create a simplified solution (radius).
– Hard to create a correct solution (medium).
n
Touch & taste
– A matter of collision detection and triggers.
Active and passive sensing
n
Active sensing
– Active examination of the world. Generally affects the
world. eg. sending out laser rays to judge distances.
n
Passive sensing
– Just catch what comes your way and interpret it. eg. a
camera catching the light.
n
Virtual sensing
– No “free” possibility to have passive sensing.
– Need to simulate a medium to get this.
– Otherwise active examination of the world is
necessary.
2
Detection and identification
n
We need to detect and identify objects
– What detection and identification covers in general is
not entirely clear but in VR there are distinct steps.
n
Real detection
– Detection of objects should match the real world.
Realism and performance is what matters.
n
Virtual identification
– Virtual objects can include information about their
identity. Basic identification can be essentialy
automatic in VR.
Perception solutions
n
n
n
Identification is trivial once an object is detected
Detection can be done in many ways
Some approaches:
–
–
–
–
–
n
Spatial subdivision (tiles)
Ray-casting
Image-rendering (with analysis)
Simulated propagation
Collision detection
These approaches can often be combined
Spatial subdivision
n
Spatial subdivision is needed in some form
n
Tiles
– Without it you must consider all objects.
–
–
–
–
n
Probably the simplest form.
Makes it possible to cache visible areas.
Attractive for AI algorithms such as path-finding.
Easy to add properties to the “terrain”.
Could be integrated into graphics
– Spatial subdivision is often benefitial for the rendering
of graphics. This could be adapted to enable reuse for
perception.
3
Ray-casting
n
Really two methods
– Cast rays to search for object
– Cast rays to test visibility of object
n
Searching is generally not a good idea
– Must cast lots of rays to catch small objects
– Lots of rays are expensive
n
Testing visibility works better
n
Ray-casting really should be combined with
spatial subdivision
– Every ray is guaranteed to hit – no wasted rays.
Image-rendering
n
Not suited for VR without modifications!
– Rendering a view for each character and analyze the
image throws away the identification advantage.
n
Suited for testing of real world methods
Vision limited to viewport
n
Modifications could be interesting
n
– Might be desirable in som cases (games)
– Eg ”drawing” with object ID’s instead of colors.
– The z-buffer has interesting properties.
n
Expensive!
– Rendering the scene once per character takes time!
Simulated propagation
n
Simulating the real world
n
Propagation needs a medium
n
The detection problem is largely isolated.
– The goal is to make passive sensing possible.
– Combine with spatial subdivision.
– Signal propagation is trivially parallelizable and could
be executed in parallel with any AI.
n
Can handle more than vision!
– Other approaches have problems here.
4
Collision detection
n
n
Should rarely be necessary for perception
Easy enough to implement if needed
Plan or react
n
Planning
– Without planning the avatars will lack the intelligence
needed to simulate humans with goals and agendas.
n
Reactions
– In large virtual worlds we want the avatars to be able
to deal with events they cannot plan for. They need to
react.
n
n
How to combine these?
Influence reactions with planning or force replanning when required
Emergence
n
Good stuff
– Makes complex behaviours manageable.
– Easy to experiment with.
– Well suited for simulations and research.
n
Bad stuff
– Hard to control.
– “Overkill” for simple behaviours.
– Not well suited for scenarios.
5
Emotions
n
n
n
n
Simulation of human behaviour requires
simulation of emotions
Emotions also work well in many cases for nonhuman behaviours
Balance is needed
Emotions should influence the behaviour but
rarely control it
Behaviour solutions
n
n
n
Two basic steps
Prioritize behaviours
Combine behaviours
Behaviour prioritizing
n
Subsumption.
– Arrange behaviours into a hiearchy where ”lower”
behaviours can be overridden.
n
Weights.
– Give each behaviour a weight without removing.
6
Behaviour combining
n
Winner takes all.
n
Voting.
– The behaviour with the most weight decides all.
– All behaviours vote, with differing influense, on each
action that could be taken.
Some examples
n
n
n
n
n
ViCrowd, Lig
PeopleShop, Boston Dynamics
Mission Rehearsal Exercise
Games
ReplicantMind
ViCrowd
n
n
n
Created at Lig in Switzerland
Focus on large crowds by working with groups
and crowds as units.
Uses hierarchies of autonomy to control the
complexity of individuals.
7
ViCrowd
n
n
Uses plan and re- plan. Each individual has a
calculated path to follow within the group.
The primary unit is the group. Individuals can
change group or take command of a group.
PeopleShop
n
Created by Boston Dynamics
Focus on control to make it easy to create
specific scenarios
n
More guided animation than simulation
n
MRE
Mission Rehearsal Exercise (in Bosnia)
n
Created for the U.S. Army
Simulates emotions to create engaging and
realistic scenarios
n
May be the most complete solution today
n
8
Games
n
n
n
n
AI has become a selling feature
The Sims is one prime example of successful game AI.
The sims have a number of “desires” and “needs” that
makes up the basis for their decision making.
The objects contain information on their effect.
Games
n
n
In Black & White the creatures creates models of
the minds of players and other creatures.
Simulated perception is important in games like
Deus Ex and Splinter cell.
ReplicantMind
n
n
n
n
n
An AI toolkit created at VRlab.
One base class, Entity, for all intelligent objects.
Each entity can have any number of desires.
Desires are managed by processes.
Processes work by reacting to perceived entities.
9
ReplicantMind - voting
n
n
n
n
n
The actions to execute are selected by tasks.
Tasks are created by processes and motivated
by desires.
Tasks suggest actions that suit them.
Tasks vote on suggested actions and the action
with most votes wins.
The vote of each task is weighed according to
the importance of the desire motivating the task.
ReplicantMind – example
n
n
n
n
An entity called “ man” has a desire to eat and an
“eat” process.
This eat process reacts to a spotted “food” entity
by creating an “approach” task and motivating it
with the desire to eat.
The approach task suggests an action moving
towards the spotted food and votes for any
action taking us towards the food.
This all blends with any other active processes,
desires and tasks.
ReplicantMind - tasks
n
n
n
n
Much of the complexity ends up in the tasks.
The voting can be simplified by having the effect
of the action predicted and let the task evaluate
the resulting situation.
Getting the tasks to reach satisfying
compromises can be challenging.
One relatively easy way for a task to
compromise is to check the last selected action
and adapt.
10
The End
EOF
11