SlideShare a Scribd company logo
International Journal of Engineering Inventions
e-ISSN: 2278-7461, p-ISSN: 2319-6491
Volume 3, Issue 3 (October 2013) PP: 55-59

AI In the Game Development
Pranav Kumar Pathak
ABSTRACT: A focus of pedestrian’s behavior in 3d games and simulations are increased. This paper presents
model for efficient collision avoidance algorithm that can be used in simulation of crowd behavior in 3d games
and simulation project. . Our model is based on a representation of the situation in a (x,y,t) space, which makes
it possible to consider both detouring and speed modifications in the avoidance patterns.

Keywords: AI for games, Steer behavior, Path finding in 3d games and simulation.
I.

INTRODUCTION

For a more efficient and safer design of public facilities, it is important to be able to estimate the
behaviour of the crowd, to predict heavily used routes or peak flows. For example, a computer simulation of
crowd movement can be used to elaborate emergency evacuation plans.
The model available to describe the behavior of the crowd usually deals with microscopic variables like the
average speed or the flow.
Our purpose is to design an individual-based model of the crowd, hoping that a more refined simulation
might be obtained by considering each pedestrian‟s behaviour.

II.

CROWD MODELS

a.
Macroscopic approach
In this approach, the crowd is described with fluid-like properties. Usually, some measures are made to find an
expression of the speed according to the density( of course, he higher the density is, the more frequent the
contacts are, and the lower the speed is). Individually, there are many variations according to one‟s sex, age,
physical shape, motivations… but his model only deals with averages.
1.
Macroscopic description Variables

Average walking speed U( in meter per minute)

Density of pedestrians d( in pedestrians per square meter)

Flow Q ( in pedestrians per minute per meter width), with Q = U.d
Linear approximation U = A-B.d
2. Factors defining the quality of the flow

Freedom to choose one‟s desired speed and to overtake

Ability to cross a stream

Ability to walk in the direction opposing the major flow.
In simulations using the macroscopic approach:

The environment is modeled by a graph, each edge being a transit place (sidewalk, passageway,
stairway, escalator…) with its own capacity (estimated from surveys).

The pedestrian concentration is propagated across this graph.
This pedestrian concentration is propagated across this graph.
These simulations are successfully used for large-scale estimations, such as the study of the effect of a
modification in the design of a facility (adding a new entrance a new exit..) or the estimation of the evacuation
time of a building.
However, they do not take into consideration behavioral elements, and thus cannot be used at a more precise
scale, to study how pedestrians really act.
b.
I.

Microscopic Approach
Individual description
Yielding is the action to change one‟s own trajectory to allow another pedestrian to pass. It is hard to
measure exactly the distance at which one starts yielding. Observations made showed that the yielding distance
decreases as the density increases, from 2.1m at low density, to 1.5m in congested situation:
When the density is low enough ( unimplemented situation), at about 15~30m from the obstacle.
www.ijeijournal.com

Page | 55
AI In The Game Development
At high density, when a simple detour is not possible, the “ step-and-slide” movement occurs, starting at a
distance of about 1.5 m. It consists in slight angling of the body, the turning of the shoulders and a side step.
While the people coming ahead are usually briefly glanced at, and then discarded, when a collision is likely to
happen, a kind of communication occurs, involving:
The emission of signs to allow the other to discover one‟s purpose
An establishment point, when both parties acknowledge
Of course, misunderstanding is possible in this communication, both parties proposing to take the same option at
the same time.
They enter in what was called a “ reciprocal dance”, which can require a couple of occurrences to break.
II.

Boids
The famous model of group movements can simulate flocks of birds, herds of horsed, schools of fish..
These bird-like agent are called boids.
The model is based on a very simple formulation of local rules that any agent in the group must enforce.
Resulting in a surprisingly harmonious result.

Separation: avoid collision with nearby flock mates

Alignment : match velocity with nearby flock mates

Cohesion: attempt to go towards the center of the flock.
When avoiding collisions, a bold only considers the center of the flock. When avoiding collisions, a
boid only considers the positions of its flock mates, and it chooses its speed relying only on its „neighbors‟
speed. Therefore, collision –free navigation appears as a side effect. Boids are cooperative and all share the
same goal and preoccupation in a human crowd, everyone tries to avoid collisions, but the result is very
different from a school of fish. This is probably because few pedestrians have the same objectives, and because
everyone tends to act in rather selfish way, not enforcing the rules of alignment and cohesion. The difference
shall be evident at low densities, when everyone is free to choose his speed.
iii. Particle systems
Particle systems are usually used in computer animation for the modeling and the visualization of
clouds, water, gases, fires… They consist in some clouds of elementary primitives (particles) with physical
attributes (which obey physical laws). One can make the analogy with actual particles in electro-magnetic fields
This method was used for simulation of crowd movement involving up to 50,000 persons, especially to
test emergency Evacuation plans. The model is robust enough to allow such large-scale simulations, and can be
used to study the apparition of congestion points or the spreading of panic Phenomena

III.

AN ALGORITHM FOR COLLISION AVOIDANCE

a. Outline
We adopted the following specifications for our model.

Each agent is able to plan a safe trajectory from the current position. Using information on the position
and speed of the obstacles to forecast their trajectories.

Both detouring and speed variations are possible in the avoidance scheme.

(x,y,t) space is used to represent the collision avoidance problem.
b. (x,y,t) space
The future position of all visible obstacles is predicted and represented in a three dimensional (x,y,t)
space. In such a space, all objects are static, and the problem becomes one of path planning(box 3, top)
By introducing the disk of admissible displacements, we simplified the search of a path in three-dimensional
space to a search of a point in a limited two-dimensional domain( box 3, bottom).
Our goal is to select a good point in the disk for the next movement, “good” meaning collision-free and optimal
in relation to speed variation and detouring.
To characterize a point P in the disk, we consider the trajectory Tp obtained by adopting the speed
corresponding to P (therefore TP is a straight line). We showed that points corresponding to a collision are on a
segment AZ (box 4, top)
Then, taking a point P not on AZ, we calculated the minimal horizontal distance dmin between TP and
the line to avoid (the velocity of the obstacle is supposed to be constant). If the pedestrian discards all
movements that correspond to a dmin inferior to a fixed limit, it creates a triangular shaped forbidden area
having Z for vertex (see box 4, bottom).

www.ijeijournal.com

Page | 56
AI In The Game Development
c. (x,y,t) space
When avoiding a collision point in (x,y,t) space :

Passing under it means passing earlier, thus accelerating

Passing above it means passing later, thus Decelerating

Figure 1. (x,y,t) space
Admissible displacements
The main constraint on the trajectory is that time is not reversible. Since z=VZ.t, where VZ is an
arbitrarily fixed constant, all admissible displacement vector for the time interval, t must have VZ. t for third
coordinates.
Hence, the points that can be reached after t are on a disk VZ, t above the current position, which radius
is VM t, VM being the maximum speed for the pedestrian.

IV.

GEOMETRICAL PROPERTIES

Property 1: If the trajectory to avoid is a line in (x,y,t) space, then the set of points that would lead to a collision
is a segment AZ in the disk of admissible displacements

Figure 2. Geometrical properties
Property 2: The points on a same line from Z correspond to a same dmin. Intuitively, it means that the closer P
is to Z, the further the collision point is, and the less deviation is required.

Figure 3
www.ijeijournal.com

Page | 57
AI In The Game Development
c.

Finding the best movement
To choose among the points outside the forbidden area, we defined a cost function over the disk. In
box 5, the forbidden zone created by three obstacles is represented. Points V represent the pedestrian‟s current
speed, and the point leading to the goal at his favorite speed is G.
d. Planning and following the trajectory
By iterating n times the process, a n-step trajectory can be planned from the current position, as shown
in the following chart:

Figure 4. chart
4. Evaluation
a. Real data
Experimental data was obtained by filming outdoor scenes with a video camera, but we faced two
problems. First, the coordinates of the pedestrians must be pointed at manually. It would have been
interesting to make the whole process automatic, however, useful scenes involve many pedestrians. In such
cases, it is difficult to apply object tracking methods since the environment is complex and many occlusions
occur.
Next, the behavior of the pedestrians is difficult to analyze. We were able to obtain trajectories and
velocity profiles; and we observed some variation according to the age (elder people walk more slowly) and the
motivation (people in a hurry often rush when crossing the street). From these observations, we found that an
average value for vfav can be 1.5 m/s.
b. Test situations
i. Frontal avoidance
In this situation, the two agents walk from opposite directions and must deviate to avoid a collision.
The amount of deviations depends on the value of dmin, and the value of the K parameters does not influence
the movement (the points on the limit of the forbidden area have the lowest cost). The trajectories of the
pedestrians for different values of dmin are represented in box 7 (top).
ii. Lateral avoidance
In this situation, the pedestrians come from orthogonal directions. Collision avoidance is possible both
by changing speed and by detouring. This choice depends on the values of the K parameters.

In the first case, the cost of deceleration is lower than the cost of acceleration for pedestrian 0 (in green)

In the second case, the cost of acceleration is higher

In the third case, the attraction to the goal is stronger, so that he does not
Avoidance with 12 agents Influence of dmin

Too small (dmin<0.8m): the resulting trajectories are

no longer collision-free. Too large: unnecessary detours are made.
Influence of n

Too small (n<4): the agents constantly re-plan their trajectory, so that it becomes difficult to accurately
forecast their behavior, resulting in unstable situations.

Too large: the last part of the planned trajectory corresponds to unrealistic forecasting.

V.

CONCLUSION AND POSSIBLE ENHANCEMENTS

We presented an efficient collision avoidance algorithm that was used in a simulation of crowd
behavior, involving up to 12 pedestrians with conflicting goals. Our model is based on a representation of the
www.ijeijournal.com

Page | 58
AI In The Game Development
situation in a (x,y,t) space, which makes it possible to consider both detouring and speed modifications in the
avoidance patterns.
Among the enhancements that are to be implemented before our model can realistically describe crowd
behavior:



In the description of the environment: implement sources and sinks of pedestrians (doorways in reality) to
generate large numbers of agents.
In the description of the agents: improve the mechanical model (limited acceleration and rate of turn),
implement specific behaviors (step-and-slide movement, group behavior), and improve the method used to
forecast the trajectories to be avoided.

REFERENCE
1.
2.
3.

4.
5.

Barwood, H. & Falstein, N. 2002. .More of the 400: Discovering Design Rules.. Lecture at Game Developers Conference, 2002.
Available online at: http://www.gdconf.com/archives/2002/hal_barwood.ppt
Church, D. 1999. .Formal Abstract Design Tools.. Game Developer, August 1999. San Francisco, CA: CMP Media. Available
online at: http://www.gamasutra.com/features/19990716/design_tools_01.htm
Hunicke, R. 2004. .AI Babysitter Elective.. Lecture at Game Developers Conference Game Tuning Workshop, 2004. In LeBlanc et
al., 2004a. Available online at: http://algorithmancy.8kindsoffun.com/GDC2004/AITutorial5.ppt LeBlanc, M., ed. 2004a. .Game
Design and Tuning
Workshop Materials., Game Developers Conference 2004.Available online at: http://algorithmancy.8kindsoffun.com/GDC2004/
LeBlanc, M. 2004b. .Mechanics, Dynamics, Aesthetics: A Formal Approach to Game Design.. Lecture at Northwestern University,
April 2004.

About the Author

Pranav kumar Pathak is lecturer in CCIS, King Saud University. He may be reached at
091-2692-246101.

www.ijeijournal.com

Page | 59

More Related Content

What's hot

Na ch02
Na ch02Na ch02
Collinearity Equations
Collinearity EquationsCollinearity Equations
Collinearity Equations
National Cheng Kung University
 
Photogrammetry chandu
Photogrammetry chanduPhotogrammetry chandu
Photogrammetry chandu
chandra sekhar reddy guda
 
Map reading
Map readingMap reading
Map reading
Kennyboo Brown
 
Orthorectification and triangulation
Orthorectification and triangulationOrthorectification and triangulation
Orthorectification and triangulation
Mesfin Yeshitla
 
Photogrammetry - Space Resection by Collinearity Equations
Photogrammetry - Space Resection by Collinearity EquationsPhotogrammetry - Space Resection by Collinearity Equations
Photogrammetry - Space Resection by Collinearity Equations
Ahmed Nassar
 
Contour Lines
Contour LinesContour Lines
Contour Lines
Mr Cornish
 
Optimal Vacation Itinerary Modeling
Optimal Vacation Itinerary ModelingOptimal Vacation Itinerary Modeling
Optimal Vacation Itinerary Modeling
Gerard Trimberger
 
Coordinate system 1st
Coordinate system 1stCoordinate system 1st
Coordinate system 1st
HIMANSHU DIWAKAR
 

What's hot (9)

Na ch02
Na ch02Na ch02
Na ch02
 
Collinearity Equations
Collinearity EquationsCollinearity Equations
Collinearity Equations
 
Photogrammetry chandu
Photogrammetry chanduPhotogrammetry chandu
Photogrammetry chandu
 
Map reading
Map readingMap reading
Map reading
 
Orthorectification and triangulation
Orthorectification and triangulationOrthorectification and triangulation
Orthorectification and triangulation
 
Photogrammetry - Space Resection by Collinearity Equations
Photogrammetry - Space Resection by Collinearity EquationsPhotogrammetry - Space Resection by Collinearity Equations
Photogrammetry - Space Resection by Collinearity Equations
 
Contour Lines
Contour LinesContour Lines
Contour Lines
 
Optimal Vacation Itinerary Modeling
Optimal Vacation Itinerary ModelingOptimal Vacation Itinerary Modeling
Optimal Vacation Itinerary Modeling
 
Coordinate system 1st
Coordinate system 1stCoordinate system 1st
Coordinate system 1st
 

Viewers also liked

A Path finding Technique for Open Terrain
A Path finding Technique for Open TerrainA Path finding Technique for Open Terrain
Study of the Mesh Field and Rotation in Various Planes of Optical Spherical N...
Study of the Mesh Field and Rotation in Various Planes of Optical Spherical N...Study of the Mesh Field and Rotation in Various Planes of Optical Spherical N...
Study of the Mesh Field and Rotation in Various Planes of Optical Spherical N...
International Journal of Engineering Inventions www.ijeijournal.com
 
Innovative Improvement of Data Storage Using Error Correction Codes
Innovative Improvement of Data Storage Using Error Correction CodesInnovative Improvement of Data Storage Using Error Correction Codes
Innovative Improvement of Data Storage Using Error Correction Codes
International Journal of Engineering Inventions www.ijeijournal.com
 
142-147_Konceptualna moda
142-147_Konceptualna moda142-147_Konceptualna moda
142-147_Konceptualna modaIno Zeljak
 
Microsphere Formation Using an Excimer Laser
Microsphere Formation Using an Excimer LaserMicrosphere Formation Using an Excimer Laser
Microsphere Formation Using an Excimer Laser
International Journal of Engineering Inventions www.ijeijournal.com
 
בית רשת
בית רשתבית רשת
בית רשת
AshdodSlides
 

Viewers also liked (6)

A Path finding Technique for Open Terrain
A Path finding Technique for Open TerrainA Path finding Technique for Open Terrain
A Path finding Technique for Open Terrain
 
Study of the Mesh Field and Rotation in Various Planes of Optical Spherical N...
Study of the Mesh Field and Rotation in Various Planes of Optical Spherical N...Study of the Mesh Field and Rotation in Various Planes of Optical Spherical N...
Study of the Mesh Field and Rotation in Various Planes of Optical Spherical N...
 
Innovative Improvement of Data Storage Using Error Correction Codes
Innovative Improvement of Data Storage Using Error Correction CodesInnovative Improvement of Data Storage Using Error Correction Codes
Innovative Improvement of Data Storage Using Error Correction Codes
 
142-147_Konceptualna moda
142-147_Konceptualna moda142-147_Konceptualna moda
142-147_Konceptualna moda
 
Microsphere Formation Using an Excimer Laser
Microsphere Formation Using an Excimer LaserMicrosphere Formation Using an Excimer Laser
Microsphere Formation Using an Excimer Laser
 
בית רשת
בית רשתבית רשת
בית רשת
 

Similar to AI In the Game Development

A Dynamic Cellular Automaton Model for Large-Scale Pedestrian Evacuation
A Dynamic Cellular Automaton Model for Large-Scale  Pedestrian EvacuationA Dynamic Cellular Automaton Model for Large-Scale  Pedestrian Evacuation
A Dynamic Cellular Automaton Model for Large-Scale Pedestrian Evacuation
Scientific Review SR
 
A Dynamic Cellular Automaton Model for Large-Scale Pedestrian Evacuation
A Dynamic Cellular Automaton Model for Large-Scale Pedestrian EvacuationA Dynamic Cellular Automaton Model for Large-Scale Pedestrian Evacuation
A Dynamic Cellular Automaton Model for Large-Scale Pedestrian Evacuation
Scientific Review
 
autonomous-vehicles_final
autonomous-vehicles_finalautonomous-vehicles_final
autonomous-vehicles_final
Nicholas Jones
 
Path Planning And Navigation
Path Planning And NavigationPath Planning And Navigation
Path Planning And Navigation
guest90654fd
 
Path Planning And Navigation
Path Planning And NavigationPath Planning And Navigation
Path Planning And Navigation
guest90654fd
 
Vtc9252019
Vtc9252019Vtc9252019
Vtc9252019
Jun Steed Huang
 
Contour-based Pedestrian Detection with Foreground Distribution Trend Filteri...
Contour-based Pedestrian Detection with Foreground Distribution Trend Filteri...Contour-based Pedestrian Detection with Foreground Distribution Trend Filteri...
Contour-based Pedestrian Detection with Foreground Distribution Trend Filteri...
ITIIIndustries
 
K046036367
K046036367K046036367
K046036367
IJERA Editor
 
E017512630
E017512630E017512630
E017512630
IOSR Journals
 
DETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECTDETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECT
AM Publications
 
Mobile robot path planning using ant colony optimization
Mobile robot path planning using ant colony optimizationMobile robot path planning using ant colony optimization
Mobile robot path planning using ant colony optimization
eSAT Publishing House
 
Unit II & III_uncovered topics.doc notes
Unit II & III_uncovered topics.doc notesUnit II & III_uncovered topics.doc notes
Unit II & III_uncovered topics.doc notes
smithashetty24
 
Iaetsd modified artificial potential fields algorithm for mobile robot path ...
Iaetsd modified  artificial potential fields algorithm for mobile robot path ...Iaetsd modified  artificial potential fields algorithm for mobile robot path ...
Iaetsd modified artificial potential fields algorithm for mobile robot path ...
Iaetsd Iaetsd
 
4260 9235-1-pb
4260 9235-1-pb4260 9235-1-pb
4260 9235-1-pb
Ahmad Fahrizald
 
Design and Implementation of Mobile Map Application for Finding Shortest Dire...
Design and Implementation of Mobile Map Application for Finding Shortest Dire...Design and Implementation of Mobile Map Application for Finding Shortest Dire...
Design and Implementation of Mobile Map Application for Finding Shortest Dire...
Eswar Publications
 
Path Loss Prediction by Robust Regression Methods
Path Loss Prediction by Robust Regression MethodsPath Loss Prediction by Robust Regression Methods
Path Loss Prediction by Robust Regression Methods
ijceronline
 
Using skeleton model to recognize human gait gender
Using skeleton model to recognize human gait genderUsing skeleton model to recognize human gait gender
Using skeleton model to recognize human gait gender
IAESIJAI
 
Enhancing the Design pattern Framework of Robots Object Selection Mechanism -...
Enhancing the Design pattern Framework of Robots Object Selection Mechanism -...Enhancing the Design pattern Framework of Robots Object Selection Mechanism -...
Enhancing the Design pattern Framework of Robots Object Selection Mechanism -...
INFOGAIN PUBLICATION
 
NavMesh
NavMeshNavMesh
IEEE-ITSC 2023 Keynote - What Crowds can Teach Us
IEEE-ITSC 2023 Keynote - What Crowds can Teach UsIEEE-ITSC 2023 Keynote - What Crowds can Teach Us
IEEE-ITSC 2023 Keynote - What Crowds can Teach Us
Serge Hoogendoorn
 

Similar to AI In the Game Development (20)

A Dynamic Cellular Automaton Model for Large-Scale Pedestrian Evacuation
A Dynamic Cellular Automaton Model for Large-Scale  Pedestrian EvacuationA Dynamic Cellular Automaton Model for Large-Scale  Pedestrian Evacuation
A Dynamic Cellular Automaton Model for Large-Scale Pedestrian Evacuation
 
A Dynamic Cellular Automaton Model for Large-Scale Pedestrian Evacuation
A Dynamic Cellular Automaton Model for Large-Scale Pedestrian EvacuationA Dynamic Cellular Automaton Model for Large-Scale Pedestrian Evacuation
A Dynamic Cellular Automaton Model for Large-Scale Pedestrian Evacuation
 
autonomous-vehicles_final
autonomous-vehicles_finalautonomous-vehicles_final
autonomous-vehicles_final
 
Path Planning And Navigation
Path Planning And NavigationPath Planning And Navigation
Path Planning And Navigation
 
Path Planning And Navigation
Path Planning And NavigationPath Planning And Navigation
Path Planning And Navigation
 
Vtc9252019
Vtc9252019Vtc9252019
Vtc9252019
 
Contour-based Pedestrian Detection with Foreground Distribution Trend Filteri...
Contour-based Pedestrian Detection with Foreground Distribution Trend Filteri...Contour-based Pedestrian Detection with Foreground Distribution Trend Filteri...
Contour-based Pedestrian Detection with Foreground Distribution Trend Filteri...
 
K046036367
K046036367K046036367
K046036367
 
E017512630
E017512630E017512630
E017512630
 
DETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECTDETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECT
 
Mobile robot path planning using ant colony optimization
Mobile robot path planning using ant colony optimizationMobile robot path planning using ant colony optimization
Mobile robot path planning using ant colony optimization
 
Unit II & III_uncovered topics.doc notes
Unit II & III_uncovered topics.doc notesUnit II & III_uncovered topics.doc notes
Unit II & III_uncovered topics.doc notes
 
Iaetsd modified artificial potential fields algorithm for mobile robot path ...
Iaetsd modified  artificial potential fields algorithm for mobile robot path ...Iaetsd modified  artificial potential fields algorithm for mobile robot path ...
Iaetsd modified artificial potential fields algorithm for mobile robot path ...
 
4260 9235-1-pb
4260 9235-1-pb4260 9235-1-pb
4260 9235-1-pb
 
Design and Implementation of Mobile Map Application for Finding Shortest Dire...
Design and Implementation of Mobile Map Application for Finding Shortest Dire...Design and Implementation of Mobile Map Application for Finding Shortest Dire...
Design and Implementation of Mobile Map Application for Finding Shortest Dire...
 
Path Loss Prediction by Robust Regression Methods
Path Loss Prediction by Robust Regression MethodsPath Loss Prediction by Robust Regression Methods
Path Loss Prediction by Robust Regression Methods
 
Using skeleton model to recognize human gait gender
Using skeleton model to recognize human gait genderUsing skeleton model to recognize human gait gender
Using skeleton model to recognize human gait gender
 
Enhancing the Design pattern Framework of Robots Object Selection Mechanism -...
Enhancing the Design pattern Framework of Robots Object Selection Mechanism -...Enhancing the Design pattern Framework of Robots Object Selection Mechanism -...
Enhancing the Design pattern Framework of Robots Object Selection Mechanism -...
 
NavMesh
NavMeshNavMesh
NavMesh
 
IEEE-ITSC 2023 Keynote - What Crowds can Teach Us
IEEE-ITSC 2023 Keynote - What Crowds can Teach UsIEEE-ITSC 2023 Keynote - What Crowds can Teach Us
IEEE-ITSC 2023 Keynote - What Crowds can Teach Us
 

More from International Journal of Engineering Inventions www.ijeijournal.com

H04124548
H04124548H04124548
G04123844
G04123844G04123844
F04123137
F04123137F04123137
E04122330
E04122330E04122330
C04121115
C04121115C04121115
B04120610
B04120610B04120610
A04120105
A04120105A04120105
F04113640
F04113640F04113640
E04112135
E04112135E04112135
D04111520
D04111520D04111520
C04111114
C04111114C04111114
B04110710
B04110710B04110710
A04110106
A04110106A04110106
I04105358
I04105358I04105358
H04104952
H04104952H04104952
G04103948
G04103948G04103948
F04103138
F04103138F04103138
E04102330
E04102330E04102330
D04101822
D04101822D04101822
C04101217
C04101217C04101217

More from International Journal of Engineering Inventions www.ijeijournal.com (20)

H04124548
H04124548H04124548
H04124548
 
G04123844
G04123844G04123844
G04123844
 
F04123137
F04123137F04123137
F04123137
 
E04122330
E04122330E04122330
E04122330
 
C04121115
C04121115C04121115
C04121115
 
B04120610
B04120610B04120610
B04120610
 
A04120105
A04120105A04120105
A04120105
 
F04113640
F04113640F04113640
F04113640
 
E04112135
E04112135E04112135
E04112135
 
D04111520
D04111520D04111520
D04111520
 
C04111114
C04111114C04111114
C04111114
 
B04110710
B04110710B04110710
B04110710
 
A04110106
A04110106A04110106
A04110106
 
I04105358
I04105358I04105358
I04105358
 
H04104952
H04104952H04104952
H04104952
 
G04103948
G04103948G04103948
G04103948
 
F04103138
F04103138F04103138
F04103138
 
E04102330
E04102330E04102330
E04102330
 
D04101822
D04101822D04101822
D04101822
 
C04101217
C04101217C04101217
C04101217
 

Recently uploaded

Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 

Recently uploaded (20)

Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 

AI In the Game Development

  • 1. International Journal of Engineering Inventions e-ISSN: 2278-7461, p-ISSN: 2319-6491 Volume 3, Issue 3 (October 2013) PP: 55-59 AI In the Game Development Pranav Kumar Pathak ABSTRACT: A focus of pedestrian’s behavior in 3d games and simulations are increased. This paper presents model for efficient collision avoidance algorithm that can be used in simulation of crowd behavior in 3d games and simulation project. . Our model is based on a representation of the situation in a (x,y,t) space, which makes it possible to consider both detouring and speed modifications in the avoidance patterns. Keywords: AI for games, Steer behavior, Path finding in 3d games and simulation. I. INTRODUCTION For a more efficient and safer design of public facilities, it is important to be able to estimate the behaviour of the crowd, to predict heavily used routes or peak flows. For example, a computer simulation of crowd movement can be used to elaborate emergency evacuation plans. The model available to describe the behavior of the crowd usually deals with microscopic variables like the average speed or the flow. Our purpose is to design an individual-based model of the crowd, hoping that a more refined simulation might be obtained by considering each pedestrian‟s behaviour. II. CROWD MODELS a. Macroscopic approach In this approach, the crowd is described with fluid-like properties. Usually, some measures are made to find an expression of the speed according to the density( of course, he higher the density is, the more frequent the contacts are, and the lower the speed is). Individually, there are many variations according to one‟s sex, age, physical shape, motivations… but his model only deals with averages. 1. Macroscopic description Variables  Average walking speed U( in meter per minute)  Density of pedestrians d( in pedestrians per square meter)  Flow Q ( in pedestrians per minute per meter width), with Q = U.d Linear approximation U = A-B.d 2. Factors defining the quality of the flow  Freedom to choose one‟s desired speed and to overtake  Ability to cross a stream  Ability to walk in the direction opposing the major flow. In simulations using the macroscopic approach:  The environment is modeled by a graph, each edge being a transit place (sidewalk, passageway, stairway, escalator…) with its own capacity (estimated from surveys).  The pedestrian concentration is propagated across this graph. This pedestrian concentration is propagated across this graph. These simulations are successfully used for large-scale estimations, such as the study of the effect of a modification in the design of a facility (adding a new entrance a new exit..) or the estimation of the evacuation time of a building. However, they do not take into consideration behavioral elements, and thus cannot be used at a more precise scale, to study how pedestrians really act. b. I. Microscopic Approach Individual description Yielding is the action to change one‟s own trajectory to allow another pedestrian to pass. It is hard to measure exactly the distance at which one starts yielding. Observations made showed that the yielding distance decreases as the density increases, from 2.1m at low density, to 1.5m in congested situation: When the density is low enough ( unimplemented situation), at about 15~30m from the obstacle. www.ijeijournal.com Page | 55
  • 2. AI In The Game Development At high density, when a simple detour is not possible, the “ step-and-slide” movement occurs, starting at a distance of about 1.5 m. It consists in slight angling of the body, the turning of the shoulders and a side step. While the people coming ahead are usually briefly glanced at, and then discarded, when a collision is likely to happen, a kind of communication occurs, involving: The emission of signs to allow the other to discover one‟s purpose An establishment point, when both parties acknowledge Of course, misunderstanding is possible in this communication, both parties proposing to take the same option at the same time. They enter in what was called a “ reciprocal dance”, which can require a couple of occurrences to break. II. Boids The famous model of group movements can simulate flocks of birds, herds of horsed, schools of fish.. These bird-like agent are called boids. The model is based on a very simple formulation of local rules that any agent in the group must enforce. Resulting in a surprisingly harmonious result.  Separation: avoid collision with nearby flock mates  Alignment : match velocity with nearby flock mates  Cohesion: attempt to go towards the center of the flock. When avoiding collisions, a bold only considers the center of the flock. When avoiding collisions, a boid only considers the positions of its flock mates, and it chooses its speed relying only on its „neighbors‟ speed. Therefore, collision –free navigation appears as a side effect. Boids are cooperative and all share the same goal and preoccupation in a human crowd, everyone tries to avoid collisions, but the result is very different from a school of fish. This is probably because few pedestrians have the same objectives, and because everyone tends to act in rather selfish way, not enforcing the rules of alignment and cohesion. The difference shall be evident at low densities, when everyone is free to choose his speed. iii. Particle systems Particle systems are usually used in computer animation for the modeling and the visualization of clouds, water, gases, fires… They consist in some clouds of elementary primitives (particles) with physical attributes (which obey physical laws). One can make the analogy with actual particles in electro-magnetic fields This method was used for simulation of crowd movement involving up to 50,000 persons, especially to test emergency Evacuation plans. The model is robust enough to allow such large-scale simulations, and can be used to study the apparition of congestion points or the spreading of panic Phenomena III. AN ALGORITHM FOR COLLISION AVOIDANCE a. Outline We adopted the following specifications for our model.  Each agent is able to plan a safe trajectory from the current position. Using information on the position and speed of the obstacles to forecast their trajectories.  Both detouring and speed variations are possible in the avoidance scheme.  (x,y,t) space is used to represent the collision avoidance problem. b. (x,y,t) space The future position of all visible obstacles is predicted and represented in a three dimensional (x,y,t) space. In such a space, all objects are static, and the problem becomes one of path planning(box 3, top) By introducing the disk of admissible displacements, we simplified the search of a path in three-dimensional space to a search of a point in a limited two-dimensional domain( box 3, bottom). Our goal is to select a good point in the disk for the next movement, “good” meaning collision-free and optimal in relation to speed variation and detouring. To characterize a point P in the disk, we consider the trajectory Tp obtained by adopting the speed corresponding to P (therefore TP is a straight line). We showed that points corresponding to a collision are on a segment AZ (box 4, top) Then, taking a point P not on AZ, we calculated the minimal horizontal distance dmin between TP and the line to avoid (the velocity of the obstacle is supposed to be constant). If the pedestrian discards all movements that correspond to a dmin inferior to a fixed limit, it creates a triangular shaped forbidden area having Z for vertex (see box 4, bottom). www.ijeijournal.com Page | 56
  • 3. AI In The Game Development c. (x,y,t) space When avoiding a collision point in (x,y,t) space :  Passing under it means passing earlier, thus accelerating  Passing above it means passing later, thus Decelerating Figure 1. (x,y,t) space Admissible displacements The main constraint on the trajectory is that time is not reversible. Since z=VZ.t, where VZ is an arbitrarily fixed constant, all admissible displacement vector for the time interval, t must have VZ. t for third coordinates. Hence, the points that can be reached after t are on a disk VZ, t above the current position, which radius is VM t, VM being the maximum speed for the pedestrian. IV. GEOMETRICAL PROPERTIES Property 1: If the trajectory to avoid is a line in (x,y,t) space, then the set of points that would lead to a collision is a segment AZ in the disk of admissible displacements Figure 2. Geometrical properties Property 2: The points on a same line from Z correspond to a same dmin. Intuitively, it means that the closer P is to Z, the further the collision point is, and the less deviation is required. Figure 3 www.ijeijournal.com Page | 57
  • 4. AI In The Game Development c. Finding the best movement To choose among the points outside the forbidden area, we defined a cost function over the disk. In box 5, the forbidden zone created by three obstacles is represented. Points V represent the pedestrian‟s current speed, and the point leading to the goal at his favorite speed is G. d. Planning and following the trajectory By iterating n times the process, a n-step trajectory can be planned from the current position, as shown in the following chart: Figure 4. chart 4. Evaluation a. Real data Experimental data was obtained by filming outdoor scenes with a video camera, but we faced two problems. First, the coordinates of the pedestrians must be pointed at manually. It would have been interesting to make the whole process automatic, however, useful scenes involve many pedestrians. In such cases, it is difficult to apply object tracking methods since the environment is complex and many occlusions occur. Next, the behavior of the pedestrians is difficult to analyze. We were able to obtain trajectories and velocity profiles; and we observed some variation according to the age (elder people walk more slowly) and the motivation (people in a hurry often rush when crossing the street). From these observations, we found that an average value for vfav can be 1.5 m/s. b. Test situations i. Frontal avoidance In this situation, the two agents walk from opposite directions and must deviate to avoid a collision. The amount of deviations depends on the value of dmin, and the value of the K parameters does not influence the movement (the points on the limit of the forbidden area have the lowest cost). The trajectories of the pedestrians for different values of dmin are represented in box 7 (top). ii. Lateral avoidance In this situation, the pedestrians come from orthogonal directions. Collision avoidance is possible both by changing speed and by detouring. This choice depends on the values of the K parameters.  In the first case, the cost of deceleration is lower than the cost of acceleration for pedestrian 0 (in green)  In the second case, the cost of acceleration is higher  In the third case, the attraction to the goal is stronger, so that he does not Avoidance with 12 agents Influence of dmin  Too small (dmin<0.8m): the resulting trajectories are  no longer collision-free. Too large: unnecessary detours are made. Influence of n  Too small (n<4): the agents constantly re-plan their trajectory, so that it becomes difficult to accurately forecast their behavior, resulting in unstable situations.  Too large: the last part of the planned trajectory corresponds to unrealistic forecasting. V. CONCLUSION AND POSSIBLE ENHANCEMENTS We presented an efficient collision avoidance algorithm that was used in a simulation of crowd behavior, involving up to 12 pedestrians with conflicting goals. Our model is based on a representation of the www.ijeijournal.com Page | 58
  • 5. AI In The Game Development situation in a (x,y,t) space, which makes it possible to consider both detouring and speed modifications in the avoidance patterns. Among the enhancements that are to be implemented before our model can realistically describe crowd behavior:   In the description of the environment: implement sources and sinks of pedestrians (doorways in reality) to generate large numbers of agents. In the description of the agents: improve the mechanical model (limited acceleration and rate of turn), implement specific behaviors (step-and-slide movement, group behavior), and improve the method used to forecast the trajectories to be avoided. REFERENCE 1. 2. 3. 4. 5. Barwood, H. & Falstein, N. 2002. .More of the 400: Discovering Design Rules.. Lecture at Game Developers Conference, 2002. Available online at: http://www.gdconf.com/archives/2002/hal_barwood.ppt Church, D. 1999. .Formal Abstract Design Tools.. Game Developer, August 1999. San Francisco, CA: CMP Media. Available online at: http://www.gamasutra.com/features/19990716/design_tools_01.htm Hunicke, R. 2004. .AI Babysitter Elective.. Lecture at Game Developers Conference Game Tuning Workshop, 2004. In LeBlanc et al., 2004a. Available online at: http://algorithmancy.8kindsoffun.com/GDC2004/AITutorial5.ppt LeBlanc, M., ed. 2004a. .Game Design and Tuning Workshop Materials., Game Developers Conference 2004.Available online at: http://algorithmancy.8kindsoffun.com/GDC2004/ LeBlanc, M. 2004b. .Mechanics, Dynamics, Aesthetics: A Formal Approach to Game Design.. Lecture at Northwestern University, April 2004. About the Author Pranav kumar Pathak is lecturer in CCIS, King Saud University. He may be reached at 091-2692-246101. www.ijeijournal.com Page | 59