SlideShare a Scribd company logo
1 of 21
Case-Based Planner Platform for RTS Games An Introduction Abdelrahman Al-Ogail Ahmed Atta
Agenda Case Representation. David W. Aha Platform. Santiago Platform.
Case Representation Case = ( Goal , State , Plan, Performance)
Case Representation   Example of a case Goal: ResourceGoal(Gold, MaxInfluence) State: 	Number of gold mines 	Distance between gold mines and nearest gold mine storer 	Number of free or useless peons Plan: 	Train(3, peon) 	Assign(3, peons, GoldMiner) 	Build(Farm) 	Build(GoldMineCollector, 200) Performance: 	Number of gold collected in 1 minute
CBP – CAT Abstract The Case-Based Tactician (CAT) system, created by Aha, Molineaux, and Ponsen (2005), uses case-based reasoning to learn to win the real-time strategy game Wargus. Previous work has shown CAT’s ability to defeat a randomly selected opponent from a set against which it has trained. We now focus on the task of defeating a selected opponent while training on others. We describe CAT’s algorithm and report its cross-validation performance against a set of Wargus opponents.
CBP - CAT - Spronk and Ponsen developed a genetic algorithm and a technique called dynamic scripting to learn plans spanning the entire game which win against fixed opponent. ,[object Object]
RTS Games concerns on: military combat, exploration, economic development, research advancement, limited diplomacy.,[object Object]
Building Static Lattic.
Set of tactics in every building state.
Game State.Winning (i.e., by destroying all the enemy units and buildings) requires managing three key resources: buildings, the workforce, and an army. The decision space is the set of possible actions that can be executed at a particular moment
CBP - CAT We estimate this (action space) as O(2W(A*P) +2T(D+S) + B(R+C)),  Where: W is the current number of workers. A is the number of assignments workers can perform (e.g., create a building, gather gold) P is the average number of workplaces. T is the number of troops (fighters plus workers). D is the average number of directions that a unit can move. S is the choice of troop’s stance (i.e., stand, patrol, attack). B is the number of buildings. R is the average choice of research objectives at a building. C is the average choice of units to create at a building.
CBP - CAT Game State Variables
CBP - CAT
CBP - CAT Idea of breaking game into periods in order to current available buildings. Building state is time between the constructions of such building to the time the next is built. Building state defines the set of actions available to the player at any one time. In contrast, CAT performs no adaptation during reuse, but does perform case acquisition. Also, CAT focuses on winning a game rather than on performing a subtask.
CBP - CAT CAT retrieves cases when a new state in the lattice is entered. The similarity between a stored case C and the current game state S is defined as: SimC, S = (CPerformance/dist(CDescription, S)) - dist(CDescription, S) where dist() is the (unweighted, unnormalized) Euclidean distance between two cases for the eight features. However, to gain experience with all tactics in a state, case retrieval is not performed until each available tactic at that state is selected e times, where e is CAT’s exploration parameter. During exploration, CAT randomly retrieves one of the least frequently used tactics for reuse. Exploration also takes place whenever the highest Performance among the k-nearest neighbors is below 0.5.
CBP - CAT Then after applying the case we evaluate by:
CBP - CAT Evaluation yields the Performance of a case’s Tactic, which is measured at both a local and global level. That is, CAT records the WARGUS game score for both the player and opponent at the start of each BuildingState and at the game’s end, which occurs when one player eliminates all of the other’s units and buildings. In retaining C’ if we found C with same <Description, Tactic> then we update it. Otherwise create new case
CBP - Darmok Darmok starts the execution with the initial goal of “WinWargus”. The system Retriever will try to return a plan to satisfy this goal by going on the following 4 steps:
CBP - Darmok 1- Define the current Situation Game State  best-first greedy hill-climbing algorithm  shallow features  a Example of extracted shallow features: lumber (number of trees in the map), food (amount of food), gold (amount of gold of the player), peasants (number of peasants) and units (number of units the player has) Game state   Shallow features values Situation b In this example , According to the values of these features we predict that the current situation is BEGINNING
CBP - Darmok 2- Return a set of cases related to the current situation  Set of cases Case base  Situation Returns all cases which have Situation = BEGINNING , and Goal = WINWARGUS
CBP - Darmok 3- determining discriminate features  Set of cases  Deep features a feature selection algorithm  Example of extracted Deep features: ,[object Object]

More Related Content

What's hot

A compact zero knowledge proof to restrict message space in homomorphic encry...
A compact zero knowledge proof to restrict message space in homomorphic encry...A compact zero knowledge proof to restrict message space in homomorphic encry...
A compact zero knowledge proof to restrict message space in homomorphic encry...MITSUNARI Shigeo
 
ktruss-short
ktruss-shortktruss-short
ktruss-shortJia Wang
 
Program Derivation of Operations in Finite Fields of Prime Order
Program Derivation of Operations in Finite Fields of Prime OrderProgram Derivation of Operations in Finite Fields of Prime Order
Program Derivation of Operations in Finite Fields of Prime OrderCharles Southerland
 

What's hot (7)

Introduction to Data Oriented Design
Introduction to Data Oriented DesignIntroduction to Data Oriented Design
Introduction to Data Oriented Design
 
R and cpp
R and cppR and cpp
R and cpp
 
A compact zero knowledge proof to restrict message space in homomorphic encry...
A compact zero knowledge proof to restrict message space in homomorphic encry...A compact zero knowledge proof to restrict message space in homomorphic encry...
A compact zero knowledge proof to restrict message space in homomorphic encry...
 
ktruss-short
ktruss-shortktruss-short
ktruss-short
 
A Step Towards Data Orientation
A Step Towards Data OrientationA Step Towards Data Orientation
A Step Towards Data Orientation
 
CellCoverage
CellCoverageCellCoverage
CellCoverage
 
Program Derivation of Operations in Finite Fields of Prime Order
Program Derivation of Operations in Finite Fields of Prime OrderProgram Derivation of Operations in Finite Fields of Prime Order
Program Derivation of Operations in Finite Fields of Prime Order
 

Viewers also liked

Generación automática de contenido en 5 minutos
Generación automática de contenido en 5 minutosGeneración automática de contenido en 5 minutos
Generación automática de contenido en 5 minutoskeldon_spain
 
PROCEDURAL CONTENT GENERATION FOR MAZE- GAME
PROCEDURAL CONTENT GENERATION FOR MAZE- GAMEPROCEDURAL CONTENT GENERATION FOR MAZE- GAME
PROCEDURAL CONTENT GENERATION FOR MAZE- GAMEFawzia ShamsEddin
 
Procedural map generation for a RTS game
Procedural map generation for a RTS gameProcedural map generation for a RTS game
Procedural map generation for a RTS gamekeldon_spain
 
Game Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content GenerationGame Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content GenerationNick Pruehs
 
Game Programming 04 - Style & Design Principles
Game Programming 04 - Style & Design PrinciplesGame Programming 04 - Style & Design Principles
Game Programming 04 - Style & Design PrinciplesNick Pruehs
 
Game Programming 03 - Git Flow
Game Programming 03 - Git FlowGame Programming 03 - Git Flow
Game Programming 03 - Git FlowNick Pruehs
 
Game Programming 05 - Development Tools
Game Programming 05 - Development ToolsGame Programming 05 - Development Tools
Game Programming 05 - Development ToolsNick Pruehs
 
Game Models - A Different Approach
Game Models - A Different ApproachGame Models - A Different Approach
Game Models - A Different ApproachNick Pruehs
 
Style & Design Principles 03 - Component-Based Entity Systems
Style & Design Principles 03 - Component-Based Entity SystemsStyle & Design Principles 03 - Component-Based Entity Systems
Style & Design Principles 03 - Component-Based Entity SystemsNick Pruehs
 
OGDC 2014: Component based entity system mobile game development
OGDC 2014: Component based entity system mobile game developmentOGDC 2014: Component based entity system mobile game development
OGDC 2014: Component based entity system mobile game developmentGameLandVN
 

Viewers also liked (11)

Generación automática de contenido en 5 minutos
Generación automática de contenido en 5 minutosGeneración automática de contenido en 5 minutos
Generación automática de contenido en 5 minutos
 
PROCEDURAL CONTENT GENERATION FOR MAZE- GAME
PROCEDURAL CONTENT GENERATION FOR MAZE- GAMEPROCEDURAL CONTENT GENERATION FOR MAZE- GAME
PROCEDURAL CONTENT GENERATION FOR MAZE- GAME
 
Procedural map generation for a RTS game
Procedural map generation for a RTS gameProcedural map generation for a RTS game
Procedural map generation for a RTS game
 
Game Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content GenerationGame Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content Generation
 
Game Programming 04 - Style & Design Principles
Game Programming 04 - Style & Design PrinciplesGame Programming 04 - Style & Design Principles
Game Programming 04 - Style & Design Principles
 
Game Programming 03 - Git Flow
Game Programming 03 - Git FlowGame Programming 03 - Git Flow
Game Programming 03 - Git Flow
 
Game Programming 05 - Development Tools
Game Programming 05 - Development ToolsGame Programming 05 - Development Tools
Game Programming 05 - Development Tools
 
Game Models - A Different Approach
Game Models - A Different ApproachGame Models - A Different Approach
Game Models - A Different Approach
 
Style & Design Principles 03 - Component-Based Entity Systems
Style & Design Principles 03 - Component-Based Entity SystemsStyle & Design Principles 03 - Component-Based Entity Systems
Style & Design Principles 03 - Component-Based Entity Systems
 
RTS introduction
RTS introductionRTS introduction
RTS introduction
 
OGDC 2014: Component based entity system mobile game development
OGDC 2014: Component based entity system mobile game developmentOGDC 2014: Component based entity system mobile game development
OGDC 2014: Component based entity system mobile game development
 

Similar to Case-Based Planner Platform for RTS Games

Situation Assessment For Case Retrieval
Situation Assessment For Case RetrievalSituation Assessment For Case Retrieval
Situation Assessment For Case RetrievalAhmadAtta
 
Building a Scalable Distributed Stats Infrastructure with Storm and KairosDB
Building a Scalable Distributed Stats Infrastructure with Storm and KairosDBBuilding a Scalable Distributed Stats Infrastructure with Storm and KairosDB
Building a Scalable Distributed Stats Infrastructure with Storm and KairosDBCody Ray
 
Kafka Streams: Revisiting the decisions of the past (How I could have made it...
Kafka Streams: Revisiting the decisions of the past (How I could have made it...Kafka Streams: Revisiting the decisions of the past (How I could have made it...
Kafka Streams: Revisiting the decisions of the past (How I could have made it...confluent
 
Pepe Vila - Cache and Syphilis [rooted2019]
Pepe Vila - Cache and Syphilis [rooted2019]Pepe Vila - Cache and Syphilis [rooted2019]
Pepe Vila - Cache and Syphilis [rooted2019]RootedCON
 
Adversarial search
Adversarial searchAdversarial search
Adversarial searchpramod naik
 
Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Nick Pruehs
 
R Spatial Analysis using SP
R Spatial Analysis using SPR Spatial Analysis using SP
R Spatial Analysis using SPtjagger
 
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...J On The Beach
 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptSabrinaShanta2
 
Killing Bugs with Pry
Killing Bugs with PryKilling Bugs with Pry
Killing Bugs with PryJason Carter
 
Flink Forward SF 2017: Stefan Richter - Improvements for large state and reco...
Flink Forward SF 2017: Stefan Richter - Improvements for large state and reco...Flink Forward SF 2017: Stefan Richter - Improvements for large state and reco...
Flink Forward SF 2017: Stefan Richter - Improvements for large state and reco...Flink Forward
 
mcp-bandits.pptx
mcp-bandits.pptxmcp-bandits.pptx
mcp-bandits.pptxBlackrider9
 
Drd secr final1_3
Drd secr final1_3Drd secr final1_3
Drd secr final1_3Devexperts
 
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...DevGAMM Conference
 
Camera And Email
Camera And EmailCamera And Email
Camera And EmailSV.CO
 
Applying Blackboard Systems to First Person Shooters
Applying Blackboard Systems to First Person ShootersApplying Blackboard Systems to First Person Shooters
Applying Blackboard Systems to First Person Shootershbbalfred
 
Powered by Python - PyCon Germany 2016
Powered by Python - PyCon Germany 2016Powered by Python - PyCon Germany 2016
Powered by Python - PyCon Germany 2016Steffen Wenz
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 7 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 7 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 7 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 7 (Preview)noorcon
 
BOS K8S Meetup - Finetuning LLama 2 Model on GKE.pdf
BOS K8S Meetup - Finetuning LLama 2 Model on GKE.pdfBOS K8S Meetup - Finetuning LLama 2 Model on GKE.pdf
BOS K8S Meetup - Finetuning LLama 2 Model on GKE.pdfMichaelOLeary82
 

Similar to Case-Based Planner Platform for RTS Games (20)

Situation Assessment For Case Retrieval
Situation Assessment For Case RetrievalSituation Assessment For Case Retrieval
Situation Assessment For Case Retrieval
 
Building a Scalable Distributed Stats Infrastructure with Storm and KairosDB
Building a Scalable Distributed Stats Infrastructure with Storm and KairosDBBuilding a Scalable Distributed Stats Infrastructure with Storm and KairosDB
Building a Scalable Distributed Stats Infrastructure with Storm and KairosDB
 
Kafka Streams: Revisiting the decisions of the past (How I could have made it...
Kafka Streams: Revisiting the decisions of the past (How I could have made it...Kafka Streams: Revisiting the decisions of the past (How I could have made it...
Kafka Streams: Revisiting the decisions of the past (How I could have made it...
 
Pepe Vila - Cache and Syphilis [rooted2019]
Pepe Vila - Cache and Syphilis [rooted2019]Pepe Vila - Cache and Syphilis [rooted2019]
Pepe Vila - Cache and Syphilis [rooted2019]
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3
 
R Spatial Analysis using SP
R Spatial Analysis using SPR Spatial Analysis using SP
R Spatial Analysis using SP
 
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).ppt
 
Killing Bugs with Pry
Killing Bugs with PryKilling Bugs with Pry
Killing Bugs with Pry
 
Flink Forward SF 2017: Stefan Richter - Improvements for large state and reco...
Flink Forward SF 2017: Stefan Richter - Improvements for large state and reco...Flink Forward SF 2017: Stefan Richter - Improvements for large state and reco...
Flink Forward SF 2017: Stefan Richter - Improvements for large state and reco...
 
Xgboost
XgboostXgboost
Xgboost
 
mcp-bandits.pptx
mcp-bandits.pptxmcp-bandits.pptx
mcp-bandits.pptx
 
Drd secr final1_3
Drd secr final1_3Drd secr final1_3
Drd secr final1_3
 
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
 
Camera And Email
Camera And EmailCamera And Email
Camera And Email
 
Applying Blackboard Systems to First Person Shooters
Applying Blackboard Systems to First Person ShootersApplying Blackboard Systems to First Person Shooters
Applying Blackboard Systems to First Person Shooters
 
Powered by Python - PyCon Germany 2016
Powered by Python - PyCon Germany 2016Powered by Python - PyCon Germany 2016
Powered by Python - PyCon Germany 2016
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 7 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 7 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 7 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 7 (Preview)
 
BOS K8S Meetup - Finetuning LLama 2 Model on GKE.pdf
BOS K8S Meetup - Finetuning LLama 2 Model on GKE.pdfBOS K8S Meetup - Finetuning LLama 2 Model on GKE.pdf
BOS K8S Meetup - Finetuning LLama 2 Model on GKE.pdf
 

Case-Based Planner Platform for RTS Games

  • 1. Case-Based Planner Platform for RTS Games An Introduction Abdelrahman Al-Ogail Ahmed Atta
  • 2. Agenda Case Representation. David W. Aha Platform. Santiago Platform.
  • 3. Case Representation Case = ( Goal , State , Plan, Performance)
  • 4. Case Representation   Example of a case Goal: ResourceGoal(Gold, MaxInfluence) State: Number of gold mines Distance between gold mines and nearest gold mine storer Number of free or useless peons Plan: Train(3, peon) Assign(3, peons, GoldMiner) Build(Farm) Build(GoldMineCollector, 200) Performance: Number of gold collected in 1 minute
  • 5. CBP – CAT Abstract The Case-Based Tactician (CAT) system, created by Aha, Molineaux, and Ponsen (2005), uses case-based reasoning to learn to win the real-time strategy game Wargus. Previous work has shown CAT’s ability to defeat a randomly selected opponent from a set against which it has trained. We now focus on the task of defeating a selected opponent while training on others. We describe CAT’s algorithm and report its cross-validation performance against a set of Wargus opponents.
  • 6.
  • 7.
  • 9. Set of tactics in every building state.
  • 10. Game State.Winning (i.e., by destroying all the enemy units and buildings) requires managing three key resources: buildings, the workforce, and an army. The decision space is the set of possible actions that can be executed at a particular moment
  • 11. CBP - CAT We estimate this (action space) as O(2W(A*P) +2T(D+S) + B(R+C)), Where: W is the current number of workers. A is the number of assignments workers can perform (e.g., create a building, gather gold) P is the average number of workplaces. T is the number of troops (fighters plus workers). D is the average number of directions that a unit can move. S is the choice of troop’s stance (i.e., stand, patrol, attack). B is the number of buildings. R is the average choice of research objectives at a building. C is the average choice of units to create at a building.
  • 12. CBP - CAT Game State Variables
  • 14. CBP - CAT Idea of breaking game into periods in order to current available buildings. Building state is time between the constructions of such building to the time the next is built. Building state defines the set of actions available to the player at any one time. In contrast, CAT performs no adaptation during reuse, but does perform case acquisition. Also, CAT focuses on winning a game rather than on performing a subtask.
  • 15. CBP - CAT CAT retrieves cases when a new state in the lattice is entered. The similarity between a stored case C and the current game state S is defined as: SimC, S = (CPerformance/dist(CDescription, S)) - dist(CDescription, S) where dist() is the (unweighted, unnormalized) Euclidean distance between two cases for the eight features. However, to gain experience with all tactics in a state, case retrieval is not performed until each available tactic at that state is selected e times, where e is CAT’s exploration parameter. During exploration, CAT randomly retrieves one of the least frequently used tactics for reuse. Exploration also takes place whenever the highest Performance among the k-nearest neighbors is below 0.5.
  • 16. CBP - CAT Then after applying the case we evaluate by:
  • 17. CBP - CAT Evaluation yields the Performance of a case’s Tactic, which is measured at both a local and global level. That is, CAT records the WARGUS game score for both the player and opponent at the start of each BuildingState and at the game’s end, which occurs when one player eliminates all of the other’s units and buildings. In retaining C’ if we found C with same <Description, Tactic> then we update it. Otherwise create new case
  • 18. CBP - Darmok Darmok starts the execution with the initial goal of “WinWargus”. The system Retriever will try to return a plan to satisfy this goal by going on the following 4 steps:
  • 19. CBP - Darmok 1- Define the current Situation Game State best-first greedy hill-climbing algorithm shallow features a Example of extracted shallow features: lumber (number of trees in the map), food (amount of food), gold (amount of gold of the player), peasants (number of peasants) and units (number of units the player has) Game state Shallow features values Situation b In this example , According to the values of these features we predict that the current situation is BEGINNING
  • 20. CBP - Darmok 2- Return a set of cases related to the current situation Set of cases Case base Situation Returns all cases which have Situation = BEGINNING , and Goal = WINWARGUS
  • 21.
  • 22. wallbarrier- width (the width of the biggest barrier between the player and the enemy)
  • 23.
  • 24. CBP - Darmok Shallow Features VS Deep Features Shallow Features Some features used to define the current game situation. Deep features Some features used to discriminate between some cases.
  • 25. References Defeating Novel Opponents in a Real-Time Strategy Game - 2005.pdf – David W. Aha Learning to Win - Case-Based Plan Selection in a RTS Game- 2005.pdf - David W. Aha Case-Based Planning and Execution for RTS Games - 2007.pdf - Santiago Onta˜n´on Situation Assessment for Plan Retrieval in RTS Games - 2009.pdf - Santiago Onta˜n´on