Donations
Help us to pay our Server!
(: Consider a donation :)
Donation pic
Donators
Main Menu
Language
Recent changes

[Main Page]

AI improvements

From Widelands.org

Main Page | Recent changes | Edit this page | Page history | Switch to MediaWiki mode

Printable version | Disclaimers | Privacy policy

Contents

AI Improvements

What

This page provides a platform for ideas on how the artificial intelligence AI can be improved.

Situation

<Here should be a description of the status quo> How become AI into being? What strategy do they have? How do they develop?

Propositions

Pluggable AI and AI development help

Since we do not know what the best AI would look like, it seems reasonable to give people the ability to create different kinds of AIs that one can choose from when starting a game. Other aids in developing AI would be the ability to run purely AI vs. AI games, and the ability to show an AI debug window.

Different strategies

An approach to differentiate the behaviour would be to define different strategies that are applied to a AI randomly. Such behaviour could be:

  • aggressive
  • defensive
  • expansive
  • peaceful

Model human behaviour

An AI can be said to be good if its behaviour does not differ from that of a human behaviour. Therefore we should ask ourself why we do this or that. E.g. If you you want to build a farm but there is no building place available I see three options:

  • clear land from forest or rocks in the hope you will get a suitable place.
  • reroute your roads so a building spot emerges
  • expand into an area where there is free space.

Of course there are more issues to consider. The produced wheat should not be transported far to the next processing facility.

So by defining an aim we can figure out how to get there by figuring out how to get to the next step (divide and conquer).

AI code development

The current AI source code(s) can be found <fixme here>.

Current AI Player State

AI engines can query their current state from these variables / structures:

  • map information
* terrain at a given location  <fixme>
 * land type  <fixme>
  * parameters of the current land type (more useful to AI than a description)
   * speed of transport
   * growth rate of food
   * growth rate of trees
   * productivity of fish
   * other     
 * resources (if known)  <fixme>
* available building locations
 * available flag locations  <fixme>
 * available building sites (w/type of buildings possible)  <fixme>
* the currently built road system
 * connectivity to "main road grid" (true/false) <fixme>
 * function listing what is available on a given road system 
  * Wares  <fixme>
  * Workers  <fixme>
  * Structures  <fixme>
* visible enemy structures
 * location <fixme>
 * type <fixme>
 * visible contents <fixme>
 * visible status information <fixme>
  • worker information
* quantity of each type of worker on hand <fixme>
* requirements to build a particular type of worker <fixme>
 * Wares
 * Structure
 * Other Workers
* current locations of particular worker types  <fixme>
  • wares information
* quantity of each type of ware on hand <fixme>
* requirements to build a particular type of ware <fixme>
 * Wares
 * Structure
 * Worker(s)
* current locations of particular wares types  <fixme>
  • structure information
* quantity of each type of structure on hand  <fixme>
* requirements to build a particular type of structure <fixme>
 * Wares
 * worker(s) (to make the structure work)
* working radius of finished structure <fixme>
* current locations of particular structure types  <fixme>

How AI Communicates Decisions to the game engine

  • build a structure
  • build a flag
  • build a road
  • adjust a priority
  • adjust a troop capacity level
  • attack an enemy structure
* number of troops to commit to the attack

Retrieved from "http://xoops.widelands.org/modules/mediawiki/index.php/AI_improvements"

This page has been accessed 1,942 times. This page was last modified 17:59, 6 October 2008. Content is available under GNU General Public License 2.





Search


Login
Username:

Password:


Lost Password?

Register now!
Polls
Which requires the fewest improvements
Animations in game (buildings, workers, nature, animals)
Graphics in main menu
Campaigns (as well as number of campaigns)
Network support
Sounds
Music
Structure of the economies of the tribes
Maps
The transportation system
In game user interface
The editor
Hosted by