Difference between revisions of "AI Arena"
(changed a bit after consulting with WML expert.) |
(clarified wording a bit) |
||
Line 1: | Line 1: | ||
− | = | + | = Testing the AI = |
There was an IRC discussion on March 23-24 between Dragonking, Crab_, and Velory, regarding the Arena to test AI - a specific map (later - set of maps) to test a 'chosen' AI in 'chosen' situation. | There was an IRC discussion on March 23-24 between Dragonking, Crab_, and Velory, regarding the Arena to test AI - a specific map (later - set of maps) to test a 'chosen' AI in 'chosen' situation. | ||
Line 15: | Line 15: | ||
A challenge, which is created as part of that 'Arena scenario', 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), sets their hit points and statuses, etc. It's purpose is to create a 'interesting tactical situation' for the ai to handle and it knows nothing about the AI that will try to handle it. | A challenge, which is created as part of that 'Arena scenario', 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), sets their hit points and statuses, etc. It's purpose is to create a 'interesting tactical situation' for the ai to handle and it knows nothing about the AI that will try to handle it. | ||
So, the scenario will include a number of starting situations, each will have a 'name'. There will be ways (for example, by stepping a specific off-arena unit to trigger a WML events to: | So, the scenario will include a number of starting situations, each will have a 'name'. There will be ways (for example, by stepping a specific off-arena unit to trigger a WML events to: | ||
+ | |||
- clean up the arena | - clean up the arena | ||
+ | |||
- create specific tactical situation (by selecting it from a list or by typing a name in the dialog box) | - create specific tactical situation (by selecting it from a list or by typing a name in the dialog box) | ||
Revision as of 22:07, 24 March 2009
Testing the AI
There was an IRC discussion on March 23-24 between Dragonking, Crab_, and Velory, regarding the Arena to test AI - 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 a number of starting situations
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, which is created as part of that 'Arena scenario', 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), sets their hit points and statuses, etc. It's purpose is to create a 'interesting tactical situation' for the ai to handle and it knows nothing about the AI that will try to handle it. So, the scenario will include a number of starting situations, each will have a 'name'. There will be ways (for example, by stepping a specific off-arena unit to trigger a WML events to:
- clean up the arena
- create specific tactical situation (by selecting it from a list or by typing a name in the dialog box)
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:
- create WML AI configuration which includes some formulas or includes some .fai files.
- launch the Arena.
- select a suitable tactical situation. Units will appear on the map.
- redeploy the ai(s) using in-game console.
- test and debug the AI efficiency in that tactical situation
- restart or redeploy as needed. Changes in the AI WML configuration will be picked up after either redeployment or restart.
- when formula change is committed, only it's testing AI configuration file (+ any referenced .fai) are to be commited. (because map and list of challenges do not depend on them)