AI:CSAI: Difference between revisions

From Spring
Jump to navigationJump to search
First created
added available commands
Line 1: Line 1:
== CSAI ==
CSAI was written by Hugh Perkins and can be downloaded from:
CSAI was written by Hugh Perkins and can be downloaded from:


[http://manageddreams.com/csai/CSharpAI_20061024.zip http://manageddreams.com/csai/CSharpAI_20061024.zip]
[http://manageddreams.com/csai/CSharpAI_20061024.zip http://manageddreams.com/csai/CSharpAI_20061024.zip]


It works ok on SmallDivide and CometCatcher using the AA2.23 mod.
It works ok on SmallDivide and CometCatcher Remake v02 using the AA2.23 mod.
 
== Replays ==


Here are some replays of it fighting with AAI 0.75 using AA2.23:
Here are some replays of it fighting as ARM with AAI 0.75 using AA2.23:


SmallDivide:
SmallDivide:
Line 14: Line 18:
[http://manageddreams.com/csai/061023-SmallDivide-0.73b1-20.sdf http://manageddreams.com/csai/061023-SmallDivide-0.73b1-20.sdf] (win)
[http://manageddreams.com/csai/061023-SmallDivide-0.73b1-20.sdf http://manageddreams.com/csai/061023-SmallDivide-0.73b1-20.sdf] (win)


CometCatcher:
CometCatcher Remake v02:


[http://manageddreams.com/csai/061023-Comet Catcher Remake-v02-0.73b1.sdf http://manageddreams.com/csai/061023-Comet Catcher Remake-v02-0.73b1.sdf] (stalemate)
[http://manageddreams.com/csai/061023-Comet Catcher Remake-v02-0.73b1.sdf http://manageddreams.com/csai/061023-Comet Catcher Remake-v02-0.73b1.sdf] (stalemate)
[http://manageddreams.com/csai/061023-Comet Catcher Remake-v02-0.73b1-0.sdf http://manageddreams.com/csai/061023-Comet Catcher Remake-v02-0.73b1-0.sdf] (win)
[http://manageddreams.com/csai/061023-Comet Catcher Remake-v02-0.73b1-0.sdf http://manageddreams.com/csai/061023-Comet Catcher Remake-v02-0.73b1-0.sdf] (win)


To Use:
== To Use ==
=======


First, make sure you have the Framework .Net 1.1 runtime installed.  You can download this from Microsoft.
First, make sure you have the Framework .Net 1.1 runtime installed.  You can download this from Microsoft.
Line 46: Line 49:
*click "add bot"
*click "add bot"
*specify the ai as "csailoader.dll"
*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
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
You can recompile the CSAI dll at any time, and reload it by saying ".reloadai" in the spring.exe game


Commands available
== 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 1000 1500  Move 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


You can talk to your AI whilst it plays
*.csai tankscount  Find out how many tanks are available
*.csai tanksmoveto 500 1000    Move all tanks to position 500, 1000

Revision as of 19:45, 23 October 2006

CSAI

CSAI was written by Hugh Perkins and can be downloaded from:

http://manageddreams.com/csai/CSharpAI_20061024.zip

It works ok on SmallDivide and CometCatcher Remake v02 using the AA2.23 mod.

Replays

Here are some replays of it fighting as ARM 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)

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 1000 1500 Move 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 500 1000 Move all tanks to position 500, 1000