Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

Instituto Tecnológico y de Estudios Superiores de Monterrey

Campus Monterrey

División de Mecatrónica y Tecnologı́as de Información


Programa de Graduados

Maestrı́a en Ciencias en Sistemas Inteligentes


Propuesta de Tesis

Application of Multiagent Systems in combination with Data


Mining techniques to simulate a War environment using RTS
videogame StarCraft

por

Claudio Bernardo Rodrı́guez Rodrı́guez


A00902138

Monterrey, N.L., Noviembre de 2010


Instituto Tecnológico y de Estudios Superiores de Monterrey
Campus Monterrey

División de Mecatrónica y Tecnologı́as de Información


Programa de Graduados

Los miembros del comité de tesis recomendamos que la presente propuesta de Claudio Bernardo Rodrı́guez
Rodrı́guez sea aceptada para desarrollar el proyecto de tesis como requisito parcial para obtener el grado
académico de Maestro en Ciencias, especialidad en:

Sistemas Inteligentes

Comité de Tesis:

Dr. Leonardo Garrido L.


Asesor Principal

Por definir Por definir


Sinodal Sinodal

Dr. Ramón R. Brena P.


Director de la Maestrı́a en Sistemas
Inteligentes

Noviembre de 2010
Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3 Investigation Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
4 Justification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4.1 Convenience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4.2 Social Relevance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4.3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4.4 Where and when will it be developed? . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
5 Variable Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
6 Reach & Limitations of the Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
7 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
7.1 StarCraft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
7.2 Buildings of StarCraft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
7.3 Units of Starcraft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
7.4 Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
7.5 Graphical Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.6 Data Mining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
7.7 The StarCraft Problem & Data Mining . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.8 Multi-Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
7.9 Advanced AI applied in Videogames . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
8 Hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
9 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
9.1 Data Mining State of the Art . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
9.2 Creating a Scout Class to gather information and put it in the database . . . . . . . . 27
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
List of Figures

1 Agent’s Subsystem(Weiss, 1999) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18


2 Data Mining is just a step in a longer process . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3 Example of Data Graph Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
List of Tables

1 Variable Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Terran Buildings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 Zerg Buildings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 Protoss Buildings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5 Terran Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6 Zerg Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
7 Protoss Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
8 Representations Needed for the Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
9 Agent Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10 Minimized Example: The StarCraft Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
11 Knowledge Discovery Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
12 Characteristics of Multiagent Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
13 Key Properties of an Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
14 Gantt Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Abstract

This document presents the thesis proposal for Intelligent Systems Master Degree, in which it is pre-
tended to solve the problem of creating a real simulation of the Army environment, including departments
like Resource Control, War Tactics, Unit Control, Base Construction, and a General. To do this, the problem
has to be divided into micro problems to be approached one by one. The first micro problem it’s to prove
that multiagent systems applied in Unit Control is factible in computer resources usage (CPU and RAM)
compared to using a simple selfish agent approach for each unit. After this is one it is important to provide
data comparing the results between managing the Units through a higher level class (Lieutenant) compared
to let them create their own tactics.
1 Introduction 1

1 Introduction
Artificial Intelligence is a branch of computer science, it attempts to understand the substance
of intelligence, and produce a new intelligent machine could make reactions similar to the human
intelligence. [1]

This paper will discuss AI, algorithms, methods to reach a solution and multi agents. Agents, the
brick & mortar of AI, are simply something that perceives and acts on the environment.[2] To build a better
agent we must have a complete knowledge of the subject and of the problem that we are going to solve.
Optimizing agents gets harder the more elements we include in our problem, thus an autonomous vehicle or
an android get harder to make since modifications of the agent have to be tested real time.
Videogames on the other hand provide a full environment rich in variables and possibilities; there-
fore allowing us to build agent programs and test them from the comfort of our office. For the purpose of
this paper we will be using StarCraft, and RTS (Real Time Strategy) videogame developed by Blizzard En-
tertainment and released on 1998.[3] The game’s system requirements are minimum compared to computer’s
current technology, thus allowing us to increase the AI’s CPU usage. Though AI is being researched for
videogames it is not the same as academic AI; game AI must be designed to be suboptimal, allowing the
player to win from time to time.[4] For the purpose of this paper, game AI must not lose. StarCraft has many
competitions worldwide, such as World Cyber Games, Ongamenet Starleague, and MBCgame Starleague.
What is the proper application of a Multiagent System where each type of unit is a standalone
agent and communicates with each other to reach a common goal? The purpose is only having instances of
certain agents when they are available. Intelligent processes like planning, problem solving, decision making,
and learning methods are also part of the problem.
To develop the program, we’ll use an Application Programming Interface (API) named Brood
War; which is based in C++ language. An agent will be needed to implement the data mining algorithms.
A standalone testing of the agent will be needed to use it as an appropriate testing tool. The API will
allow the programmer to concentrate on developing solid AI by contributing with information on units and
individuals.[5] Though there are different ways to analyze the efficiency of our program, we will concentrate
mainly in testing the program in real matches; keeping control and maintaining a history of the amount of
computational resources taken by the bot is paramount.
2 Objectives 2

2 Objectives
During the investigation new objectives may arise.

• Building a multiagent system that implements techniques of agent communication by giving each unit
type its own responsibilities.

• Determine the objectives and responsibilities of each type of unit in StarCraft, along with goals and
subtasks.

• Determine the best strategies for a certain given objective (king of the hill, free for all, capture the
flag, greed and sudden death) and how the type of map affects the battle.

• Determine the importance of communication for battle success by reducing the number of units lost.

3 Investigation Questions
Every question will be investigated considering that the implementation will be in StarCraft and the
different scenarios there could be in an RTS game.

1. What are the units in StarCraft? How are they produced? What are the values?

2. What are the advantages and disadvantages of each unit type in StarCraft?

3. What is Data Mining?

4. What are multiagents?

5. How to allow agents to communicate their knowledge to other agents?

6. How to communicate tasks to subtypes of agents?

7. How to enable agents to reason and plan their actions?

8. How to collect data by every agent to a one central database that takes advantage of the best search
algorithms for data mining?

9. How to allow agents to negotiate objective based on their characteristics (power, number of units, wild
card)?

10. How to solve, plan, make decisions, and learn the next objective?

11. How to search data collected and represent the information?

12. How to reduce the data to predicate logic and then make relations between those predicates?

13. What and How to build an efficient retrieval system?

14. How to model new data to and save it to the database?

15. How to create reasoning?

16. What is the current state (2008-actual) of Artificial Intelligence in videogames?

17. Are multi agent systems and data mining implemented in defense systems nowadays?
4 Justification 3

4 Justification
4.1 Convenience
Andrew Carnegie once said ”Put all your eggs in one basket and then watch that basket,” sadly it isn’t
possible to observe an entire army every second to allocate orders and trust those orders will be carried out
perfectly in the heat of battle.
To allow the army to grow is to give each one their own responsibilities and trust in their capacity to
carry out what they must. This investigation is important to develop a structure of command in automated
warfare. By decentralizing tasks and empowering the elements with a certain amount of responsibilities then
we are less dependent on one central general.
Working in teams gives us the benefit of simultaneously making decisions and solutions were
each agent would make choices together with the rest instead of one main agent implementing solutions
sequentially.

4.2 Social Relevance


By increasing trustability in our units we will reduce the number of units lost. If we transfer this
application to a real life military application then we would have fewer lives lost.

4.3 Applications
This application can be transported to real life situations. Instead of unit types we would have real life
drones or androids performing the tasks at hand. Human issues like dishonesty, trust, respect, conflict, and
commitment present when working with teams are non-relevant in software since multiagents are instructed
to share the information.

4.4 Where and when will it be developed?


The study will be developed in C++ language software using the videogame StarCraft and the Brood
War API to obtain the methods from the videogame.[5] To run the API and the AI program a GUI named
Chaoslauncher will be implemented. Technical Specifications of the equipment used in the project will be
disclosed when the program is ready.
5 Variable Definitions 4

5 Variable Definitions

Variable Conceptual Definition Operational Definition


Victories The program will be run to collect the amount Number of Victories
of victories. The purpose is to make it undefeat-
able.
CPU The CPU regulates and integrates the opera- Usage Percentage
tions of the computer. It selects and retrieves
instructions from the main memory in proper se-
quence and interprets them so as it to activate
the other functional elements of the system at the
appropriate moment to perform their respective
operations.[6]
Memory Computer main memory in which specific con- Usage Percentage
tents can be accessed (read or written) directly
by the CPU in a very short time regardless of the
sequence in which they were recorded. [7]
Algorithms Systematic procedure that produces the an- Number of Steps to reach a solution
swer to a question or the solution of a problem
in a finite number of steps. [8]

6 Reach & Limitations of the Study


The investigation is classified as an exploratory study where there is data on the subject but not applied
to the application we need. Multi Agent Systems are systems present in applications such as: [9]

• E-Commerce.

• Management of communications networks.

• Modeling and optimization of logistic transport systems.

• Information handling over the web.

• Improving flow of air and urban traffic control.

• Videogames.

• Optimization of supply chain management.

• Optimization of manufacturing and production shop-floor scheduling.

The key factor of the applications were Multiagents are implemented is that in every application
there is inherent distribution. In our application there is as well inherent distribution of tasks; each unit
type in StarCraft has its own recommendations and alterations that are affected not only by space, but also
by time and opponents moves. Every unit can be treated as a centralized problem since tactics can differ,
for example, a group of Zerg Guardians can’t counterattack an enemy’s air unit; In case they encounter this
problem they should follow a certain strategy that only applies to that type of unit.
7 Background 5

7 Background
The art of war,then, is governed by five constant factors, . . . The Moral Law, Heaven, Earth,
The Commander and Method and Discipline[10]

Fortunately, amongst the benefits of using Technology and Artificial Intelligence, aspects such as
the Moral Law and Heaven do not apply to our study. We will focus mainly of taking advantage of the
battlefield (Earth), use the unit’s stats to calculate the possible winning outcome (Commander), and we will
micro manage each unit type group instead than each unit (Method and Discipline).

7.1 StarCraft
StarCraft is a real time strategy videogame developed by Blizzard entertainment. The user rep-
resents the military leader of one of three races: Terran (Humans), Zerg, and Protoss. Each unit has its
unique type of buildings and units.
In order to make units, each player must first have the building appropriate to train that specific
type of unit. To build units and buildings you need only two types of resources: mineral deposits and vespene
gas.
PC Requirements:
CPU: Pentium 90 MHz
MEMORY: 16MB RAM
HDD: 80 MB

7.2 Buildings of StarCraft


When building the base, the user must consider which units he needs to maximize the use of his
resources. Buildings have different costs and applications, some buildings are only useful for defense, while
others are only useful to increase the unit’s stats. When playing a game where the whole building tree is
researchable, the difference between victory and loss sometimes depends on the minimal of details, which is
why these stats increasers are important. Each of these stats increasers should be considered as an equivalent
of army resistance training.
7 Background 6
7 Background 7
7 Background 8

.
7 Background 9
7 Background 10

.
7 Background 11
7 Background 12

7.3 Units of Starcraft


Blizzard[3] is kind enough to provide the stats for every unit in the game. These stats must be
considered when building the agents for each. It is known that each unit has advantages over other (for
example marines can attack from a distance while zerglings and zealots must get in extremely close range).
For the purpose of this paper we will be using an identifier to each of our unit agent.
I.E. Unit Agent = Marine Liutenant
Each of the agents is in charge of micromanaging the units, like reallocating wounded units to the
rear of the battalion. Another example is making good battle decisions; if the Zergling Lieutenant has only
one Zergling at his disposal then he should ask the unit production manager (another agent) to research
more units, but if there are not enough resources then the production manager should get in touch with the
resource manager to allocate more resources for the production manager.

Legends:
Cool is the time between the ending of the attack and the beginning of another.
Attack Mod is the Damage modifier for each level of upgrade.
Gnd is Ground attack for units with split Air/Ground Weapon Systems.
Air is Air attack for units with split Air/Ground Weapon Systems.
Upg is a stat change after getting an upgrade.
Attacks:
E indicates Explosive Attack (50% damage to Small Units 75% damage to Medium Units, full
damage to Large Units).
C indicates Concussive/Plasma damage Attack (50% damage to Medium Units 25% damage to
Large Units).
S indicates Splash damage, which affects all units in the blast area.
Notes:
B = Biological
D = Unit can Detect cloaked/burrowed units
SA = Unit has one or more Special Abilities (is a spell-caster)
T = Transport
W = Worker

[3]
7 Background 13
7 Background 14
7 Background 15
7 Background 16

-
7 Background 17
7 Background 18

7.4 Agents

Agent’s Subsystem(Weiss, 1999)

An agent in this case is going to be a virtual entity that is going to be capable of acting in
the environment. For the purpose of this investigation, our agent must have the next definition:

• He’s capable of perceiving part of the environment (limited by fog of war).

• He’s capable of acting on the environment.

• He’s capable of communicating with other agents.

• He’s driven by a group of functions and objectives.

• He possesses resources of his own.

• He must have only a partial representation of environment (no agent can handle everything).

• He has a unique set of skills and can offer things no other agent has.

• His behavior must tend into satisfying objectives, depending on the rest of the agent’s response.

Depending on the agent in the game is the level of learning we want to apply. The classification of
environment properties would be[2]:

• Inaccessible (Each agent can only access a certain level of information)

• Deterministic (Each agent’s actions have a simple, certified effect on the environment)

• Non-episodic (Performance of the agent is independent of what happens, only depends on his actions)

• Dynamic (The environment is constantly changing regardless of the agent’s actions)

• Continuous (The are no finite number of actions)


7 Background 19

7.5 Graphical Representation


To represent our environment, the task list, and each agents a graphical diagram is needed.

Number Diagrams Descriptions


1. Activity Diagrams General Strategy, Base Contruction Planer, Resource Control,
War Tactician, Scouting Department, Database and each unit
type’s lieutenant.
2. Sequence Diagrams How objects are going to interact with each other.
3. Collaboration Dia- Agents interactions, how are they going to be possible.
grams
4. Class Diagram One class for each and every Agent depicted in the Activity Dia-
grams.
5. State Transition How will the class change from one state to another, what is the
Diagrams best approach to attack a level with so many environments?

Representations Needed for the Solution

Agent Type Percepts Actions Goals


Data Mining:
State Information Create Units
War Tactician Enemy’s Units Send Unit Destroy the enemy
Resource Information Request Unit
Friendly Units
Move
Marine Lieutenant Vision Range Destroy Enemy’s Units
Attack
Find Enemies
Find Minerals
Scout Vision Move
Find Trajectores
Data Mining:
Base Information Request Minerals Expand Base
Base Builder
Resource Information Build Respond Reuqest
Units
Data Mining: Obtain Resources
Resource Manager Requests from Agents Harvest Respond Request
Units
Based on
General Data Mining: State Request Action
Game’s Objective

Agent Examples
7 Background 20

7.6 Data Mining


The extraction of hidden predictive information from large databases, is a powerful new
technology with great potential to help companies focus on the most important information in
their data warehouses.[11]

Communication is a crucial part for reaching objectives in a team. One of the advantages when
dealing with machines is that as long as the logic is well implemented the Agents will work on it (and as
long as the pay is good).

Data Mining is just a step in a longer process


7 Background 21

7.7 The StarCraft Problem & Data Mining


Since we are trea Miningch object with its own properties, our variables would be those stats that
could get increased (which are visible to the user when playing the game), also the number of units the enemy
has, the number of buildings, and the amount of resources in the battlefied. For this type of information a
good approach would be an Object-Relational database[12].
An Object Relational Databases considers each entity as an object. Each object could be the units,
the buildings, and the resources; Each one has the following:

• Variables that describe them profoundly.

• Message that each object has to communicate with the database system.

• Methods where each hold the code to implement those messages, this ones are provided by the Brood
War API.

Subclasses can be made to a Unit Class, then the Subclass Marine Unit could inherit the variables
pertaining to Unit. Currently we have the information on our units (and buildings), information on the
enemy, and the objective.
Using the example provided by Witten[13] the Data Mining concern will be represented as The
StarCraft Problem; It will consist of a dataset that could be encountered in any given game. The informa-
tion we’ll have on hostile forces depends entirely on the information collected by scouts and our forces. Intel
collection from our forces will depend on certain units (such as Ghosts, Wraiths, and ComSat Stations).
Suppose our Army of Agents is pitted against a Zerg Force, and then our information collected will look
something like this.

Race Unit Unit Amount Unit Stats


Zerg Zerg Drone 12
Zerg Ultralisk 3
Zerg Hydralisk 12
Zerg Mutalisk 6
Zerg Zergling 20 Unit Stats are in their respective Section
Protoss Zealot 7
Protoss Photon Cannon 3
Protoss Dragoon 4
Protoss Carrier 1

Minimized Example: The StarCraft Problem

This example is minimal because it doesn’t include each unit’s statistics and because it does not
include the hostile buildings. After this information is collected it is converted to rules:
If Ultralisk > 0 then send Air Units else send ground units or send > 45 Firebats (Fully Upgraded)
If Mutalisk > 1 then send Marines
1
If unit behind tree = 2 damage
This is a basic example of a decision list; it is a set of rules that is meant to be applied one after
another. The rules (either classification or association) rules must always be true. Since there is a lot of
math data to be included in the problem it allows the use of Statistical analysis. Predictions can be made
based on resources and the hostile unit we are facing, for example, if we are fighting a zergling with a firebat
7 Background 22

our success rate is higher than doing it with a marine. The purpose of data mining in this case is let our
computer decide which unit to send based on our base information, our resource capability, and the hostile
unit(s).
Making predictions automated in Data Warehouses is an emerging science[11], which is done by
applying advanced algorithms to our problem. He lists the most commmon techniques in Data Mining
are: Artificial Neural Networks, Decision Trees, Genetic Algorithms, Nearest Neighbor Method, and Rule
Induction.
To make predictions possible it is necessary to implement a system of algorithms the perform the
following:

1. Definition of the goals of the end user and the understanding of possible applications.
2. Creation of a new database or a subset of the current database on which to perform the algorithm.
3. Cleaning and pre-processing of the new database.

4. Transformation of the data in order to reduce the number of variables in the database and to produce
results more meaningful to the user.
5. Selection of the data mining method (clustering, classification, regression).
6. Selection of the data mining algorithm.

7. Data mining - finding interesting patterns in the database.


8. Interpretation - feedback of the results into the engine.
9. Consolidation of the result and documentation.

Knowledge Discovery Systems[14]


7 Background 23

7.8 Multi-Agents
The types of Agents are: Simple Reflex Agents with Stimulus, Simple Reflex Agents with State, Goal Based
Agents and Utility Based Agents. The Communication between them is capable thanks to:

• Propose a course of Action.

• Accept a course of Action.

• Reject a course of Action.

• Retract a course of Action.

• Disagree with a proposed course of action.

• Counterpropose a course of action.

To communicate, Agent 1 proposes a course of action to Agent 2, as in real life, Agent 2 will
respond to this proposal either with agreement, couterproposal or disagreement. Motivation to make the
Agents do the objectives we want them to.

Characteristics of Multiagent Environments[9]


Multiagent environments provide an infrastructure specifying communication and interaction protocols.
Multiagent environments are typically open and have no centralized designer.
Multiagent environments are typically open and have no centralized designer.

The starting point to the problem is defining a distributed constraint satisfaction problem[15]. To
solve a constraint satisfaction problem we apply a constraint satisfaction algorithm.
A CSP has a set of Variables (Xn ) in a Domain Di (which may be discrete or continuous)[2];
the domain is the set of possible values that the variable can take on. Our variables in this case are Hit
Points, Armor, Plasma Shield, among others. Constraints are given by allowing certain values for any given
variable during any given domain. For the StarCraft Problem constraints cannot be enumerated one by one
(the domain is continuous and also the variables).
In the case of distributed CSP, variables are given to different agents. Since most variables are
global (every unit and building has hit points for example), it is necessary to assign values of these vari-
ables to certain units. [15] discuss two types of algorithms are discussed, Domain-pruning algorithm &
Heuristic search algorithm.
The steps required to build a Multiagent not only depend on the communication part. Each agent
needs their own selfish objectives, of course there has to be a countermeasure or loophole for some units, for
example marines can do anything in any given game and because of this a good paying system and constraint
system must be implemented so in case there are no other units besides marines available.
Steps to design the agent[15]:

1. Defining constraints for every individual agent.

2. Distribute optimization between the agents.

3. Make selfish agents that make each performs their task optimally.
7 Background 24

4. Implement Learning

5. Implement Communication

6. Auction System for Multiagent

Key Properties of an Environment[9]


Property Definition
Knowable To what extent is the environment known to the agent
Predictable To what extent can it be predicted by the agent
Controllable To what extent can the agent modify the environment
Historical Do future states depend on the entire history, or only on the current state
Teleological Are parts of it purposeful, i.e., are there any other agents
Real-Time Can the environment change while the agent is deliberating

7.9 Advanced AI applied in Videogames


Weber Proposed a Data Mining approach to StarCraft were they obtained information on strategies
based on game logs on the web. Among their algorithms used were J48, k-NN, NNge, and LogitBoost.[16]
Though Data Mining is implemented, the approach they used is different from the one proposed in this
study. With the help of software they were able to record movements in the game logs available online,
allowing them to obtain strategies of the best StarCraft players in the world. The purpose of this study is
not to insert experience, but to apply the logic that Blizzard provides in their basic strategies and let the
computer find the best choices. For this, a simulation of a real world Army is being proposed.
8 Hypothesis 25

8 Hypothesis
• Allowing the Unit Types to communicate with each other will improve their survival rate compared to
removing the communication between them.

• Applying Multiagent Systems is feasible in terms of CPU & RAM usage compared to using a single
agent per unit.

• Implementing a Tactician Class will improve the success rate as well as the survival rate of the Unit
Classes compared to just a multi agent system.

9 Method
9.1 Data Mining State of the Art
In 2006 the IEEE International Conference on Data Mining identified the top ten algorithms for
Data Mining. C4.5 came out as the prefered one; it is a suite of algorithms, which are going to help classifying
our information based on the agent’s needs and algo it’s going to facilitate learning.[17] These algorithms,
based entirely on usage, provided no help to choosing the right one for the application. Since research in any
algorithm is going to be needed, the decision on choosing one is paramount, not only because data mining
is crucial, but also because the agents will communicate through this data base. Fuzzy Logic was applied
successfully into a medical database consisting of more than 3000 patients.[18]
A Neural Networks in combination with Fuzzy Logic approach to the data mining shall be imple-
mented for this problem given that it provides the ability to self-organize and great traits of learning, and
also because of the plenty of documentation to help its programming.[19] [20] [11]

Artificial Neural Netowrks can be most adequately characterised as ’computational models’


with particular properties such to adapt or learn, to generalise, or to cluster or organise data,
and which operation is based on parallel processing.[21]

To develop and grow evidence for our first hypothesis the next steps are required:

1. Develop an agent for each unit in each type of unit as a class in C++.

2. Develop a controlling class for each unit class.

3. Develop a method of communication of responsibilities between agents.

4. Make final touches to the multiagent system.

5. Run tests to compare standalone agents against multagents.

The sample will be three unit types, in this case marines, firebats, and medics. These classes were
chosen for strategy since the medic has different capabilities than the rest of the units. Data will be collected
by measuring the amount of CPU & RAM Percentage used by the agents. Each time the agent is pitted
against an enemy would be only 1 simulation. At least 95% of reliability is needed, so simulations will be
made to reach that option.
9 Method 26

Data will be presented in graphs. of CPU usage % vs Number of Simulations and RAM usage %
vs Number of Simulations. Also there will be a Graph of Survival Rate vs Number of Simulations to see if
the survival rate improves or decreases during Multiagent Systems vs Standalone Agent Systems.
The sample was selected because during the game those units are among the most used and they

Example of Data Graph Usage

have multiple uses, also because firebats can’t attack air units, and because medics can’t attack, adding
different aspects to our problem. The geographic area of the problem is simply the environment of the game.

Testing and Familiarization of the Broodwar API

The Boodwar API is the method to obtaining units from the videogame StarCraft. Functions are made
for every unit and every building, it is an important tool for the project and it’s important to mine the
valuable methods provided by the tool. This is going to be learned during the experimentation with the rest
of the objectives.

Applying Agents to Units

Each unit must have an agent structure to respond to problems, have certain constraints and pursue
their own objectives.
9 Method 27

Testing of Agents

It’s important that the individual agents be as efficient as possible, because when comparing a well
implemented agent against a multi agent system the difference in performance could diminish. For the
purpose of this study we want to discover the difference between using one or the other in terms of computer
usage.

Creating solutions algorithms for the agents

Constraints, reactiveness, goals of the agents must be tested thoroughly and carefully to make them as
efficient as possible.

Creating multiagent system

Communication methods, and the repartition of goals amongst the agents.

Creating higher class (War Tactician)

The main goal of the game should be given to only one person as in real life. Orders aren’t given to
every soldier, they are given to the sergeant and the sergeant briefs his soldiers accordingly.

Applying Data Mining

Clustering method: How is the data going to be stored in the database.

Creating a DataBase from unit information and recon

This clustering method is the Database or Warehouse that is going to be collected.

9.2 Creating a Scout Class to gather information and put it in the database
The scout class is the information collector. The most important factor in Data Mining is the existence
of Data.

• Applying Fuzzy Logic and Neural Networks to the Data Warehouse

• Test System

• Expand System

• Create Base Control Class

• Create Resource Management Class

• Create General Class

• Test System

• Documentation
Number Task Dates
Jan-May 2011 Aug-Dec 2011 Jan-May 2012
Testing and Familiarization of the Broodwar
9 Method

1 API
2 Applying Agents to Units
3 Testing of Agents

4 Creating solutions algorithms for the agents


5 Creating multiagent system
6 Creating higher class (War Tactician)
7 Applying Data Mining
Creating a DataBase from unit information
8 and recon
Creating a Scout Class to gather information
9 a put it in the database
Applying Fuzzy Logic and Neural Networks
10 to the Data Warehouse
11 Test System
12 Expand System
13 Create Base Control Class
14 Create Resource Management Class
15 Create General Class
16 Test System
18 Documentation
28
Bibliography

[1] S. Ning and M. Yan, “Discussion on research and development of artificial intelligence,” in Advanced
Management Science (ICAMS), 2010 IEEE International Conference on, vol. 1, pp. 110 –112, 2010.

[2] S. Russell and P. Norvig, Artificial intelligence: a modern approach. Prentice hall, 2009.

[3] Blizzard, “Starcraft compendium,” 2010.

[4] M. Buckland, Programming game AI by example. Wordware, 2005.

[5] deathknight13579 and lowerlogic, “Bwapi overview,” 2010.

[6] E. Britannica, “Algorithm,” 2010.

[7] E. Britannica, “Ram,” 2010.

[8] E. Britannica, “Central processing unit (cpu),” 2010.

[9] G. Weiss, Multiagent systems: a modern approach to distributed artificial intelligence. The MIT press,
2000.

[10] S. Tzu and S. Griffith, The art of war. Oxford University Press, USA, 1971.

[11] K. Thearling, “An overview of data mining techniques,” 2010.

[12] J. Han and M. Kamber, Data mining: concepts and techniques. Morgan Kaufmann, 2006.

[13] I. Witten and E. Frank, Data Mining: Practical machine learning tools and techniques. Morgan Kauf-
mann Pub, 2005.

[14] H. Teodorescu, D. Mlynek, and A. Kandel, Intelligent systems and interfaces. Springer Netherlands,
2000.

[15] Y. Shoham and K. Leyton-Brown, Multiagent systems: algorithmic, game-theoretic, and logical founda-
tions. Cambridge Univ Pr, 2008.

[16] B. Weber and M. Mateas, “A data mining approach to strategy prediction,” in Computational Intelli-
gence and Games, 2009. CIG 2009. IEEE Symposium on, pp. 140–147, IEEE, 2009.

[17] X. Wu and V. Kumar, The top ten algorithms in data mining. Chapman & Hall/CRC, 2009.

[18] T. Vamos, “Why fuzzy in data mining?,” in Uncertainty Modeling and Analysis, 2003. ISUMA 2003.
Fourth International Symposium on, pp. 46–49, IEEE, 2005.
BIBLIOGRAPHY 30

[19] L. Veelenturf, Analysis and applications of artificial neural networks. Prentice-Hall, Inc. Upper Saddle
River, NJ, USA, 1995.

[20] V. Rao and H. Rao, C++ neural networks and fuzzy logic. BPB publications, 2003.

[21] B. Krose and P. Smagt, An introduction to neural networks. Amsterdam: The University of Amsterdam,
1996.
Carta Compromiso

Fecha: 30 de Noviembre de 2010

He revisado el trabajo final del alumno Claudio Bernardo Rodríguez Rodríguez, con matrícula 902138,
que lleva como título Application of Multiagent Systems in combination with Data Mining techniques to
simulate a War environment using RTS videogame StarCraft y considero que desde el punto de vista de
contenido tiene la calidad necesaria para ser un anteproyecto de tesis. Con base en lo anterior me
comprometo a ser el asesor de tesis de (solamente el nombre del alumno).

Atentamente

Dr. Leonardo Garrido Luna

You might also like