SlideShare uma empresa Scribd logo
1 de 5
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

Mais procurados (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
 

Destaque (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
 
בית רשת
בית רשתבית רשת
בית רשת
 

Semelhante a 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 EvacuationScientific 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 EvacuationScientific Review
 
autonomous-vehicles_final
autonomous-vehicles_finalautonomous-vehicles_final
autonomous-vehicles_finalNicholas Jones
 
Path Planning And Navigation
Path Planning And NavigationPath Planning And Navigation
Path Planning And Navigationguest90654fd
 
Path Planning And Navigation
Path Planning And NavigationPath Planning And Navigation
Path Planning And Navigationguest90654fd
 
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
 
DETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECTDETECTION OF MOVING OBJECT
DETECTION OF MOVING OBJECTAM 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 optimizationeSAT 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 notessmithashetty24
 
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
 
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 Methodsijceronline
 
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 genderIAESIJAI
 
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
 
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 UsSerge Hoogendoorn
 

Semelhante a 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
 

Mais de International Journal of Engineering Inventions www.ijeijournal.com

Mais de 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
 

Último

Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Último (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

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