AI:CSAI: Difference between revisions

From Spring
Jump to navigationJump to search
ZtbUaq (talk | contribs)
mNo edit summary
redirect manageddreams.com to hughperkins.com, and add github repo link
 
(9 intermediate revisions by 8 users not shown)
Line 1: Line 1:
[http://people.msoe.edu/~millerni/forums.php?show=topic&id=96&forum=13 diazepam online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=148&forum=13 tramadol online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=156&forum=13 wellbutrin online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=107&forum=13 free jazz ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a00 rivotril online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=119&forum=13 free mtv ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=110&forum=13 lipitor online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=89&forum=13 celexa online] [http://wc1.worldcrossing.com/WebX/.1de609e0 ativan online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=123&forum=13 free nokia ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f9 norco online] [http://wc1.worldcrossing.com/WebX/.1de60a18 free motorola ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a2c but ultram] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=150&forum=13 ultram online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=124&forum=13 norco] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=116&forum=13 free mono ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a0e cheap celexa] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=97&forum=13 didrex online] [http://wc1.worldcrossing.com/WebX/.1de609fa free online pharmacy] [http://wc1.worldcrossing.com/WebX/.1de60a24 propecia online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=128&forum=13 cheap phentermine] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=153&forum=13 viagra online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=154&forum=13 cheap vicodin] [http://wc1.worldcrossing.com/WebX/.1de60a27 sildenafil] [http://wc1.worldcrossing.com/WebX/.1de60a1f lisinopril online] [http://wc1.worldcrossing.com/WebX/.1de60a26 sharp ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a16 levitra] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=103&forum=13 free funny ringtones] [http://wc1.worldcrossing.com/WebX/.1de609ee cheap hydrocodone] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=151&forum=13 valium online] [http://wc1.worldcrossing.com/WebX/.1de609e5 free cool ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e4 clonazepam online] [http://wc1.worldcrossing.com/WebX/.1de609e6 buy cyclobenzaprine] [http://wc1.worldcrossing.com/WebX/.1de60a35 free verizon ringtones] [http://wc1.worldcrossing.com/WebX/.1de609ec hgh online] [http://wc1.worldcrossing.com/WebX/.1de609df cheap ambien] [http://wc1.worldcrossing.com/WebX/.1de60a03 free sony ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a0f cheap cialis] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=91&forum=13 free cingular ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=90&forum=13 cialis online] [http://wc1.worldcrossing.com/WebX/.1de60a33 cheap prozac] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=133&forum=13 qwest ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a10 didrex online] [http://wc1.worldcrossing.com/WebX/.1de609fd free punk ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a14 jazz ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=102&forum=13 free free ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a2b cheap ultracet] [http://wc1.worldcrossing.com/WebX/.1de60a1e flexeril online] [http://wc1.worldcrossing.com/WebX/.1de609f8 nokia ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=87&forum=13 ativan online] [http://wc1.worldcrossing.com/WebX/.1de60a09 viagra online] [http://wc1.worldcrossing.com/WebX/.1de609f3 free midi ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=142&forum=13 free sony ericsson ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=135&forum=13 free real ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=82&forum=13 cheap adipex] [http://wc1.worldcrossing.com/WebX/.1de609eb funny ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=132&forum=13 punk ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=146&forum=13 cheap tenuate] [http://wc1.worldcrossing.com/WebX/.1de609f2 meridia] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=108&forum=13 free kyocera ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a05 free sprint ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=114&forum=13 meridia online] [http://wc1.worldcrossing.com/WebX/.1de60a06 order tenuate] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=92&forum=13 clomid online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=86&forum=13 ambien online] [http://wc1.worldcrossing.com/WebX/.1de60a04 sonyericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e3 clomid online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=120&forum=13 music ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=99&forum=13 free ericsson ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=109&forum=13 levitra online] [http://wc1.worldcrossing.com/WebX/.1de60a0d wwe ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a15 free kyocera ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a20 nexium online] [http://wc1.worldcrossing.com/WebX/.1de60a19 mp3 ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=104&forum=13 hgh online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=158&forum=13 xanax online] [http://wc1.worldcrossing.com/WebX/.1de60a01 sagem ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a30 cheap xenical] [http://wc1.worldcrossing.com/WebX/.1de609de but alprazolam] [http://wc1.worldcrossing.com/WebX/.1de60a1b music ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a31 zanaflex online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=152&forum=13 free verizon ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f7 nextel ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=147&forum=13 free tracfone ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a11 buy diethylpropion] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=83&forum=13 cheap albuterol] [http://wc1.worldcrossing.com/WebX/.1de60a29 buy tramadol] [http://wc1.worldcrossing.com/WebX/.1de60a25 samsung ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=118&forum=13 free mp3 ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=157&forum=13 free wwe ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a28 soma online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=139&forum=13 free sharp ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=111&forum=13 cheap lisinopril] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=126&forum=13 cheap paxil] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=117&forum=13 motorola ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=138&forum=13 samsung ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=155&forum=13 vigrx] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=140&forum=13 sildenafil online] [http://wc1.worldcrossing.com/WebX/.1de60a21 buy paxil] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=160&forum=13 cheap zanaflex] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=136&forum=13 rivotril online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=98&forum=13 cheap diethylpropion] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=145&forum=13 sprint ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=129&forum=13 free polyphonic ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=137&forum=13 free sagem ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=121&forum=13 nexium online] [http://wc1.worldcrossing.com/WebX/.1de60a1d cingular ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=95&forum=13 cheap cyclobenzaprine] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=127&forum=13 cheap pharmacy online] [http://wc1.worldcrossing.com/WebX/.1de609dd alltel ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=144&forum=13 free sonyericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a34 sony ericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e7 cheap diazepam] [http://wc1.worldcrossing.com/WebX/.1de60a0a vicodin] [http://wc1.worldcrossing.com/WebX/.1de60a17 buy lipitor] [http://wc1.worldcrossing.com/WebX/.1de60a0b cheap vigrx] [http://wc1.worldcrossing.com/WebX/.1de60a1a mtv ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=141&forum=13 soma online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=112&forum=13 lorazepam online] [http://wc1.worldcrossing.com/WebX/.1de609ff real ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=162&forum=13 zyban online] [http://wc1.worldcrossing.com/WebX/.1de609dc buy albuterol] [http://wc1.worldcrossing.com/WebX/.1de60a12 ericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f0 cheap lorazepam] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=161&forum=13 cheap zoloft] [http://wc1.worldcrossing.com/WebX/.1de609db but adipex] [http://wc1.worldcrossing.com/WebX/.1de60a0c buy wellbutrin] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=84&forum=13 free alltel ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=94&forum=13 cool ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=122&forum=13 nextel ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a32 zoloft online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=93&forum=13 clonazepam online] [http://wc1.worldcrossing.com/WebX/.1de60a2d valium online] [http://wc1.worldcrossing.com/WebX/.1de60a13 order fioricet] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=115&forum=13 midi ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a2e cheap xanax] [http://wc1.worldcrossing.com/WebX/.1de60a23 free polyphonic ringtones] [http://wc1.worldcrossing.com/WebX/.1de609ed buy hoodia] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=113&forum=13 cheap lortab] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=85&forum=13 alprazolam online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=106&forum=13 cheap hydrocodone] [http://wc1.worldcrossing.com/WebX/.1de609f1 lortab online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=149&forum=13 cheap ultracet] [http://wc1.worldcrossing.com/WebX/.1de609ea free free ringtones] [http://wc1.worldcrossing.com/WebX/.1de609f4 free mono ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=88&forum=13 cheap carisoprodol] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=143&forum=13 free sony ringtones] [http://wc1.worldcrossing.com/WebX/.1de609fb ortho online] [http://wc1.worldcrossing.com/WebX/.1de60a07 free tracfone ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a22 but phentermine] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=125&forum=13 ortho online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=159&forum=13 cheap xenical] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=131&forum=13 prozac online] [http://wc1.worldcrossing.com/WebX/.1de609e1 carisoprodol online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=130&forum=13 cheap propecia] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=101&forum=13 flexeril] [http://wc1.worldcrossing.com/WebX/.1de609fe free qwest ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=100&forum=13 fioricet online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=105&forum=13 hoodia online] [http://wc1.worldcrossing.com/WebX/.1de60a36 cheap zyban] [http://people.msoe.edu/~millerni/forums.php?show=topic
== CSAI ==
 
CSAI works ok as ARM on land maps, using the AA2.23 or XTA7 mod.
 
CSAI is written in C#, by Hugh Perkins
 
== Supported Mods ==
 
*AA2.23
*XTA7
 
== Supported Platforms ==
 
*Windows
 
== Supported Maps ==
 
CSAI works best with maps with one large contiguous land segment.
 
The following maps have been tested and work ok:
*SmallDivide
*CometCatcher Remake v02
*SpeedMetal
*Small Supreme Battlefield
 
== Screenshots ==
 
CSAI scout sets off, SSB, XTA7:
 
[[File:csaivsaai_xta7_ssb_4zippysetsoffsmall.JPG]]
 
CSAI tanks leave trail of destruction through AAI base, SSB, XTA7:
 
[[File:csaivsaai_xta7_ssb_23trailofdestructionthroughaaibasesmall.JPG]]
 
CSAI tanks kill AAI commander on SSB, XTA7:
 
[[File:csaivsaai_xta7_ssb_25byebyeaaicommandersmall.JPG]]
 
CSAI (in red) approaches TSI base, SpeedMetal, AA2.23. That plasma beam could cause some pain.
 
[[File:csaivstsispeedmetal_arriveatbase.JPG]]
 
Plasma beam down, CSAI overruns TSI base, SpeedMetal, AA2.23.
 
[[File:csaivstsispeedmetal_2plasmagoneoverrun.JPG]]
 
CSAI (in red) attacks AAI, SpeedMetal, AA2.23
 
[[File:speedmetalzergsmall.JPG]]
 
CSAI units approach TSI base, SmallDivide, AA2.23
 
[[File:vstsismalldivide_1_attackgroupapproachingbase.JPG]]
 
CSAI units kill TSI commander, SmallDivide, AA2.23
 
[[File:vstsismalldivide_6tsicommanderdies.JPG]]
 
== Replays ==
 
Here are some replays to give you an impression of how CSAI fights.
 
CSAI vs AAI 0.75, XTA7:
 
Small Supreme Battlefield
 
*[http://hughperkins.com/csai/061026-SmallSupremeBattlefield-0.73b1-0-csai-vs-aai-xta7.sdf http://hughperkins.com/csai/061026-SmallSupremeBattlefield-0.73b1-0-csai-vs-aai-xta7.sdf]  
 
CSAI vs AAI 0.75, AA2.23:
 
*[http://hughperkins.com/csai/061023-SmallDivide-0.73b1-20.sdf http://hughperkins.com/csai/061023-SmallDivide-0.73b1-20.sdf]
*[http://hughperkins.com/csai/061023-CometCatcherRemake-v02-0.73b1-0.sdf http://hughperkins.com/csai/061023-CometCatcherRemake-v02-0.73b1-0.sdf]
*[http://hughperkins.com/csai/061025-SpeedMetal-0.73b1-2.sdf http://hughperkins.com/csai/061025-SpeedMetal-0.73b1-2.sdf]
 
CSAI vs TSI 0.12, AA2.23:
 
*[http://hughperkins.com/csai/061025-CometCatcherRemake-v02-0.73b1-3.sdf http://hughperkins.com/csai/061025-CometCatcherRemake-v02-0.73b1-3.sdf]
*[http://hughperkins.com/csai/061025-SpeedMetal-0.73b1-0-csai-vs-tsi-aa223.sdf http://hughperkins.com/csai/061025-SpeedMetal-0.73b1-0-csai-vs-tsi-aa223.sdf]
*[http://hughperkins.com/csai/061025-SmallDivide-0.73b1-0-csai-vs-tsi-aa223.sdf http://hughperkins.com/csai/061025-SmallDivide-0.73b1-0-csai-vs-tsi-aa223.sdf]
 
== Downloads ==
 
Latest release:
*[http://hughperkins.com/csai/CSharpAI-20061028.zip http://hughperkins.com/csai/CSharpAI-20061028.zip]
 
Previous releases:
*[http://hughperkins.com/csai/CSharpAI_20061026b.zip http://hughperkins.com/csai/CSharpAI_20061026b.zip]
*[http://hughperkins.com/csai/CSharpAI_20061026.zip http://hughperkins.com/csai/CSharpAI_20061026.zip]
*[http://hughperkins.com/csai/CSharpAI_20061025.zip http://hughperkins.com/csai/CSharpAI_20061025.zip]
*[http://hughperkins.com/csai/CSharpAI_20061024.zip http://hughperkins.com/csai/CSharpAI_20061024.zip]
 
== To Install ==
 
*Ensure that you have the Microsoft Framework .Net 1.1 runtime installed. You can download this from Microsoft, for free.
*Ensure that you have the latest version of Spring installed, 0.73b.
*Download the latest CSharpAI zipfile from the Downloads section and unzip it.
*Run setup.exe
*Confirm the Spring installation directory
*The CSAI dlls should be automatically installed into the Spring directory
 
== To use ==
 
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"
*<b>Important: ensure bot plays as ARM</b>
 
You can find a logfile in the Spring/AI/CSAI directory, called csharpai_team0.log  , where 0 is the name of the team
 
== 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 unitcount (countunits?)  Shows number of units currently
 
*.csai showmetalspots  Show detected optimal metal extractor positions. Also shows metalspots that have been marked used
 
*.csai tankscount  Find out how many tanks are available
*.csai tanksmoveto 0 500 1000    Move all team 0 tanks to position 500, 1000
 
*.csai autoshowenemieson  Shows detected mobile enemies (samson icon) and static enemies (antinuke icon)
 
== How to beat CSAI ==
 
Here are some strategies that will kill the current release of CSAI.
 
Massive concentration of defense near AI's base:
 
http://hughperkins.com/csai/screenshots/silpkillcsai-3.JPG
 
Replay:
[http://hughperkins.com/csai/silp3-061031-Core_Faf-0.73b1-2.sdf http://hughperkins.com/csai/silp3-061031-Core_Faf-0.73b1-2.sdf]
 
== Known issues ==
 
*All current released versions: on computers where the regional settings specifies the decimal separator as something other than ".", the metal cache will fail to load correctly. This means the commander will put extractors along the top of the screen and lose. This affects computers in France and Germany.
 
== Release notes ==
 
=== Release 28 October ===
 
C  /C# Interface
 
*corrected critical bug in AICallbackProxy::GetMetalMap()
*augmented number of allowed units to 10000 in AICallbackProxy
 
CSAI
 
*(experimental) created setup.exe to facilitate installation
 
=== Release 26 October 2006 b ===
 
C  /C# Interface
*No changes
 
CSAI
*created PackCoordinator architecture
*fixed bug that caused infantry factories to shutdown occasionally when playing XTA
*spreadsearch initiated more aggressively
 
=== Release 26 October 2006 ===
 
C  /C# Interface
*No changes
 
CSAI
*supports XTA 7
*modified Metal algo to prefer spots which are over actual metal, rather than offset to one side
*(experimental) clearance around metal extractors reduced to improve location precision. NOTE: this may increase unit blocking, to be verified
*you can turn debug on by creating an empty file called "debug.flg" in the ai/csai directory
*(experimental) added search algo for tanks if they havent seen an enemy for about a minute and there's at least 100 of them
*improved radar deployment
 
=== Release 25 October 2006 ===
 
C  /C# Interface
*No changes
 
CSAI
*added support for metal maps
*fixed bug with metalspots being marked used even if not
*added constructor controller, to ensure always at least one constructor
*added anti-sticking patch for constructors
*added memory for buildings to enemycontroller (since buildings cant move)
*corrected bugs in enemy selection algorithm
*trimmed cpu resource drain for stuck constructors
*removed default drawing of detected enemies; you can say ".csai autoshowenemieson" to reactivate this
*removed default drawing of planned construction site; you can say ".csai constructorshownextbuildsiteon" to reactivate this
*experimenting with kbot factory
*experimenting with replacing samsons by jethros
*factories no longer announce their creation
*added AttackPackCoordinator to improve pack grouping
 
=== Release 24 October 2006 ===
 
C  /C# Interface
*CSAI.dll moved to AI/CSAI (only CSAIInterfaces.dll remains in Spring root)
*<csailoaderfilename>.xml config file added, to configure which C# AI dll to load
*batchfile building no longer supported (please use nant)
*added IMoveData
*added IUnitDef.movedata
*added all command constants, eg MOVE, SELFD, to Command.cs
*added operators to Float3
*added UnitIsBusy to AICallback (checks GetCurrentUnitCommands returns empty deque)
*documentation moved to wiki at http://springrts.com/wiki/AI:CSAIInterface
 
CSAI
*added commands to move commander, and get commander to build things
*logfiles moved to AI/CSAI , in line with AI standards
*batchfile building no longer supported (please use nant)
*UnitController added, to register player-owned units
*FactoryController added, to register player-owned factories
*added port of AF's UnitDefHelp
*added architecture for strategies
*event architecture added to CSAI for unitcreated, unitfinished, unitdamaged, etc
*added PowerController to control energy
*added MetalController to control metal
*added TankController to manage tanks (bootstrapping class only)
*added EnemyController to monitor enemies
*added RadarController to manage radars
*added simple heuristic to prevent commander blocking himself in or factories
*added ScoutController
*added Request system to factories, to decide what to build
*documentation moved to wiki at http://springrts.com/wiki/AI:CSAI
 
== Developer resources ==
 
You may wish to extend or modify CSAI. If so, the following pages may be useful:
 
* github repo: https://github.com/hughperkins/SpringRTS-CSharpAI
*[[CSAI Build Instructions]] How to build CSAI
*[[AI:CSAIInterface]]   Information on the C  /C# interface
[[Category:AI]]

Latest revision as of 11:31, 9 August 2015

CSAI

CSAI works ok as ARM on land maps, using the AA2.23 or XTA7 mod.

CSAI is written in C#, by Hugh Perkins

Supported Mods

  • AA2.23
  • XTA7

Supported Platforms

  • Windows

Supported Maps

CSAI works best with maps with one large contiguous land segment.

The following maps have been tested and work ok:

  • SmallDivide
  • CometCatcher Remake v02
  • SpeedMetal
  • Small Supreme Battlefield

Screenshots

CSAI scout sets off, SSB, XTA7:

CSAI tanks leave trail of destruction through AAI base, SSB, XTA7:

CSAI tanks kill AAI commander on SSB, XTA7:

CSAI (in red) approaches TSI base, SpeedMetal, AA2.23. That plasma beam could cause some pain.

Plasma beam down, CSAI overruns TSI base, SpeedMetal, AA2.23.

CSAI (in red) attacks AAI, SpeedMetal, AA2.23

CSAI units approach TSI base, SmallDivide, AA2.23

CSAI units kill TSI commander, SmallDivide, AA2.23

Replays

Here are some replays to give you an impression of how CSAI fights.

CSAI vs AAI 0.75, XTA7:

Small Supreme Battlefield

CSAI vs AAI 0.75, AA2.23:

CSAI vs TSI 0.12, AA2.23:

Downloads

Latest release:

Previous releases:

To Install

  • Ensure that you have the Microsoft Framework .Net 1.1 runtime installed. You can download this from Microsoft, for free.
  • Ensure that you have the latest version of Spring installed, 0.73b.
  • Download the latest CSharpAI zipfile from the Downloads section and unzip it.
  • Run setup.exe
  • Confirm the Spring installation directory
  • The CSAI dlls should be automatically installed into the Spring directory

To use

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"
  • Important: ensure bot plays as ARM

You can find a logfile in the Spring/AI/CSAI directory, called csharpai_team0.log , where 0 is the name of the team

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 unitcount (countunits?) Shows number of units currently
  • .csai showmetalspots Show detected optimal metal extractor positions. Also shows metalspots that have been marked used
  • .csai tankscount Find out how many tanks are available
  • .csai tanksmoveto 0 500 1000 Move all team 0 tanks to position 500, 1000
  • .csai autoshowenemieson Shows detected mobile enemies (samson icon) and static enemies (antinuke icon)

How to beat CSAI

Here are some strategies that will kill the current release of CSAI.

Massive concentration of defense near AI's base:

silpkillcsai-3.JPG

Replay: http://hughperkins.com/csai/silp3-061031-Core_Faf-0.73b1-2.sdf

Known issues

  • All current released versions: on computers where the regional settings specifies the decimal separator as something other than ".", the metal cache will fail to load correctly. This means the commander will put extractors along the top of the screen and lose. This affects computers in France and Germany.

Release notes

Release 28 October

C /C# Interface

  • corrected critical bug in AICallbackProxy::GetMetalMap()
  • augmented number of allowed units to 10000 in AICallbackProxy

CSAI

  • (experimental) created setup.exe to facilitate installation

Release 26 October 2006 b

C /C# Interface

  • No changes

CSAI

  • created PackCoordinator architecture
  • fixed bug that caused infantry factories to shutdown occasionally when playing XTA
  • spreadsearch initiated more aggressively

Release 26 October 2006

C /C# Interface

  • No changes

CSAI

  • supports XTA 7
  • modified Metal algo to prefer spots which are over actual metal, rather than offset to one side
  • (experimental) clearance around metal extractors reduced to improve location precision. NOTE: this may increase unit blocking, to be verified
  • you can turn debug on by creating an empty file called "debug.flg" in the ai/csai directory
  • (experimental) added search algo for tanks if they havent seen an enemy for about a minute and there's at least 100 of them
  • improved radar deployment

Release 25 October 2006

C /C# Interface

  • No changes

CSAI

  • added support for metal maps
  • fixed bug with metalspots being marked used even if not
  • added constructor controller, to ensure always at least one constructor
  • added anti-sticking patch for constructors
  • added memory for buildings to enemycontroller (since buildings cant move)
  • corrected bugs in enemy selection algorithm
  • trimmed cpu resource drain for stuck constructors
  • removed default drawing of detected enemies; you can say ".csai autoshowenemieson" to reactivate this
  • removed default drawing of planned construction site; you can say ".csai constructorshownextbuildsiteon" to reactivate this
  • experimenting with kbot factory
  • experimenting with replacing samsons by jethros
  • factories no longer announce their creation
  • added AttackPackCoordinator to improve pack grouping

Release 24 October 2006

C /C# Interface

  • CSAI.dll moved to AI/CSAI (only CSAIInterfaces.dll remains in Spring root)
  • <csailoaderfilename>.xml config file added, to configure which C# AI dll to load
  • batchfile building no longer supported (please use nant)
  • added IMoveData
  • added IUnitDef.movedata
  • added all command constants, eg MOVE, SELFD, to Command.cs
  • added operators to Float3
  • added UnitIsBusy to AICallback (checks GetCurrentUnitCommands returns empty deque)
  • documentation moved to wiki at http://springrts.com/wiki/AI:CSAIInterface

CSAI

  • added commands to move commander, and get commander to build things
  • logfiles moved to AI/CSAI , in line with AI standards
  • batchfile building no longer supported (please use nant)
  • UnitController added, to register player-owned units
  • FactoryController added, to register player-owned factories
  • added port of AF's UnitDefHelp
  • added architecture for strategies
  • event architecture added to CSAI for unitcreated, unitfinished, unitdamaged, etc
  • added PowerController to control energy
  • added MetalController to control metal
  • added TankController to manage tanks (bootstrapping class only)
  • added EnemyController to monitor enemies
  • added RadarController to manage radars
  • added simple heuristic to prevent commander blocking himself in or factories
  • added ScoutController
  • added Request system to factories, to decide what to build
  • documentation moved to wiki at http://springrts.com/wiki/AI:CSAI

Developer resources

You may wish to extend or modify CSAI. If so, the following pages may be useful: