AI Arena

From The Battle for Wesnoth Wiki
Revision as of 02:07, 24 March 2009 by Crab (talk | contribs) (summary)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Summary

There was an IRC discussion on May 23-24 between Dragonking, Crab_, and Velory, regarding the AI testing Arena - a specific map (later - set of maps) to test a 'chosen' AI in 'chosen' situation.

The elements of proposed implementation are as follows:

One shared map, usable with any ai and any starting situation

First arena is to be based on Den of Onis. It was picked by Dragonking because it is a small map and is good since it has different terrain including caves, lava, water etc and we can look for a bugs there when we test some particular usages.

-- This map should be changed a bit to allow 3 players (human1, computer2, computer3). Faction leaders should start 'outside' the main map in isolated 1-space pockets (for example, to allow human player to be a 'spectator' in the fight between two computers, or to allow a human to fight with a computer).

Ability to select from multiple 'pre-defined' starting situations. This will allow to design 'challenges' for the ai and select one of them for execution. A challenge basically creates some units on the map (optionally, if it so required by the situation under test - moves leaders from their isolated pockets to the battleground or kills them), sets their hit points and statuses, etc. It's purpose is to create a 'interesting tactical situation' for the ai to handle.

Ability to hot-redeploy ai for the specific side from in-game console. This will allow loading a specific ai from a specific WML configuration file (this may also load some .fai files which were included in the configuration)

Ability to clean up the map This will allow to return the leaders to their starting positions, and remove all units from the arena. It can be used to 'restart' the test.

Ability to restart the test - Combo ability to clean up, then select same pre-defined tactical situation, then hot-redeploy all the AIs This is basically an 'one shot restart test without typing too much in the console'. Can be implemented as a 'tile that some off-arena unit must step on' or as a console command.

Usage example:

  1. create WML configuration which includes some formulas or includes some .fai files.
  2. launch the Arena.
  3. select a suitable tactical situation.
  4. load the ai(s) using in-game console.
  5. test and debug the AI efficiency in that tactical situation
  6. restart and redeploy as needed. Changes in the AI WML configuration will be picked up after either redeploy or restart.