game ai planning which gpu for how many

Category: Game Development - GD03
Poster
P6268
contact Name
Stephane Cardon: [email protected]
WHICH
GAME AI PLANNING
GPU FOR HOW MANY NPCS?
Stéphane CARDON, Éric JACOPIN
Écoles de Saint-Cyr Coëtquidan - France
{stephane.cardon,eric.jacopin}@st-cyr.terrenet.defense.gouv.fr
1000000
Motivation
100000
16384
• GPGPU for the future of Game AI
• Games use planning a,b,f,g (plans of at most 4-6
actions, for 50 bots max)
h
• Previous work shows encouraging speed-up
c,d,e
2048
512
1000
For all NPCs, goal
state is reached ?
1024
128
10
1
9 actions / predicates
max length plan = 4
16 actions / predicates
max length plan = 6
25 actions / predicates
max length plan = 8
Grounded Planning
Planning for how many NPCs per frame?
• Instantiated actions: attack-ennemy, dodge,
patrol, flee, cover, … (32 actions max)
• 64-bit integer (plan length at most 12 actions g)
• Breadth-first search for each NPC
[yes]
512
100
• GPU is designed for Matrix & Vector of integers
• What integer-based representation to encode
planning predicates, states and actions?
• One bit == One predicate; e.g. ennemy-is-dead
• One state is 32 predicates max (32-bit integer)
GOAP
8192
10000
GPU and Planning
a-like
131072
65536
Copy res list to CPU
[no]
Mark pairs
Make a set of pairs
<NPC,initial state>
Copy set to GPU
GT 650M (Kepler - 2 SMs)
GTX 550Ti (Fermi - 4 SMs)
Experiments
Make new set of
pairs from res list
such as pairs are not
already marked
Each thread compute
next states for all
actions from one
pair, and store in res
list
1024
•
•
•
•
1GB used max on GPU
GT 650M on Intel core i7 2.3GHz
GTX 550Ti on core 2 duo 2.2GHz
GTX TITAN on Xeon E5 2.7GHz
•
On a simple planning problem:
Blocks World (3, 4 and 5 blocks)
Random initial and goal states
•
References
a – Jeff ORKIN – Three States and a Plan : The A.I. Of F.E.A.R. – Proceedings of the Game Developer Conference (2006)
b – Dana NAU, Yue CAO, Amnon LOTEM & Héctor MUÑOZ–AVILA – The SHOP Planning System – AI Magazine 22(3), AAAI Press (Fall 2001)
c – William BLEWITT, Gary USHAW & Graham MORGAN – Applicability of GPGPU Computing to Real–Time AI Solutions in Games – Computational Intelligence and AI in Games (2013)
d – Alex CHAMPANDARD & Andrew RICHARDS – Massively Parallel AI on GPGPUs with OpenCL or C++ – Proceedings of the Game Developer Conference (2014)
e – Damian SULEWSKI, Stefan EDELKAMP & Peter KISSMANN – Exploiting the Computational Power of the Graphics card : Optimal State Space Planning on the GPU –
Proceedings of International Conference on Automated Planning and Scheduling (2011)
f – Éric JACOPIN – Game AI Planning Analytics – Proceedings of the 10th AIIDE (AAAI Press, 2014) – pages 119 à 124.
g – Éric JACOPIN – GOAP Analytics – GDC 2015 AI Summit – March 3rd.
h – Stéphane CARDON, Éric JACOPIN – CUDA Constraint Programming for AI Gaming in the Cloud – Poster at the NVIDIA GPU Technology Conference 2015
GTX TITAN (Kepler - 14 SMs)
512
256
64
128
128
CPU+GPU
Expected if only on GPU
Speed-up vs Number of NPCs
250
200
150
GPU planning
100
150 faster than
50
CPU planning
0
(one breadth-first
search for each NPC)
16
32
64
Intel Xeon E5 + GT TITAN
128
256
512
1024
Intel core I7 + GT 650 M