Menu

AiScriptingConceptionNotes

Featured (3)
Anonymous

AI scripting, conception notes

General description

Bot name: Split Bot

Description: This AI is made of multiple agents. Each one has a goal which may be different or even contradictory, e.g. defend the home and attack the enemy. An agent is created by another agent in function of several indicators: the game state, the game state evolution, a knowledge base, hazard.

Technical considerations

The bot is a set of javascript classes which are interpreted by 0 ad game engine, Pyrogenesis.

It is developed in haXe which is a very structured language which can be "compiled" in javascript code.

Key words

Bot

The bot has a set of Agents, it has resources and a single goal: win the game, kill the opponents.

Agent

An "intelligent" "autonomous" program which has a given goal and a set of behaviors which it express or not depending on the situation. Agents share the resources of the bot.

Each agent owns entities, in the sense of the 0 ad entities

An Agent is able to

  • create other agents
  • destroy itself
  • give orders to the entities it owns, such as build entities
  • donate entities to other agents

Behavior

A behavior is used to analyse the game state, to determine its evolution and to interpret it given a knowledge base, i.e. a set of rules.

It is able to take actions in order to make the game state better according to the rules it has.

Examples of behaviors:

  • control, try to build houses when population limit is too low, to gather resources etc.
  • build, can be asked to build a given amount of buildings of given types, with a given proportion of defenses
  • work, gather the needed resources

Rule

A rule takes a game state and returns a satisfaction grade.

Action

An action can be executed and then does something.

Sequence

A sequence is an action which is executed after a given amount of time, or after several other sequences has been finished.

StressLevel

The stress level is computed in function of different statistics including

  • number of death variation
  • number of enemies in the neiborhood
  • number of available resources to grab in the neiborhood
  • number and variation of the ressources collected