Presentation is loading. Please wait.

Presentation is loading. Please wait.

C ASE -B ASED P LANNER P LATFORM FOR RTS G AMES An Introduction Abdelrahman Al-Ogail Ahmed Atta.

Similar presentations


Presentation on theme: "C ASE -B ASED P LANNER P LATFORM FOR RTS G AMES An Introduction Abdelrahman Al-Ogail Ahmed Atta."— Presentation transcript:

1 C ASE -B ASED P LANNER P LATFORM FOR RTS G AMES An Introduction Abdelrahman Al-Ogail Ahmed Atta

2 A GENDA Case Representation. Santiago Platform. David W. Aha.

3 C ASE R EPRESENTATIONCase PlanGoalState ActionsSubgoal Case = ( Goal, State, Plan, Performance)

4 C ASE R EPRESENTATION Example of a case Goal: ResourceGoal(Gold, MaxInfluence, 10) 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

5 CBP - C A T 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 CBP - C A T - 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. - CaT is the first case-based system designed to defeat an opponent that uses tactics and strategies that it has not trained against. - RTS Games concerns on: military combat, exploration, economic development, research advancement, limited diplomacy.

7 CBP - C A T - Sources: Building Static Lattic. Set of tactics in every 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.

8 CBP - C A T We estimate this as O(2 W (A*P) +2 T (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.

9 CBP - C A T

10

11 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.

12 CBP - C A T 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: Sim C, S = (C Performance /dist(C Description, S)) - dist(C Description, 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.

13 CBP - C A T Then after applying the case we evaluate by:

14 CBP - C A T 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 then we update it. Otherwise create new case

15 CBP - D ARMOK 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:

16 CBP - D ARMOK Game State best-first greedy hill- climbing algorithm shallow features Game state Shallow features valuesSituation a b 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) In this example, According to the values of these features we predict that the current situation is BEGINNING 1- D EFINE THE CURRENT S ITUATION

17 CBP - D ARMOK 2- R ETURN A SET OF CASES RELATED TO THE CURRENT SITUATION Case base Situation Set of cases Returns all cases which have Situation = BEGINNING, and Goal = WINWARGUS

18 CBP - D ARMOK 3- DETERMINING DISCRIMINATE FEATURES Set of cases a feature selection algorithm Deep features Example of extracted Deep features: ispath (a boolean feature that is true when there is a path from the player base to the enemy base) wallbarrier- width (the width of the biggest barrier between the player and the enemy) baseproximitydistance (distance between the player’s base and the enemy base).

19 CBP - D ARMOK 4- DEFINE THE MOST RELEVANT CASE Deep features normal retrieval techniques case(s) According to the values of these deep features, the retriever will determine which case is the most relevant to the current game situation

20 CBP - D ARMOK Shallow Features Some features used to define the current game situation. Deep features Some features used to discriminate between some cases. S HALLOW F EATURES VS D EEP F EATURES


Download ppt "C ASE -B ASED P LANNER P LATFORM FOR RTS G AMES An Introduction Abdelrahman Al-Ogail Ahmed Atta."

Similar presentations


Ads by Google