Adaptive AI Engine for RTS Games

Discussing the theory and practice

Archive for June, 2009

29-6-2009 Meeting Agenda

Posted by Ogail on June 29, 2009

  • Introduce what we’ll say today (our vision) and how we will achieve it (introducing meeting agenda) – Abdelrahman
  • Add here your main points to discuss Omar
  • Basic Definitions and Concepts:
    • What is intelligence
    • What is "Game AI"
    • What Game AI is NOT
    • How this definition differs from Academic definition
    • Applicable mind science and psychology theory:
      • Brain organization
      • Knowledge base and learning
      • Cognition
      • Theory of mind
      • Bounded optimality
      • Lessons from robotics
  • An AI Engine: The Basic Components and Design:
    • Decision making and inference:
      • Types of solutions
      • Agent reactivity
      • System realism
      • Genre
      • Content
      • Platform
      • Development limitations
      • Entertainment limitations
    • Input handlers and perception:
      • Perception type
      • Update regularity
      • Reaction time
      • Thresholds
      • Load balancing
      • Computation cost and preconditions
    • Navigation:
      • Grid based
      • Simple avoidance and potential fields
      • Make node networks
      • Navigation mesh
      • Combination systems
  • Real-Time Strategy Games:
    • Common AI elements:
      • Individual units
      • Economic individual units
      • Commanders and medium level strategic elements
      • High level strategy AI
      • Town building
      • Indigenous life
      • Pathfinding
      • Tactical and strategic support systems
    • Useful AI techniques
      • Messaging
      • Finite-State-Machines (FSM)
      • Fuzzing-State-Machines (FuSM)
      • Hierarichal AI
      • Planning
      • Scripting
      • Data-Driven AI
    • Examples
    • Areas that need improvement:
      • Learning
      • Determining when AI element is stuck!
      • Helper AI
      • Opponent personality
      • More strategic, less tactics
    • Talks about which department we’ll join

Posted in Meeting Agendas | Leave a Comment »

AI Engine Structure for RTS Games

Posted by Ogail on June 29, 2009

AI Engine Structure for RTS Games

Article in PDF –> Download Here

  • Aim, discuss following:
    • The elements that require some form of AI in RTS games
    • AI techniques used in finished products
    • Real-world examples
    • Notable exceptions
    • Areas of improvement
  • Common AI Elements:
    • Individual Players:
      • The more individual intelligence a unit has, the less you have to chech your army
      • Replicating behavior (attack/retrieve pattern)
    • Economic Individual Units:
      • Called peons (builders, gatherers)
      • Techniques used:
        • Order Queue: make order queue to each unit
        • Auto-retreating: retrieving when there is an attack and after danger go they get back to work
          • Improvement: go to more secure place! Saying Help!
    • Commanders and Medium-level Strategic Elements:
      • Controlling group of elements in a bigger war sense
      • This is medium level AI not low (such as shoot) and not high (such as defense base)
    • High Level Strategic AI
      • Think of things in general as a real army
      • Here it’s multifaceted
    • Town Building:
      • Criteria of building the buildings are hard to cover all
  • Indigenous Life:
    • As sheep, wolf …
  • Pathfinding (PF):
    • Why pathfinding is one of the most important aspects in AI
    • Flocking techniques and follow-the leader-type systems will improve the speed of per-unit PF
  • Tactical and Strategic Support Systems:
    • Techniques that makes the decisions of AI systems appear smart:
      • Terrain Analysis:
        • Dividing terrains into meaningful chunks and breaking down each aspect of chuck, then AI can glean huge amount of useful data in strategic decisions:
          • Used in pathfinding
          • Keep track of enemy base locations, resources, finding holes,
        • Most of this is done by influence map (fancy name for grid-based map)
        • Intelligent collection of resources (centered resource)
    • Opponent Modeling “Know your enemy”:
      • AI controller can’t ASSUME what his opponent will do
      • AI should build a model of his opponent
      • Some of data to consider: which unit player use, time interval between attacks…)
    • Resource Management:
      • Using need-base system AI opponent could be implemented on map type a attributes
    • Reconnaissance:
      • Explaining the concept of “fog of war”
      • Bottleneck of keeping the data up-to-date
        • Common solutions: tower, guard-post placement or complex wall building
      • Diplomacy Systems:
        • Synchronizing work between AI opponent and its allies
  • Useful AI Techniques in RTS Games:
    • Messaging:
      • Messaging systems can be used for broadcasting of events and game flags to large number of registered units quickly and easily
    • Finite-State-Machines (FSM)
      • Individual work unit, AI most likely implemented as stack-based FSMs so that they can be temporally interrupted then restored easily
      • Systems within the strategy level, a city building might be a FSM with an offline constructed build order that has been proven to work
    • Fuzzy-State-Machines (FuSM):
      • Help AI to take decision in blend of opponent behavior not cheating!
      • There are several ways to victory FuSMs help in determining which one to use
    • Hierarchal AI:
      • Attacked group example
        • Answer is determined by the amount of strategic Vs. tactics
        • Hierarchical systems provide a means for RTS games to form high-level goals but also appear smart at unit level, without choking (الإختناق) the primary AI system for resources
    • Planning:
      • Planning is important to accomplish higher-level tasks
      • Even running away from threats need some level of thinking beyond just pathfinding
    • Scripting:
      • Used to describe certain unit behavior under certain conditions
    • Data Driven AI (135):
      • Many RTS games are putting large portions of AI decision making into non-code form
      • Advantages: level designers and gamers can change them later easily
      • Example:

  • Developed RTS Games Examples:
    • Herzog Zwei was developed using simple AI as FSM in states like GetMoney. Defines, Attack

  • Warcraft, Starcraft and Command & Conquer emphasis on pathfinding not influence maps or better planning algorithms because the memory and processing limitations
  • Later games used super-units and heroes (instead of just using mindless units)
  • Areas That Need Improvement:
    • Learning
      • RTS AI get in the same trap repeatedly
      • The AI should take into account successful travel information about map locations (using influence map techniques), so it didn’t go to kill zones where there are areas of migration

  • Determine when AI Element is Stuck:
    • What to do in stuck situations (from a peon to a group of tanks)
    • The AI should know it has been beaten! (The last peon problem)
  • AI Helper (to the human player)
  • Opponent Personality:
    • Herzog Zwei had two opponent AI personalities (offense based defensive based
    • Examples: AI madness
  • More Strategy, Less Tactics:
    • What we mean by this title?
    • Make it real: clicking the mouse and hitting hot keys
    • Some common strategic systems that the RST AI should accomplish:
      • Grouping units by type and then using groups to back up other groups
        • Respond to specific threats with the correct counter type unit
        • When attacking make each suitable unit to attack object
      • Setting up attack lines to take advantage of multiple fronts and leave support lines open for additional forces to come on
      • Using terrain feature to setup optimal wall structure
      • How to retreat
      • Setup ambush situations:
        • Get the enemy army to an ambush place

Get enemy army out from base and attack after that!

Posted in AI Game Engine Programming | Leave a Comment »

An AI Example; Basic Components and Design

Posted by Ogail on June 27, 2009

Chapter 2 – An AI Example; Basic Components and Design

An AI Example; Basic Components and Design

  • Aim:
    • Discussing common parts of AI Engine

  • Decision Making and Inference:
  • Inference: act of deriving logical conclusions from actual knowledge or primes to be true
  • The more things the game allows to AI character to do, the greater the response set, or state space of game
  • Decision making: using available inputs to come up with solutions. These differences are discussed below
  • Types of Solutions:
    • Strategic: long-term high level goals, that require many actions to accomplish
    • Tactical: short-term low level goals, that require many physical actions to accomplish
    • In real programming you should keep development of these types isolated
  • Agent Reactivity:
    • Definition (psychology): is a phenomenon that occurs when individuals alter their performance or behavior due to the awareness that they are being observed
    • Effect of scripted systems in the agent reactivity
    • Agent reactivity is suitable for example for arcade game style and twitch games
    • This point needs to be addressed under the type of game being created and game experience of it
  • System Realism:
    • To be considered realistic decisions and actions AI element come up with should be regarded as human
    • AI characters need to show human weaknesses to appear realistic
    • It’s all about balance and entertaining
    • Realism also could be defined as being real in game world (cheating!)
  • Genre:
    • At the genre level, keep in mind the following:
      • Input (or perception) types:
        • Consider any hieratical relationships between inputs
      • Output (or decision) types: (61)
        • Outputs could be analog, digital, series of events on a behavior
        • Output could involve entire character, merely parts of a character or multiple character
        • Output can be specific or high level
      • Overall structure of the decisions needed for the genre:
        • Complex games like Age of Empires requires many types of decisions to be made during the game. You have team-level strategy, unit tactics, array of pathfinding problems and even more esoteric things such as diplomacy
  • Content:
    • Special AI that results from the game novel or content
  • Platform:
    • Keep in mind that player will play under certain platform
    • If the game will be longer try not to repeat AI actions
    • Consoles
    • Handheld
  • Development Limitations:
    • Budget, manpower issues and schedule length….
    • The gameplay AI should be cyclical (phases of actions and then rest, then repeat)
    • State-based methods approach
  • Entertainment Limitations:
    • Game level balancing
    • Getting across emotion and intent (in TV music, camera position are used here what to use?)
      • Cartoonish character
  • Input Handlers and Perception:
  • AI perception can be defined as the things in the environment that you want the elements in your game to respond to
  • Central perception system can use additional data on input register:
    • Perception Type:
      • Various types of inputs as Boolean, integer….
      • They could also include static perception (i.e. basketball player skill)
    • Update Regularity:
      • Some perceptions need periodic update so keep this in mind to save calculations
    • Reaction Time:
      • Reaction time is the pause before an enemy acknowledges a change in the environment
      • Reaction time can be set regarding to the personality (quick if quick slow if slow)
    • Thresholds:
      • Min and Max values that the AI will respond to
      • Could be used in game AI as adding more view range to sniper
      • These values may change according to game events (flash grenade and guard)
    • Load Balancing:
      • Specifying time between updates in general
    • Computation Cost and Preconditions:
      • Design your system with any hieratically linked computation in mind, so simple precondition calculations are done first such that any more complex determinations might not have to be done at all (Pac-Man Example – (68))
      • AI system will respond depend on:
        • type of game, level of gameplay, special powers enemies have
      • Main two paradigms for updating the perception:
        • Polling:
          • Checking for specific values to change or making calculations, on game loop by game loop basis
          • Using Polling for:
            • Analog (continuous or real values) inputs
            • Inputs that may be present in some form all the time
        • Events:
          • Here input tells perception system that it has changed and perception system see if some events occur so it updates otherwise do nothing
          • Preferred to be used in digital systems
      • Some games use advanced perception system because the gameplay is concentrating on beating perception system itself! (as stealth games)
  • Navigation:
  • AI Navigation is the art of getting from point A to B
  • This field has many algorithms because it was investigated many in the field on robotics
  • Navigation contains two main tasks: pathfinding and obstacle avoidance
  • Systems used in pathfinding are:
    • Grid Based:
      • Here world is divided into grid of squares or hexagonal
      • A* Search algorithm is used to find shortest path using grid
      • Each grid square has “traversal possibility” value from 0 (can’t pass @ all) to 1 used analog values to show height of grid or special attributes (water)

  • Simple Avoidance and Potential Fields:
  • Map Node Network:
    • Used more in 3D worlds
    • Search algorithm will find shortest connection path between points
    • Here we are reducing state space
    • This method is not suitable for dynamic obstacles

  • Navigation Mesh:

  • Combination Systems:
    • Some games use combination of these techniques
    • Avoidance is akin for dodging
    • Avoidance of done in a couple of several ways:
      • Potential fields:
        • Make dynamic objects apply an additive repellent force away; make force more stronger until it stops the movement invader
      • Steering behaviors:

  • Basic Steps Involved in AI Engine Design are:
    • Determine different sections your AI system according to game genre
    • Determine types of inputs to the system (digital/analog)
    • Determine outputs system will use
    • Determine primary logic you are going to need to link the inputs to the outputs
    • Determine type of communication between system and AI (continuous/event-driven)
    • Take note for all limitations that your game will endure
    • Divide your system and choose suitable technique
    • Always make a prototype it’ll help you so much!
  • Summary:
    • Three main components of AI Engine are: decision making, perception and navigation
    • Type of decision making technique you choose should rely on: types of solutions, agent reactivity, system realism, genre, special content, platform, development and entertainment limitations
    • Perception systems are central locations for input data calculations for AI characters
    • Perception systems can take into account low-level details such as: update regularity, reaction time, threshold, load balancing, computation cost and preconditions
    • Navigation systems usually fall into: grid based, simple avoidance and potential fields, map node network, navigation Meshs. Some games use combination from these types
    • Obstacle avoidance is more local system dealing with short-term goals

  • Questions:
    • What’s the definition of reactivity in game AI?

Posted in AI Game Engine Programming | Leave a Comment »

Basic Definitions and Concepts

Posted by Ogail on June 26, 2009

Basic Defintions and Concepts

Article in PDF –> Basic Defintions and Concepts

  • Aim:
    • Game AI will be defined
    • Many other expressions will be defined also
    • Discuss areas of future expansions
  • What is Intelligence:
    • Dictionary:
      • capacity to acquire and apply knowledge
      • faculty of thought and reason
    • Thankfully, making good games doesn’t require this definition
    • An intelligent game agent is one that acquires knowledge about the world and then acts on that knowledge
    • From AI: a Modern Approach: creation of computer programs that emulate four things:
      • Thinking humanity
      • Thinking rationally (Sheer Logic)
      • Acting humanity (Turing test)
      • Acting rationally
  • What is “Game AI”:
    • AI is the creation of computer programs that emulate acting and thinking like a human, as well acting and thinking rationally
    • Game Ai is the code in a game that makes the computer-controlled opponents (or cooperative elements) appear to make smart decisions when the game has multiple choices for a given simulation results in behaviors that are relevant, effective, and useful
    • We are only interested in the responses that the system will generate and don’t care about how the system arrived it
    • We care about how system acts not how in how it thinks
    • In old days AI programming was called gameplay programming
    • How Game AI Evolve:
      • Page 34 Game AI Timeline
      • Patterns Approach
        • At the start the patterns were fixed
        • Then, they used simple random number generators
        • After that, used complex number generators
      • PI-Approach:
        • Allowing computer to cheat; in other words have more information about world so the decisions it takes seems remarkably smart!
        • Examples:
          • Gathering resources
          • Giving gifts to computer (unlimited recourses, no time constraint…)
          • Rubber banding:
            • If you are ending a race and you are beating AI-Controlled cars by too much, some games simply speed up the other cars until they’ve caught up with you, and then they return to normal
      • In the past CPU was concerned with graphics more than AI, now many VEGA Cards have their own PU so CPU is free for AI calculations
      • 1-2% of CPU time was dedicated for AI-Calculations not 10-35% of CPU time in consumed in AI-Processing
  • What Game AI is NOT:
    • Game AI is considered as: collision avoidance (path-finding), player controls, UI and game animation!
    • This book emphasize on the differentiation between:
      • Game AI makes decision where there are multiple options or directions to play
      • Making a decision from pool of solutions/animations/paths are more “Find the BEST” solution for particular input
    • The main AI might have many equally good solutions but needs to consider planning resources, player attributes and so on to decisions for game’s bigger picture
    • Difference between low-level AI and high-level AI (soda example)
    • Gamers will not care about your shiny new algorithm if it doesn’t feel smarter and fun!
    • Game AI is not the best code; its best use of code and a large dollop of “whatever works (WW)”
    • There isn’t elegant solution for everything
  • How this definition differs from Academic AI:
    • Academic AI has 2 goals:
      • Understand intelligent entities, which will in turn help us to understand ourselves
        • This goal is not targeting:
          • Why we are intelligent (philosophy)
          • Where in the brain does intelligent come from? (psychology)
        • Our goal targeting:
          • How that guy is finds right answers? (AI)
      • Build intelligent entities
    • sheer logic systems try to solve problems without personal bias or emotion, by thinking purely rationally
    • Game AI focus on acting as human with less dependence of total rationality
    • Game AI needs to model the highs and lows of human task performance instead of searching for best decision at all time (This is for entertainment reason for sure!)
    • Example: Chess Game:
      • How it will be developed as Academic AI
      • How it will be developed as Game AI
    • The people who coded Big Blue didn’t care if Kasparov was having fun when playing against it. But people behind Chessmaster games surely spend a lot of time thinking about fun factor, especially the default difficulty settings
  • Applicable mind science and psychology theory:
    • This section give you ideas and notions of how to break down intelligence tasks in same way human mind does it
    • Brain Organization:
      • Brain is broken classically into 3 groups: hindbrain( brain stem), midbrain, forebrain
      • Also these three were called: reptilian brain, mammalian brain, human brain
      • These brain regions operate independently by using local working memory areas accessing neighboring synaptic connections to do specific tasks for organism. But these regions are also interconnected so to perform global level tasking

  • Knowledge Base and Learning:
    • The information is stored in the form of small changes in brain nerve at the synapse connection level
    • If you use a particular neural pathway it gets stronger!
    • Games AI may use principle of plasticity that’s instead of creating a set-in-stone list of AI behaviors and reactions to human actions, we keep the behavior exhibited by AI malleable
      • See the human response
    • AI systems would require a dependable system for determining what’s “good” to learn whereas the human brain just stores everything
      • Punching example
    • Rate of memory reinforcement and degradation in human brain is not the same for all systems (i.e. pain aversion is may never fully extinguish) so that lead to long term memory. This is a good example of nature dynamic hard coding
    • Differences between short-term & long-term memory
      • Hitting in arm example (page 42) à as short term & long term. Observing results
    • Brian make uses of modulators, chemicals that are released into the blood that:
      • Enhance firing of neurons in specific brain areas
        • Leads to more focused set-mind
        • Flavoring memories of particular contextual way
    • Modulators could be applied in Game AI using State-Based AI (i.e. alert/angry state)
      • Hurt guard using a state system with modifiers, could stay in Normal Guard State with “aggressive” modulator
    • Human brain learns by storing things in different memory centers of the brain by: exploration, direct experience, imitation (التقليد), imaginative speculation
    • When you decide that your game is going to use learning techniques, carefully decide gow you want the game to come up with its learned data (keeping statistics that seem to work against human is one way)
    • Question # 3
    • Influence maps makes the AI opponent seems smart from one or two applications: (44)
      • RTS Game save pathfinding algorithm
      • Sport games (scoring goals and block enemy passes)
    • Influence maps advantages
      • Have low iterations because the information to store is so specific and also the storing of misleading information is also minimized
  • Cognition:
    • Some questions:
      • How does the brain know which info to deal with first
      • Which pieces to throw away
    • Brain does this by systems that quickly categorize and prioritize incoming data
    • Cognition can be thought of as taking all your incoming sense data, called perceptions, and filtering them through your innate knowledge (instinctual and intuitive) as well as your reasoning centers (stored memories) to come up with understanding of what those perceptions mean to you
    • Be carful not to oversimplify that makes your-Controller output predictable
    • Sound ranges (if you make a big noise outside sound range what should happened?)
      • Also take into consideration environment attributes (closed/open area)
    • Most AI systems are just different ways of searching through variety of possibilities
    • The topography (State-Space of game) of your game’s possibilities can be used to conceptually consider the best AI technique to use:
      • If your game’s possible outcomes to different perceptions is mostly isolated islands of response with no real gray conditions state-based system in suitable for you
      • If the range of possible responses is more continuous and a graph out more like a rolling hillside neural networks based system. Because they work better at identifying local maxima and minima in continuous fields of response
  • Theory of Mind (ToM):
    • That will help us because we want to create systems that seems intelligent
    • ToM means that open person has the ability to understand others as having minds and a worldview that are separate from his own
    • ToM technical definition: knowing that others are intentional agents, and interpret their minds through theoretical concepts of intentional states such as beliefs and desires
    • False-Belief-Task Test (46)
      • If he passes the test that means he can model others facts, desires and believes
    • Turing test (that’s exactly what we want in our games!)
    • We must model mind not behavior
    • Rules in combat game (53)
      • The player will create a ToM about them and think they are working together!
  • Bounded Optimality:
    • Main goal of game AI is to emulate human performance level not perfect rationality
    • One of the reasons that humans make mistakes is the idea of bounded optimality (BO)
    • BO = System will make its best decision given computation (and other resources) restrictions
    • Decision making by people is limited under some factors:
      • Quality and depth of relevant knowledge
      • Cognitive speed
      • Problem solving ability
    • We create optimal programs rather than optimal actions!
  • Lessons from Robotics:
    • Simplicity of design and solution
      • Instead of trying to navigate areas by recognizing obstacles and trying …. Insectile creations that blindly use general purpose methods to force their way over obstacles
      • Lesson here is what while others spend years trying tech-heavy methods for cleave ring getting around obstacles and failing, Brooks’s robot design are being incorporated into robots that are headed to Mars!
    • Theory of Mind:
      • Trying to give the robot ability to show desires and intents instead of raw behaviors
    • Multi-layered decision architecture (Subsumbtions Techniques):
      • Bottom-up behavior design (high-level decision layer tends to be about world)
      • High level is most important in decision making
  • Future Work and Researches:
    • Game AI in the future should be generic and be able to play any game!
  • Questions:
    • AI programmers of old were somewhat forced to use these questionable methods to cram info their systems
    • What is sheer logic systems
    • Require to understand this portion:

Posted in AI Game Engine Programming | Leave a Comment »

How to Develop Strategy Games

Posted by Ogail on June 26, 2009

How to Develop Strategy Games

Article source: Strategy Game Programming with DirectX 9.0

  • Choose your game story theme:
    • Science Fiction الخيال العلمي
    • Medieval: العصور الوسطى
    • Western: الغرب
    • Post-apocalyptic: بعد دمار الأرض
  • Story elements:
    • The plot
      • This gives game depth and meaning
      • Gives back group information about the game
      • NOD example
      • Plot defines series of events that lead to the purpose of the game
      • Plot could be based on: war, deception or finance
    • The purpose
      • Gives the player reason for winning the game
  • Setting Objectives:
    • Real tasks that the player should do to win the game
  • Notes:
    • Always add milestone goals
    • Always remember balance is the key
    • Make cost of anything mixture between many resources, this will make player not concentrating on a specific resource
  • Empire Earth Goals Flow Chart:

  • Unit Characteristics:
    • Cost
      • Make balance between cost and strength
    • Unit Speed:
      • Many games make speed relative to armor/power
      • Think about new ideas like considering the environment in your calculations
      • Calculating Unit Speed:
        • Make a basic system from 1 to 100, 1 being slowest 100 fastest
    • Unit Armor:
      • Referring to defensive value of a unit.
      • Calculating defensive value:
        • Problems is you want certain types of armor to react differently to various weapons
        • Create a table:

  • To calculate damaged effected: inflicted x armor rating = points defected to armor
  • Hit points:
    • Each unit should have a hit points that after consuming them the unit is destroyed
  • Unit Firepower
    • Take into consideration:
      • Rate of fire
        • More powerful weapon, the slower it fires
        • To calculate it you should determine how many times/minutes a weapon can fire
      • Damage type
        • Imagine many damage types (fire-based, projectile-based…)
      • Special damage
        • Like when Nuclear Missile is Lunched there is a dirty that kills people after it
      • Velocity
        • The leaser beam is faster than projectile because its as speed of the light
        • Calculating projectile velocity:
          • Like the unit speed, but a standard system that 1->100
  • Resource Management:
    • Pick Your Poison:
      • List the goals that the player should satisfy via resources:
        • Feed the population
        • Build an infrastructure
        • Raise an army
      • Define resources:
        • That will satisfy each of the previous goals
      • Gathering resources (Constraints to Gather Them):
        • Could be manually or automatic
        • If automatic you should ask the question: How does the player build building?
        • While you define resource try to define goal with it (like fisherman near sea)
      • Determine Gathering Rate
    • Resource Balance:
      • TA example (only 2 resources in any portion of the map)
      • Balanced example (grow rate/carrier)
  • RTS Technology Trees:
    • Design technology example:

  • Different Types of Technology Trees:
    • Infrastructure
      • Deals with buildings
      • Without it the player can’t progress to bigger and better things
    • Weapons (and let loose the dogs of war)
      • If the tree is complicated then the player has no clue what the weapons mean!
    • Upgrades
      • Upgrading infrastructure and units with paths
  • Keys is choosing cost of technology:
    • Be sure the technology takes time to research. The more valuable the technology is, the longer it should take to invent
    • Be sure the technology requires resources that pertain to it. In other words, do not make a technology require a resource that has nothing to do with it
    • Be sure the technology costs a reasonable amount. If the technology is very valuable, it should cost a good deal of resources. Do not go overboard, though. If the technology costs more resources than it is going to save, it is worthless.

Posted in RTS Game Programming | 1 Comment »

Game Architecture

Posted by Ogail on June 26, 2009

Game Architecture


  • Any game is consisting from 2 parts:
    • Game Engine
      • Rendering Engine
      • Audio Engine
      • Input Engine
      • AI Engine
      • Scripting
      • Networking
    • Game Logic
      • Connecting all previous engines together
  • Game engines are developed in component based architecture
  • Strategy games way of thinking:
    • Micromanagement: maintenance of resources and individual units
    • Macromanagemet: economic development and large-scale strategic maneuvering
  • Game tactics:
    • Rush attack
    • RTS Games are stochastic and TBS Games are deterministic
    • The difference here is that, in real-time strategy, a decision has to be arrived in a short time-frame, so the best conceivable course of action in that time-frame is used
  • Tactics vs. Strategy:
    • Tactics = Short-term military objectives

Strategy = Long term military objectives

Posted in RTS Game Programming | Leave a Comment »

Enhanced AI Engine

Posted by Ogail on June 26, 2009

Enhanced AI Engine

  • Problems Considered:

    • Opponents weaknesses easily detected
      • In most commercial complex major games, human players only need a couple of games to spot opponents’ weaknesses and to exploit them in upcoming games. This results in not effective boredom game
    • Sharing experience is complex
      • A Human/Computer player would like to share his game plan/experience with other players among the world without really playing the game with them
    • The need for tangible experience
      • A Human Player would be interested to read a human-comprehendible game plan of another Computer/Human Player, He Can’t get what he wants from a computer because it’s something embedded in the AI Engine of the game, also he can’t get what he wants from a human player if he isn’t in contact with him
    • Discovering and solving flaws in game plan/experience
      • A Human/Computer player tends to discover his mistakes that lead to his loss, this process may take a long time and effort
  • Alterative Solutions:
    • Opponents weaknesses easily detected:
      • Human players/Testers around the world supply Game Manufacturers with the weak points in the AI algorithms in their games, so they would avoid them in the next version of the game
    • Sharing experience is complex
      • No Other way than playing the game either online or offline
    • The need for tangible experience
      • A Human would contact the game developers and ask them for the computer plans for a certain part of the game, this is extremely inconvenient
      • A Human would wait until he’s able to contact the other human, and have with him a long chat about his experience in the game
    • Discovering and solving flaws in game plan/experience
      • The Human Player would contact the game developer and ask for help, or the game developer would update the computer AI game plan after discovering a flaw in it
  • Objective:
    • Implementing machine learning techniques at AI Engines
      • Solves the first problem
      • Description:
        • Makes the AI Engine able to analyze its failure and solve the flaw
      • Other:
        • The following research were done in this field before:
  • Implementing Human Understandable Experience
    • Solves second problem
    • Description:
      • So that a Human would easily understand the plan of a certain computer opponent or even the electronic version of the game plan of a human player WITHOUT playing the game itself
  • Implementing mobile experience/plan concept
    • Solves third and third problems
    • Description:
      • A Computer/Human player who would like to export his way/Experience of playing the game to other Computer/Human players around the world will share his mobile copy of experience/plan, Other player’s game instances will receive the mobile copy of his experience/plan in the game, perhaps add it to their own copy of way/experience of playing the game and try to beat it
  • Detecting player personality:
    • Solves first problem
    • Description:
      • The AI Engine will be able to analyze player behavior and produces a plan suitable for beating him/her
  • Scope:
    • Our current scope is strategy games
  • Why this project is useful?
    • Currently there are automated machines (robots) that are used in wars instead of human. The army commander can use the AI Engine to:
      • Test his plans
      • Share other commanders experience in the plan
      • Discover flaws in the plan. And solves these flaws
  • Motivations:
    • We are interested in this project for the following reasons:
      • AI is our area of interest in computer science
      • In the future, we are planning to work in the industry of game development specially in AI Engines
      • We love playing strategy games, developing this project will be so interesting and fun!

Our wish to add something new to this world

Posted in SRSs | Leave a Comment »

Paper Analysis : Adaptive reinforcement learning agents in RTS games 2008 – 24 June 2009

Posted by merothehero on June 25, 2009

Adaptive reinforcement learning agents in RTS games

-paper url:

-game implemented using:  2apl – agent programming language

-Uses Dynamic Scripting instead of static scripting which is used in most commercial games.

-uses BDI Agents: Beliefs, Desires and Intentions.

-Uses Monte-Carlo Learning Process.

-Implicit adaptation: adaptation from the beginning of the game by including opponent’s data

-Explicit adaptation: adaptation as a result of opponent’s actions.

-Integrates agent technology and reinforcement learning-

Future Research in Reinforcement Learning:

1-Faster Learning algorithms are wanted, in order to make agents learning from the entire environment (not only from a small portion of the environment as implanted).

2-Learning shall cover also low-level actions not only high-level strategy actions.

3-multi-task learning agents aren’t available

4-a strategy visualization tool would be added to our goals.

5-Explicit Player modeling (WHAT WE THOUGHT ABT)

6-The Framework can be a base for research in the following :

  • High-performance reinforcement learning and planning
  • multi-agent communication and negotiation
  • agent societies
  • Data mining and human player modeling.

Posted in Papers Summaries | 1 Comment »

Our Initial Imagination of the Project – 14 June 2006

Posted by merothehero on June 25, 2009

AI Engine with Machine Learning and Mobile Game Plans


1- In most commercial complex major games, Human players only need a couple of games to spot opponents’ weaknesses and to exploit them in upcoming games. This results in game boredom.

Traditional Solution:

-Human players/Testers around the world supply Game Manufacturers with the weak points in the AI algorithms in their games, so they would avoid them in the next version of the game.

2- A Human/Computer player would like to share his game plan/experience with other players among the world without really playing the game with them.

Traditional Solution:

-No Other way than playing the game.

3- -A Human Player would be interested to read a human-comprehendible game plan of another Computer/Human Player, He Can’t get what he wants from a computer because it’s something embedded in the AI Engine of the game, also he can’t get what he wants from a human player if he isn’t in contact with him.

Traditional Solutions:

-A Human would contact the game developers and ask them for the computer plans for a certain part of the game, this is extremely inconvenient.

-A Human would wait until he’s able to contact the other human, and have with him a long chat about his experience in the game.


1- Implementing Machine Learning in AI engines.

In most of Commercial Complex Major Games, Machine Learning isn’t implemented. Implementing Machine learning in an AI game engine would be great.

Please check this research:

Recent Advances in Machine Learning and Game Playing (Research between 2006 and 2009)

Another Link:

2- Implementing a mobile experience/plan

A Computer/Human player who would like to export his way/Experience of playing the game to other Computer/Human players around the world will share his mobile copy of experience/plan, Other player’s game instances will receive the mobile copy of his experience/plan in the game, perhaps add it to their own copy of way/experience of playing the game and try to beat it.

3- Implementing Human Understandable Experience

So that a Human would easily understand the plan of a certain computer opponent or even the electronic version of the game plan of a human player WITHOUT playing the game itself.


The World is heading through a new era of gaming and the game industry will need this sooner or later.


Our current scope is Strategy Games.

Posted in SRSs | Leave a Comment »

AI Game Engine Programming – Why This Book?

Posted by Ogail on June 25, 2009

Before Chapter 1

  • Why this book:
    • Clear definition of game AI
    • Genre by genre breakdown of AI elements and solutions
    • Implemented code for the majority of commonly used AI paradigms
    • Discussion of future directions for improvements

Posted in AI Game Engine Programming | Leave a Comment »