Machine Learning in Computer Games Learning in Computer Games By: Marc Ponsen.

Slides:



Advertisements
Similar presentations
Exploring Machine Learning in Computer Games Presented by: Matthew Hayden Thurs, 25 th March 2010.
Advertisements

Institute for Knowledge and Agent Technology 1 Entertainment and Computer Games Universiteit Maastricht / IKAT
7.1. O SCARS & A RTIFICIAL I NTELLIGENCE Interim awards and introduction to game AI.
RL for Large State Spaces: Value Function Approximation
A Survey of Real-Time Strategy Game AI Research and Competition in StarCraft Santiago Ontanon, Gabriel Synnaeve, Alberto Uriarte, Florian Richoux, David.
Constructing Complex NPC Behavior via Multi- Objective Neuroevolution Jacob Schrum – Risto Miikkulainen –
Artificial Intelligence in Real Time Strategy Games Dan Li.
Project 3 CSE 397/497 AI and Computer Games. What is Wargus? An open source clone of Warcraft 2 Supports the LUA scripting language.
DARPA Mobile Autonomous Robot SoftwareMay Adaptive Intelligent Mobile Robotics William D. Smart, Presenter Leslie Pack Kaelbling, PI Artificial.
1 Reinforcement Learning Introduction & Passive Learning Alan Fern * Based in part on slides by Daniel Weld.
Artificial Intelligence in Game Design Introduction to Learning.
RED DEAD REVOLVER Artificial Intelligence Critique By Mitchell C. Dodes CIS 588.
November 10, 2009Introduction to Cognitive Science Lecture 17: Game-Playing Algorithms 1 Decision Trees Many classes of problems can be formalized as search.
INSTITUTO DE SISTEMAS E ROBÓTICA Minimax Value Iteration Applied to Robotic Soccer Gonçalo Neto Institute for Systems and Robotics Instituto Superior Técnico.
Reinforcement Learning in Real-Time Strategy Games Nick Imrei Supervisors: Matthew Mitchell & Martin Dick.
Research Summary Adi Botea Computer Go Seminar, 29/09/2003.
1 Hybrid Agent-Based Modeling: Architectures,Analyses and Applications (Stage One) Li, Hailin.
The Importance of Architecture for Achieving Human-level AI John Laird University of Michigan June 17, th Soar Workshop
Omar Khaled Enayet – 4 th Year FCIS – Computer Science Department – August 2009 concerning planning, learning, Adaptation and opponent Modeling.
Commitment without Regrets: Online Learning in Stackelberg Security Games Nika Haghtalab Carnegie Mellon University Joint work with Maria-Florina Balcan,
Reinforcement Learning in the Presence of Hidden States Andrew Howard Andrew Arnold {ah679
CPSC 7373: Artificial Intelligence Lecture 11: Reinforcement Learning Jiang Bian, Fall 2012 University of Arkansas at Little Rock.
CS Reinforcement Learning1 Reinforcement Learning Variation on Supervised Learning Exact target outputs are not given Some variation of reward is.
A presentation by Matthew Dilts.  To solve problems that would take a long amount of time to manually solve ie. What’s the best strategy in a certain.
Artificial Intelligence in Game Design Problems and Goals.
Current Situation and Future Plans Abdelrahman Al-Ogail & Omar Enayet October
Reinforcement Learning and Markov Decision Processes: A Quick Introduction Hector Munoz-Avila Stephen Lee-Urban
Other Potential Machine Learning Uses
More precisely called Branch of AI behind it.
Evolutionary Computing Systems Lab (ECSL), University of Nevada, Reno 1 Authors : Christopher Ballinger, Sushil Louis
Introduction Many decision making problems in real life
Knowledge acquisition for adative game AI Marc Ponsen et al. Science of Computer programming vol. 67, pp , 2007 장수형.
CSE4AT3 Game Balancing. Designing Fun… You can’t, but there are things you can do to help Balancing the Game.
Introduction to AI Engine & Common Used AI Techniques Created by: Abdelrahman Al-Ogail Under Supervision of: Dr. Ibrahim Fathy.
RECAP CSE 348 AI Game Programming Héctor Muñoz-Avila.
What is Probability?  Hit probabilities  Damage probabilities  Personality (e.g. chance of attack, run, etc.)  ???  Probabilities are used to add.
C ASE -B ASED P LANNER P LATFORM FOR RTS G AMES An Introduction Abdelrahman Al-Ogail Ahmed Atta.
Machine Learning in Computer Games Marc Ponsen 11/29/04.
Machine Learning in Computer Games Automated GenerationTactics for Strategy Games Original: Marc Ponsen Update: H. Munoz-Avila.
AI and Computer Games (informational session) Lecture by: Dustin Dannenhauer Professor Héctor Muñoz-Avila Computer Science and Eng.
Memory and Analogy in Game-Playing Agents Jonathan Rubin & Ian Watson University of Auckland Game AI Group
1 S ystems Analysis Laboratory Helsinki University of Technology Kai Virtanen, Tuomas Raivio and Raimo P. Hämäläinen Systems Analysis Laboratory Helsinki.
Ibrahim Fathy, Mostafa Aref, Omar Enayet, and Abdelrahman Al-Ogail Faculty of Computer and Information Sciences Ain-Shams University ; Cairo ; Egypt.
CHECKERS: TD(Λ) LEARNING APPLIED FOR DETERMINISTIC GAME Presented By: Presented To: Amna Khan Mis Saleha Raza.
Artificial intelligence
Evolutionary Programming
1 Introduction to Reinforcement Learning Freek Stulp.
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology 1 Evolving Reactive NPCs for the Real-Time Simulation Game.
RADHA-KRISHNA BALLA 19 FEBRUARY, 2009 UCT for Tactical Assault Battles in Real-Time Strategy Games.
Course Overview  What is AI?  What are the Major Challenges?  What are the Main Techniques?  Where are we failing, and why?  Step back and look at.
Reinforcement learning (Chapter 21)
28th of July 2005Learning in Strategy Games1 COMPSCI777 – Computer Games Technology Learning in Strategy Games The University Of Auckland Thursday the.
Transfer Learning in Sequential Decision Problems: A Hierarchical Bayesian Approach Aaron Wilson, Alan Fern, Prasad Tadepalli School of EECS Oregon State.
STRUCTURE & STRATEGIES FAST BREAK OFFENCE. What is the Fast Break? Fast break is an offence strategy used in basketball. It is effective against a slow.
Artificial Intelligence in Game Design Lecture 20: Hill Climbing and N-Grams.
RADHA-KRISHNA BALLA 19 FEBRUARY, 2009 UCT for Tactical Assault Battles in Real-Time Strategy Games.
Adaptive Reinforcement Learning Agents in RTS Games Eric Kok.
Designing Intelligence Logical and Artificial Intelligence in Games Lecture 2.
Reinforcement Learning Introduction Passive Reinforcement Learning Temporal Difference Learning Active Reinforcement Learning Applications Summary.
Evolutionary Computing Systems Lab (ECSL), University of Nevada, Reno 1 Authors : Siming Liu, Christopher Ballinger, Sushil Louis
An Efficient Algorithm for Incremental Update of Concept space
Done Done Course Overview What is AI? What are the Major Challenges?
Higher National 6 Badminton
Reinforcement learning (Chapter 21)
Machine Learning in Computer Games
CAP 5636 – Advanced Artificial Intelligence
Self-Managed Systems: an Architectural Challenge
Reinforcement Learning (2)
Reinforcement Learning (2)
Presentation transcript:

Machine Learning in Computer Games Learning in Computer Games By: Marc Ponsen

2 Game AI: The Last Frontier “Progress in graphics and sound has slowed in recent years… Now, more than ever, good game play is at the forefront and AI is one of the most critical components (Rabin 2004).” “… Interactive computer games provide a rich environment for incremental research on human- level AI… Populating games with realistic, human- level characters will lead to fun, challenging games with great game play (Laird 2000).”

3 Why Learning of Game AI? The process of learning in games generally implies the adaptation of behavior for opponent players in order to improve performance Self-correction  Automatically fixing exploits Creativity  Responding intelligently to new situations Scalability  Better entertainment for strong players  Better entertainment for weak players

4 Online – during gameplay  Adapt to player tactics  Avoid repetition of mistakes  Requirements: computationally cheap, effective, robust, fast learning (Spronck 2004) Offline - before the game is released  Devise new tactics  Discover exploits Offline vs. Online Learning

5 Some Machine Learning Techniques

6 Overview Reinforcement Learning (RL)  Introduction to RL  RL application: Dynamic Scripting  Demo Wargus Evolutionary Algorithms (EA)  Introduction to EA  EA application: EA in Stratagus/Wargus

7 Introduction to Reinforcement Learning Techniques Framework based on punishments and rewards Maximize the frequency of rewards Minimize the frequency of punishments RL is popular research area because:  RL can solve wide variety of complex problems  RL will find close to optimal solution  RL learns as it interacts with the environment

8 How to provide Punishments & Rewards Weight adaptation function based on fitness score(s) Lookup tables

9 When to provide Punishments & Rewards Reward when AI achieves objective or the opponent finds itself in a state where it can’t achieve its objective Reward when AI does something to increase the chance of achieving objective (guided rewards) Punish when AI does something to decrease the chance of achieving objective (guided negative rewards) Using both overall and guided (negative) rewards, speeds up the learning process

10 RL application: Dynamic Scripting Dynamic Scripting (DS) is an online learning technique inspired by RL Original implementation of DS (Spronck 2004) in the Computer RolePlaying Game NeverWinter Nights ©

11 Dynamic Scripting Rulebase A Rulebase B Script A Script B Combat generate script scripted control human control human control weight updates team controlled by human player team controlled by computer A B

12 Dynamic Scripting and Requirements Computationally Cheap - Script generation and weight updates once per encounter Effective - Rules are manually designed Robust - Reward/penalty system Fast Learning – Experiments showed that DS is able to adapt fast to an unchanging tactic

13 Wargus: A Real-Time Strategy Game Complex: large state and decision space!

14 Dynamic Scripting in Wargus Different rulebases for different game states State transition on constructing a building that allows new units or new research

15 Domain Knowledge in Wargus Abstraction of the state space States in Wargus are manually predefined and represent game phases that inform the AI on the possible tactics during a game The possible tactics during a game mainly depend on available units and technology The availability of units and technology depends on the buildings the player possesses Therefore, the utility of tactics depends on the available buildings

16 A library of tactics for each state Tactics are action sequences consisting of 1 or more game actions (e.g., building, combat, research etc.) Domain Knowledge in Wargus Abstraction of the decision space Construct City Center Train 4 workers Defend with 1 Soldier Construct Blacksmith Research better Weapons Attack with 2 Soldiers Construct Keep Train 30 workers Defend with 1 Knight - Attack with 10 Knights Research magic spell Defend with 2 Mages State 1 Knowledge base State n Knowledge base State 20 Knowledge base … … Construct Castle Train 30 workers Attack with 10 Knights Research magic spell Defend with 2 Mages Construct Guard tower

17 State abstraction Domain Knowledge in Wargus Decision abstraction Dynamic Scripting learns to win efficiently against static opponents! (Ponsen et al. 2004) complex

18 Rules in Rulebases 12 Build rules 9 Research rules 4 Economy rules 25 Combat rules AiNeed(AiBarracks) AiResearch(AiUpgradeArmor1) AiNeed(AiWorker) AiForce(1, {AiSoldier, 9}) AiWaitForce(1) AiAttackWithForce(1)

19 Tactics Two `balanced’ tactics  Small Balanced Land Attack (SBLA)  Large Balanced Land Attack (LBLA) Two `rush’ tactics  Soldier Rush (SR)  Knight Rush (KR)

20 Dynamic Scripting Test Dynamic player (using dynamic scripting) plays 100 consecutive games against static player Randomisation Turning Point (RTP): First game that dynamic player outperforms static player with 90% probability according to a randomisation test (Cohen, 1995)

21 Dynamic Scripting RTP Results TacticTestsLowHighAvg.Med.>100Won SBLA LBLA SR KR Dynamic Scripting WORKS! It adapts efficiently against SBLA and LBLA Dynamic Scripting is unable to adapt to the optimized tactics SR and KR

22 Wargus Demo

23 Conclusions Dynamic scripting can be successfully implemented in (commercial) CRPG & RTS games

24 References Marc J.V. Ponsen, Héctor Muñoz-Avila, Pieter Spronck and David W. Aha. Automatically Acquiring Domain Knowledge For Adaptive Game AI Using Evolutionary Learning. IAAI-05. Spronck, P., I. Sprinkhuizen-Kuyper, and E. Postma. 2004a. “Online Adaptation of Game Opponent AI with Dynamic Scripting.” Sweetser, P. (2002). Current AI in Games: A review Manslow. “Learning and Adaptation” & “Using reinforcement learning to Solve AI Control Problems” Laird, J.E “Human-Level AI's Killer Application: Computer Game AI.” Ponsen, M. Spronck. P “Improving Adaptive AI with Evolutionary Learning”