Case-Based Planner Platform for RTS Games

20
CASE-BASED PLANNER PLATFORM FOR RTS GAMES An Introduction Abdelrahman Al-Ogail Ahmed Atta

description

Case-Based Planner Platform for RTS Games. Abdelrahman Al- Ogail Ahmed Atta. An Introduction. Agenda. Case Representation. Santiago Platform. David W. Aha. Case Representation. Case. Plan. Goal. State. Actions. Subgoal. Case = ( Goal , State , Plan, Performance). - PowerPoint PPT Presentation

Transcript of Case-Based Planner Platform for RTS Games

Page 1: Case-Based Planner Platform for RTS Games

CASE-BASED PLANNER PLATFORM FOR RTS GAMES

An Introduction

Abdelrahman Al-OgailAhmed Atta

Page 2: Case-Based Planner Platform for RTS Games

AGENDA

Case Representation. Santiago Platform. David W. Aha.

Page 3: Case-Based Planner Platform for RTS Games

CASE REPRESENTATION

Case

Plan Goal State

Actions Subgoal

Case = ( Goal , State , Plan, Performance)

Page 4: Case-Based Planner Platform for RTS Games

CASE REPRESENTATION

  Example of a caseGoal:

ResourceGoal(Gold, MaxInfluence, 10)State:

Number of gold minesDistance between gold mines and nearest gold mine storerNumber of free or useless peons

Plan:Train(3, peon)Assign(3, peons, GoldMiner)Build(Farm)Build(GoldMineCollector, 200)

Performance:Number of gold collected

Page 5: Case-Based Planner Platform for RTS Games

CBP - CATAbstract

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.

Page 6: Case-Based Planner Platform for RTS Games

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.

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

Page 7: Case-Based Planner Platform for RTS Games

CBP - CAT- 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.

Page 8: Case-Based Planner Platform for RTS Games

CBP - CAT We estimate this 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.

Page 9: Case-Based Planner Platform for RTS Games

CBP - CAT

Page 10: Case-Based Planner Platform for RTS Games

CBP - CAT

Page 11: Case-Based Planner Platform for RTS Games

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.

Page 12: Case-Based Planner Platform for RTS Games

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.

Page 13: Case-Based Planner Platform for RTS Games

CBP - CAT Then after applying the case we evaluate by:

Page 14: Case-Based Planner Platform for RTS Games

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

Page 15: Case-Based Planner Platform for RTS Games

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:

Page 16: Case-Based Planner Platform for RTS Games

CBP - DARMOK

Game State best-first greedy hill-

climbing algorithm shallow features

Game state Shallow features

valuesSituatio

n

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- DEFINE THE CURRENT SITUATION

Page 17: Case-Based Planner Platform for RTS Games

CBP - DARMOK

2- RETURN 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

Page 18: Case-Based Planner Platform for RTS Games

CBP - DARMOK3- 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).

Page 19: Case-Based Planner Platform for RTS Games

CBP - DARMOK

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

Page 20: Case-Based Planner Platform for RTS Games

CBP - DARMOK

Shallow FeaturesSome features used to define the currentgame situation.

Deep featuresSome features used to discriminate betweensome cases.

SHALLOW FEATURES VS DEEP FEATURES