CSAI now compatible with XTA
Moderators: hoijui, Moderators
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
CSAI now compatible with XTA
CSAI now compatible with XTA
Latest CSAI release: [snipped, please see http://taspring.clan-sy.com/wiki/AI:CSAI#Downloads]
Benchmarking: won against AAI on SmallDivide, SpeedMetal, CometCatcher Remake v2, playing ARM on XTA 7
Latest CSAI release: [snipped, please see http://taspring.clan-sy.com/wiki/AI:CSAI#Downloads]
Benchmarking: won against AAI on SmallDivide, SpeedMetal, CometCatcher Remake v2, playing ARM on XTA 7
Last edited by hughperkins on 30 Oct 2006, 23:39, edited 2 times in total.
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
Non-cheating.Is this a cheating or non-cheating AI?
You can turn on debug mode as a spectator to watch it learn the position of its enemies to convince yourself of this.
Just say ".csai autoshowenemieson" and any detected enemy mobile unit positions will show up as transparent samsons. Any detected enemy buildings will show up as transparent anti-nukes. You will see these appear when CSAI units go within radar and LOS of enemy units.
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
New release of CSAI:
*[snipped, please see http://taspring.clan-sy.com/wiki/AI:CSAI#Downloads ]
Changes this release:
*fixed bug that caused infantry factories to shutdown occasionally when playing XTA
*spreadsearch initiated much more aggressively, to give clean wins
Here's a replay of this version of CSAI playing AAI on SSB using XTA:
*http://manageddreams.com/csai/061026-Sm ... i-xta7.sdf
Note the spreadsearch initiated around gametime 22:40 and 24:00 to finish off those last few metal extractors.
*[snipped, please see http://taspring.clan-sy.com/wiki/AI:CSAI#Downloads ]
Changes this release:
*fixed bug that caused infantry factories to shutdown occasionally when playing XTA
*spreadsearch initiated much more aggressively, to give clean wins
Here's a replay of this version of CSAI playing AAI on SSB using XTA:
*http://manageddreams.com/csai/061026-Sm ... i-xta7.sdf
Note the spreadsearch initiated around gametime 22:40 and 24:00 to finish off those last few metal extractors.
Last edited by hughperkins on 30 Oct 2006, 23:39, edited 1 time in total.
- 1v0ry_k1ng
- Posts: 4656
- Joined: 10 Mar 2006, 10:24
The so-called dreaded KAI is non-operational at the moment...
At least I wasn't able to make version 0.11 or 0.2 do any good at all with XTA or AA using the compiled libraries AF provided.
Hugh, I ran into a problem:
I started a map of Crossing_4_final with 1 AAI (0.76) and 1 CSAI (20061026b). Everything went smooth, CSAI won.
Next I thought to let them play against each other on Small Supreme Battlefield. Since this map is rather big, I decided on 2 AAI and 2 CSAI. The first instance worked fine, the second ran through the water to one of the islands and built 2 metal extractors right beside each other, on a spot where there is no metal at all.
I thought maybe 2 instances of CSAI wasn't such a good idea, so I restarted with 1 AAI versus 1 CSAI. This time the only CSAI ran to that island again, right after building a 2 or 3 buildings on the mainland.
Then I deleted the metal cache file to have it recreated... But now I get this error everytime I start SSB with CSAI:
- deleted the whole cache folder (starting Crossing_4_final again works fine)
- reinstalled all files of CSAI (since I have no clue what those .pdb files are for, but they seemed not to have changed)
- restarted TASClient of course
- .reloadai (which got completely ignored, since CSAI wasn't successfully loaded in the first place, right?)
I have not rebooted yet...
Help! :)
EDIT: uhhmm, errrrmm... While typing I thought I should start another SSB with 1 AAI versus 1 CSAI to add to the quote the output that a .csai help gives... But now it works?! No more error?! Nevermind then... I guess?
Just for the record: I pride myself to think, that my windows desktop is pretty stable and that there shouldn't be any damaged RAM in it
At least I wasn't able to make version 0.11 or 0.2 do any good at all with XTA or AA using the compiled libraries AF provided.
Hugh, I ran into a problem:
I started a map of Crossing_4_final with 1 AAI (0.76) and 1 CSAI (20061026b). Everything went smooth, CSAI won.
Next I thought to let them play against each other on Small Supreme Battlefield. Since this map is rather big, I decided on 2 AAI and 2 CSAI. The first instance worked fine, the second ran through the water to one of the islands and built 2 metal extractors right beside each other, on a spot where there is no metal at all.
I thought maybe 2 instances of CSAI wasn't such a good idea, so I restarted with 1 AAI versus 1 CSAI. This time the only CSAI ran to that island again, right after building a 2 or 3 buildings on the mainland.
Then I deleted the metal cache file to have it recreated... But now I get this error everytime I start SSB with CSAI:
I tried a few things:GlobalAI1: Metal analyzer rebuilding cachefile
GlobalAI1: Exception: System.TypeInitializationException: The type initializer for 'CSharpAI.Metal' threw an exception. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at AICallbackToGiveToCS.GetMetalMap()
at CSharpAI.Metal.SearchMetalSpots() in h:\dev\test\CSharpAI\CSAI\Metal.cs:line 349
at CSharpAI.Metal..ctor() in h:\dev\test\CSharpAI\CSAI\Metal.cs:line 72
at CSharpAI.Metal..cctor() in h:\dev\test\CSharpAI\CSAI\Metal.cs:line 55
--- End of inner exception stack trace ---
at CSharpAI.Metal.GetInstance()
at CSharpAI.CSAI.InitAI(IAICallback aicallback, Int32 team) in h:\dev\test\CSharpAI\CSAI\CSAI.cs:line 114
- deleted the whole cache folder (starting Crossing_4_final again works fine)
- reinstalled all files of CSAI (since I have no clue what those .pdb files are for, but they seemed not to have changed)
- restarted TASClient of course
- .reloadai (which got completely ignored, since CSAI wasn't successfully loaded in the first place, right?)
I have not rebooted yet...
Help! :)
EDIT: uhhmm, errrrmm... While typing I thought I should start another SSB with 1 AAI versus 1 CSAI to add to the quote the output that a .csai help gives... But now it works?! No more error?! Nevermind then... I guess?
Just for the record: I pride myself to think, that my windows desktop is pretty stable and that there shouldn't be any damaged RAM in it

OK... Now that CSAI did not crash I ran a few games on SSB...
CSAI's commander always runs to the upper-left island and builds 2 non-sense metal extractors and just stays there, not moving at all.
In one game I let 3 AAI play against 3 CSAI... now that was HILARIOUS! All 3 AAI build a shipyard in that small lake at the lower-left and all 3 CSAI commanders ran and stood at the upper-left island... LOL
So I deleted the metal.xml again -> same error as above...
I even rebooted -> same error...
Something is wrong, my computer doesn't seem to be able to create a usuable metal.xml for SSB. .NET Framework 2.0 installed here... I uninstalled 1.1 because 2.0 seemed to do the job...
I like the way CSAI plays (guarding commander; nice movement while attacking; faster units waiting for backup from slower ones; etc) I think it has great potential :) Haven't seen it build a single adv. lab yet, though.
Giving up for the time being.
CSAI's commander always runs to the upper-left island and builds 2 non-sense metal extractors and just stays there, not moving at all.
In one game I let 3 AAI play against 3 CSAI... now that was HILARIOUS! All 3 AAI build a shipyard in that small lake at the lower-left and all 3 CSAI commanders ran and stood at the upper-left island... LOL
So I deleted the metal.xml again -> same error as above...
I even rebooted -> same error...
Something is wrong, my computer doesn't seem to be able to create a usuable metal.xml for SSB. .NET Framework 2.0 installed here... I uninstalled 1.1 because 2.0 seemed to do the job...
I like the way CSAI plays (guarding commander; nice movement while attacking; faster units waiting for backup from slower ones; etc) I think it has great potential :) Haven't seen it build a single adv. lab yet, though.
Giving up for the time being.
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
Chojin,
re: Metal.cs line 349 problem
Could you try downloading a new csailoader.dll from http://manageddreams.com/utils/csailoader.dll and overwriting the one that you currently have in AI\Bot-libs please?
re: playing 3 CSAI vs 3 AAI on SSB
The current Metal.cs makes no attempt to check whether metal spots are underwater or not. Edit: but actually SSB has no underwater metal spots???
Allied CSAIs do not currently detect metalspots occupied by other allies.
re: Metal.cs line 349 problem
Could you try downloading a new csailoader.dll from http://manageddreams.com/utils/csailoader.dll and overwriting the one that you currently have in AI\Bot-libs please?
re: playing 3 CSAI vs 3 AAI on SSB
The current Metal.cs makes no attempt to check whether metal spots are underwater or not. Edit: but actually SSB has no underwater metal spots???
Allied CSAIs do not currently detect metalspots occupied by other allies.
Hey Hugh 
I was just about to do what you suggested yesterday, when I saw you built another loader.dll.
Ok, this one does not crash anymore while creating the metal cache file. I tried 10 times in a row on SSB deleting metal.xml before each time. Commander builds fine.
A friend of mine just told me, he had the same crash as me. The new loader.dll is working fine for him too. He has .NET 1.1 only installed.
Now, I guess there is still a problem reading the existing metal.xml. When it didn't have to be created during the current game, but was created in a previous one, the CSAI commander will build 1 solar and 1 lab, and then head to the the upper-left island and build 2 non-sense metal extrators there. Then the Commander will just stand there forever.
My friend is having the same problem. If we remove the file Small Supreme Battlefield.smf_metal.xml before a game, everything will be fine.
I uploaded all neccessary files to debug I hope:
- metal.xml created during the current game here
- metal.xml created in the previous game here
I also like to suggest the following, if it is possible somehow:
- Units guarding the Commander get so close to him, that he can barely move nor build properly. Is it possible to make those units guard instead of trying to move into the Commander?
- It happened a few times, that the CSAI ran out of metal, while the Commander was building a metal extractor and completely ignoring the 500 metal stone right beside him. Is it possible to reclaim when the need arises?
Thanks,
Marc

I was just about to do what you suggested yesterday, when I saw you built another loader.dll.
Ok, this one does not crash anymore while creating the metal cache file. I tried 10 times in a row on SSB deleting metal.xml before each time. Commander builds fine.

A friend of mine just told me, he had the same crash as me. The new loader.dll is working fine for him too. He has .NET 1.1 only installed.
Now, I guess there is still a problem reading the existing metal.xml. When it didn't have to be created during the current game, but was created in a previous one, the CSAI commander will build 1 solar and 1 lab, and then head to the the upper-left island and build 2 non-sense metal extrators there. Then the Commander will just stand there forever.
My friend is having the same problem. If we remove the file Small Supreme Battlefield.smf_metal.xml before a game, everything will be fine.
I uploaded all neccessary files to debug I hope:
- metal.xml created during the current game here
- metal.xml created in the previous game here
I also like to suggest the following, if it is possible somehow:
- Units guarding the Commander get so close to him, that he can barely move nor build properly. Is it possible to make those units guard instead of trying to move into the Commander?
- It happened a few times, that the CSAI ran out of metal, while the Commander was building a metal extractor and completely ignoring the 500 metal stone right beside him. Is it possible to reclaim when the need arises?
Thanks,
Marc
- 1v0ry_k1ng
- Posts: 4656
- Joined: 10 Mar 2006, 10:24
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
- 1v0ry_k1ng
- Posts: 4656
- Joined: 10 Mar 2006, 10:24