Download presentation
Presentation is loading. Please wait.
1
Crowd Dynamics AI in C++
Using a game for demonstration C++ with Object Oriented Programming SDL for graphical Display (might become OpenGL)
2
The AI: Crowd Dynamics Simulates the motion, movement, behavior of groups Conventional games do it individually Simple example: A group of people finding a target Particle Swarm Optimization
3
PSO A method to optimize the behavior of “swarms”
Conventionally used in anthill simulations This only optimizes half of my AI engine Optimizes the movement calculations Does not optimize the communication aspect
4
Current Class Structure:
PNetwork World Person weight_list
5
weight_list Looping, array-based, fixed-size container
2 lists, one for data, one for weighting in summation Summation functions, which return the average value of the list (taking weighting into consideration) Used by the PNetwork to pick a direction for a person to travel after receiving a bunch of tips from the other people
6
Pnetwork Instantiated with a list of people as the group
Each time the step() method is called it Calls the “communicator” method of each person Adds them all into a weight_list for each person (differentiated by the weightings given) Instructs the persons to travel in the direction of the summation of their weight_list
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.