AI:CSAI
CSAI
CSAI works ok on SmallDivide and CometCatcher Remake v02, fighting as ARM using the AA2.23 mod. It can be downloaded from:
http://manageddreams.com/csai/CSharpAI_20061024.zip
CSAI is written in C#, by Hugh Perkins
Replays
Here are some replays of it fighting with AAI 0.75 using AA2.23:
SmallDivide:
http://manageddreams.com/csai/061023-SmallDivide-0.73b1-23.sdf (win) http://manageddreams.com/csai/061023-SmallDivide-0.73b1-22.sdf (lose) http://manageddreams.com/csai/061023-SmallDivide-0.73b1-21.sdf (win) http://manageddreams.com/csai/061023-SmallDivide-0.73b1-20.sdf (win)
CometCatcher Remake v02:
Catcher Remake-v02-0.73b1.sdf http://manageddreams.com/csai/061023-Comet Catcher Remake-v02-0.73b1.sdf (stalemate) Catcher Remake-v02-0.73b1-0.sdf http://manageddreams.com/csai/061023-Comet Catcher Remake-v02-0.73b1-0.sdf (win)
Supported Platforms
You will need a Windows platform to run CSAI.
To Use
First, make sure you have the Framework .Net 1.1 runtime installed. You can download this from Microsoft.
Download the CSharpAI zipfile above
You should find the following dlls, pdb and xml files inside:
- CSAI/CSAI.dll
- CSAI/CSAI.pdb
- CSAIInterfaces/CSAIInterfaces.dll
- CSAIInterfaces/CSAIInterfaces.pdb
- CSAILoader/CSAILoader.dll
- CSAILoader/CSAILoader.xml
Find the spring application directory on your computer. We will call this directory TASpring. It should have spring.exe and tasclient.exe in. Arrange these files as follows:
- CSAI.dll, CSAI.pdb go in TASpring\AI\CSAI (you will need to create this directory)
- CSAIInterfaces.dll, CSAIInterfaces.pdb go in TASpring (same directory as spring.exe)
- CSAILoader.dll, CSAILoader.xml go in TASpring\AI\Bot-libs
To run the bot:
- create a multiplayer game, using Absolute Annihilation 2.23
- specify start positions as "random" or "fixed"
- click "add bot"
- specify the ai as "csailoader.dll"
- ensure bot plays as ARM
You can find a logfile in the TASpring/AI/CSAI directory, called csharpai_team0.log , where 0 is the name of the team
You can recompile the CSAI dll at any time, and reload it by saying ".reloadai" in the spring.exe game
Commands available
You can talk to your AI whilst it plays.
Commands to the ai always start with ".csai ", then the command.
Type ".csai help" for a list of available commands. Here are some of them:
- .csai commanderbuildpower Commander builds a solar cell near him
- .csai commanderbuildextractor Commander builds a metal extractor on nearest available metal spot
- .csai commandermove 0 1000 1500 Move team 0 commander to position (1000,1500)
- .csai commandergetpos Ask for commander's current position
- .csai commanderbuild armvp Ask commander to build a vehicle plant next to him. Use any valid unit name here (see logfile for list) (must be buildable by arm commander)
- .csai killallfriendly Kills all units belonging to AI, except for commander This is sometimes useful during AI testing
- .csai showmetalspots Show detected optimal metal extractor positions
- .csai tankscount Find out how many tanks are available
- .csai tanksmoveto 0 500 1000 Move all team 0 tanks to position 500, 1000
Developer resources
You may wish to extend or modify CSAI. If so, the following pages may be useful:
- CSAI Build Instructions How to build CSAI
- AI:CSAIInterface Information on the C++/C# interface