280 likes | 345 Views
Explore the utilization of biologically inspired algorithms, such as ANNs and GAs, in video games and simulations. Learn about evolving AI strategies and enhancing NPC behaviors. Discover innovative techniques like imitating random variations and constructing adaptive AI through neuroevolution. Evaluate the impact of genetic algorithms on gaming, focusing on evolving troll behaviors in a competitive environment. Uncover the application of evolving teams of cooperating agents in real-time strategy games. Stay updated with the latest developments in biologically inspired AI at the EvoGames workshop series.
E N D
Survey of Biologically-inspired Algorithms in Game A/I Clint Jeffery University of Idaho
Outline • Preliminary thoughts • AIGPW Chapters • EvoGames Papers • Conclusions
Preliminary Thoughts • ANN and related technologies are rare in commercial games • Behavior of ANN-based agents often perceived as bizarre or unrealistic • Biologically inspired algorithms (ANNs, GAs, and relatives) are nevertheless used in a surprising range of roles in games and simulations • Personal interest: want self-balancing dynamic MMOs
AI Game Programming Wisdom • 4 anthologies • Not technical / academic / detailed • Selected for today • Imitating Random Variations in Behavior Using a Neural Network, John Manslow • Genetic Algorithms: Evolving the Perfect Troll, F. Laramee • Constructing Adaptive AI Using Knowledge-Based NeuroEvolution, R. Cornelius et al
Imitating Random Variations in Behavior Using a Neural Network • Tank battle, human vs. computer • “although neural networks can be taught to imitate human players…they are able to reproduce only the deterministic aspects of their behavior” • Chapter is really about augmenting ANN with random sampling
Imitating Random Variations…Unconditional Distribution • Log difference between human error and ANN calculated optimal angle for 5000 samples • Partition 5000 samples into bins, assign probabilities to each bin • Generate new shots by selecting bin based on probability, and picking random value from the interval range of the bin
Imitating Random Variations…Conditional Distribution • Human error events not independent: error of current shot depends on error of previous shot • Assign probabilities to bins using a standard classifier multilayer perceptron (MLP) neural network • Record 5000 samples of error + previous shot’s error
Genetic Algorithms: Evolving the Perfect Troll • Hand-coded behavior/strategy is time-consuming, limits monster thinking • GAs to the rescue: • Initialize population • Test population, rank fitness • Mate best performers using crossover and mutation • Add new random organisms • Rinse and repeat
Genetic Algorithms: Evolving the Perfect Troll • Complex fitness criteria • Individual vs. group performance vs. co-evolution with other species • Chapter considers only individual fitness • Gene representation uses array of reals to represent troll’s bias towards 5 possible goals • Fitness determined by simulation
Genetic Algorithms: Evolving the Perfect Troll • Reproduction rights could be reserved exclusively for “fittest” ranked individuals, or by stochastic sampling • Cross-over: many possible methods, author prefers “uniform crossover” • Mutation: probability .001 or less • NextGen=top 20%, 70% children, 10% new • Population size: 100-250
Genetic Algorithms: Evolving the Perfect Troll • 5 Troll Goals: eat Sheep, kill/chase Knight, Flee from harm, Heal, Explore • Each goal gets a behavior function that is “sensible” in-game • Genome: 0.0 – 1.0 for each goal serve as weights (priority = G[goal]*need) • 30x30 squares contain: havens, traps, sheep, knights, towers
Genetic Algorithms: Evolving the Perfect Troll • Score=8*K+10*S+1.5*Age-1*Capt-2.5*Dam • After 50 generations…you get trolls who spend all their time trying to eat
Constructing Adaptive AI Using Knowledge-Based NeuroEvolution • Use Neural Networks to make NPC’s less predictable/exploitable • Preinitialize ANNs with “normal” NPC AI • Convert FSM to ANN
Constructing Adaptive AI Using Knowledge-Based NeuroEvolution
Constructing Adaptive AI Using Knowledge-Based NeuroEvolution
Constructing Adaptive AI Using Knowledge-Based NeuroEvolution
Constructing Adaptive AI Using Knowledge-Based NeuroEvolution
Constructing Adaptive AI Using Knowledge-Based NeuroEvolution
EvoGames • Workshop on Biologically-Inspired Algorithms in Games • 2011 is the 3rd year • Part of Evostar.org • UI CS faculty Terence Soule has been on their program committee • Criterion for mention today: • Selected interesting papers available on web
From EvoGames2009 • Coevolution of Competing Agent Species in a Game-like Environment. TelmoMenezes, Ernesto Costa • Swarming for Games---Emergence as a Gaming Principle.Sebastian von Mammen, Christian Jacob • Evolving Teams of Cooperating Agents for Real-Time Strategy Game.PawelLichocki, Krzysztof Krawiec, WojciechJaskowski
Telmo Menezes • http://telmomenezes.com/curriculum-vitae/phd/, Coimbra, Portugal • evoGames paper not on web, but his whole Ph.D. dissertation is… • Gridbrain, a sequentialized, von-Neumann-inspired, evolutionary computation model
Swarming for Games • http://www.vonmammen.org/science/SwarmGames.pdf • 2 kinds of play • indirectly guide a swarm system • optimize flocking parameters • Flocking formations widely used in RTS games, e.g. Lord of Magic • Leading vs. Herding
Swarming for Games • Flocking • Alignment • Cohesion • Separation
From EvoGames2010 • Evolving Bot's AI in Unreal Antonio Mora, Juan Julián Merelo, et al • Towards a Generic Framework for Automated Video Game Level Creation Nathan Sorenson, Philippe Pasquier • Evolution of Artificial Terrains for Video Games Based on Accessibility Miguel Frade, F. F. de Vega, Carlos Cotta • Evolving Behaviour Trees for the Commercial Game DEFCON Chong-U Lim, Robin Baumgarten, Simon Colton • Evolving 3D Buildings for the Prototype Video Game Subversion Andy Martin, Andrew Lim, Simon Colton, Cameron Browne
From EvoGames2011 • Towards Procedural Strategy Game Generation: Evolving Complementary Unit TypesTobiasMahlmann, Julian Togelius, Georgios N. Yannakakis
A Plug for Dr. Soule • One of our department faculty is a specialist in this area • Check out: • http://www2.cs.uidaho.edu/~tsoule/ladybug
A Plug for Dr. Soule • http://www2.cs.uidaho.edu/~tsoule/ladybug