In this blog I will mention only the chosen techniques (in my thesis I refer to other techniques investigated).
The technique to implement is a Multi-agent system with a Goal-directed behaviour. With this we will create the "brain" (a non-physical entity) able to handle all the game information and act logically.
We will also have physical agents inside the world like soldiers and villagers/workers. For this agents I will be using the well known technique Finite State Machines, but I will talk about them in other publication.
Multi-agent system
A Multi-agent system, as it names says, is a system composed of multiple interacting intelligent agents within an environment, and it is used mostly to solve complex problems impossible or too difficult for a single agent.
This image shows the inner workings of an agent:
To sum up, the agent is an autonomous entity that has inputs (perception of the current state of the world) and outputs (actions).
(more detailed information can be found here http://en.wikipedia.org/wiki/Intelligent_agent ).
Here is a list of the different agents that I am going to implement and a brief description of its tasks (following Bob Scott advices, AI developer for Empire Earth). Each agent will be independent from each other, but there will be a strong communication between them and a client/server relation.
Strategy Agent: This is the highest-level agent and it's responsible of the long term decisions. The main task of this agent will be decide the strategy to be carried out in this game (a fast attack with basic units, also known as rush, play defensive or play aggressive etc.). It also coordinates and set limits other agents (spending limits). If the unit agent requests resources to train a unit, this agent may accept or reject the request, even if there are enough resources.
Unit Agent: Responsible of training units, keep track of them, prioritize the training in case there are several units requests and communicate with the building agent if a building is needed for a unit( for example, barracks to train soldiers).
Building Agent: Responsible for the placement of the structures and towns. Most of the work of this agent is to analyse/evaluate the terrain in search of the best places depending on the building. For example, if a lumberjack hut is requested, it will find the best place to ensure success gathering wood.
Resource Agent: Responsible for tasking the villagers/workers, expansion to new resources and attend request for other agents.
Research Agent: Responsible for researching new technologies based on their usefulness and cost.
Combat Agent: Responsible for directing the military units and requests units to the unit manager.
(due to the amount of work involved in this project, which is basically create a RTS game and its AI from scratch, I am not sure if there will be implementing a combat system or not. The demo will be mostly focused on the resource management).
Each agent is an expert on his field, but knows very little about other's agents tasks. For example, the Unit agent will have no idea of how/where to place a building if it needs one, instead it will just ask the Building agent for it.
The Building agent on the other side, will have no idea of why that building was requested, it will just try to find the best possible place for that concrete building and place it as soon as possible. This is the client/server relation I commented above.
The agents behaviour is driven by their own goals, and each agent has its own personal goals. Those goals can be treated as "sub-goals" of the Strategy agent goal.
Only if all the agents work and collaborate properly with each other, the strategy agent will be able to carry its "major" or main goal, which is defeat the opponent.
No hay comentarios:
Publicar un comentario