C/C++ AI Beginner
Moderators: hoijui, Moderators
-
- Posts: 14
- Joined: 21 Mar 2010, 07:13
C/C++ AI Beginner
Hello,
I'm a uni student that has decided to use Spring for an AI project as a part of a uni subject I'm doing (the other cantidate was StarCraft).
I'm a TA fan so I tried to find a mod as close to OTA as possible, and I think I've settled on BA, unless there are any other mods that are closer to OTA? For now I'm aiming to get my AI playing one mod, on one map, with fixed settings/starting positions, in order to improve consistency in testing and development.
I currently use a Windows 7 x64 development environment with Visual Studio 2008, but I have access to other versions and I can also use XP if that helps. Using Linux is NOT an option.
I also wish to use C/C++ (preferably C++, the OO functionality will help) for coding the AI.
From what I can tell, Spring seems to be in a fair state of flux and change with regards to the interface, is this true?
Does anyone have any ideas for a total beginner? I read up all the info I could find on the Wiki, but it didn't help as much as I'd hoped.
Once I get started with the coding and working out Spring's interface, I should be fine. I just need some advice for the initial steps.
Thank you anyone who can offer advice, and congratulations on the awesome AIs you've all developed, and Spring itself of course.
Edit:
Hm, this should help.
http://darkstars.co.uk/2010/vs2008-ais-and-the-c-api/
Is this the latest API for Spring?
I did read about the LegacyCPP wrapper, but I assumed we weren't supposed to use it, considering it's 'legacy'...
I'm a uni student that has decided to use Spring for an AI project as a part of a uni subject I'm doing (the other cantidate was StarCraft).
I'm a TA fan so I tried to find a mod as close to OTA as possible, and I think I've settled on BA, unless there are any other mods that are closer to OTA? For now I'm aiming to get my AI playing one mod, on one map, with fixed settings/starting positions, in order to improve consistency in testing and development.
I currently use a Windows 7 x64 development environment with Visual Studio 2008, but I have access to other versions and I can also use XP if that helps. Using Linux is NOT an option.
I also wish to use C/C++ (preferably C++, the OO functionality will help) for coding the AI.
From what I can tell, Spring seems to be in a fair state of flux and change with regards to the interface, is this true?
Does anyone have any ideas for a total beginner? I read up all the info I could find on the Wiki, but it didn't help as much as I'd hoped.
Once I get started with the coding and working out Spring's interface, I should be fine. I just need some advice for the initial steps.
Thank you anyone who can offer advice, and congratulations on the awesome AIs you've all developed, and Spring itself of course.
Edit:
Hm, this should help.
http://darkstars.co.uk/2010/vs2008-ais-and-the-c-api/
Is this the latest API for Spring?
I did read about the LegacyCPP wrapper, but I assumed we weren't supposed to use it, considering it's 'legacy'...
Re: C/C++ AI Beginner
try the mod BOTA (should be closer to OTA, than BA), also pm error ohoiji
-
- Posts: 14
- Joined: 21 Mar 2010, 07:13
Re: C/C++ AI Beginner
pm error ohoiji?manolo_ wrote:try the mod BOTA (should be closer to OTA, than BA), also pm error ohoiji
And ooops! Totally missed BOTA, not sure how Thanks heaps for that suggestion. That should be perfect then. I hope com stealing still works, my eventual goal is to get the AI to do that and other odd tactics
Also, I've done a bit more reading, and I think I understand the state of the interface now. It was C++, but now it's C. So is there a 'non-legacy' wrapper? Or should I write my own around the C API?
Re: C/C++ AI Beginner
error was probably Error323, the guy who makes E323AI. hoijui is the engine AI wrapper developer, so he's the definitive source of answers to certain questions. you can also post here and/or check #sy and #ai in the lobby.
AFAIK there are now two C++ wrappers, but I've only used the legacy one.
AFAIK there are now two C++ wrappers, but I've only used the legacy one.
Re: C/C++ AI Beginner
yeah.. i recommend using the new C++ wrapper.
it is not used by any released AI yet, but it is already in use too.
though... the visual studio projects do not support that, and generally.. i can not recommend them for AI dev. CMake is the official build system, and it is needed for the new C++ Wrapper.
it is not used by any released AI yet, but it is already in use too.
though... the visual studio projects do not support that, and generally.. i can not recommend them for AI dev. CMake is the official build system, and it is needed for the new C++ Wrapper.
Re: C/C++ AI Beginner
Im using the C++ API hence the blog post, I have units building other units with it, and it all seems to work and rather nicely.
I have a project due for release within the next few days that may be of interest to you and anyone else in development, although it's of limited interest for competitive AI development atm
I have a project due for release within the next few days that may be of interest to you and anyone else in development, although it's of limited interest for competitive AI development atm
Re: C/C++ AI Beginner
There is also Hardcore Annihilation, which is probably the closest mod to TA available. It is developed by Pxtl, but has gone unmaintained for a while, though.
Ergh, grammar.
Ergh, grammar.
-
- Posts: 14
- Joined: 21 Mar 2010, 07:13
Re: C/C++ AI Beginner
Many thanks for all the help and suggestions so far!
I shall look into BOTA and Hardcore Annihilation too as games. Probably BOTA as it seems to be a bit more maintained. However I am open to eventually making the AI configurable, if people like it :) That way it could play other games too.
The AI will probably be open source too, unless there's a REALLY good reason not to do that. Which is unlikely...
I shall look into BOTA and Hardcore Annihilation too as games. Probably BOTA as it seems to be a bit more maintained. However I am open to eventually making the AI configurable, if people like it :) That way it could play other games too.
The AI will probably be open source too, unless there's a REALLY good reason not to do that. Which is unlikely...
Re: C/C++ AI Beginner
AI has to be GPL 2 and later, as it links to spring which uses that Licensing.
I also recommend you to use Git as SCM, because it is good, you will be able to integrate the AI well with spring (git submodule), and you can get tons of help from spring and other AI devs, in case you are new to it.
good luck!
I also recommend you to use Git as SCM, because it is good, you will be able to integrate the AI well with spring (git submodule), and you can get tons of help from spring and other AI devs, in case you are new to it.
good luck!
Re: C/C++ AI Beginner
AIs do not have to be GPL compatible.
SJ made a general excemption for AIs aftr the AI interface was first introduced so as to avoid legal wrangling and people leaving over being forced to opensource closed AIs.
SJ made a general excemption for AIs aftr the AI interface was first introduced so as to avoid legal wrangling and people leaving over being forced to opensource closed AIs.
-
- Posts: 14
- Joined: 21 Mar 2010, 07:13
Re: C/C++ AI Beginner
Yeah, I suspected that about Spring and GPL... as I said, it'll probably be open source anyway. Time will tell, need to write the darn thing first!
I'll probably use SVN, mainly because that's what I'm familiar with. Obviously if my AI ever makes it near the main Spring release or whatever I'll migrate it to git. We're starting to use git at work so I gotta learn it sooner or later :) As you can tell I'm very much a Windows based developer - I've done some Linux related stuff for work and of course uni, it's just never grown on me
I'm yet to start any serious development, hopefully tomorrow. Been a bit distracted by SupCom 2 and stuff Now THAT is a game that could use a new AI...
I'll probably use SVN, mainly because that's what I'm familiar with. Obviously if my AI ever makes it near the main Spring release or whatever I'll migrate it to git. We're starting to use git at work so I gotta learn it sooner or later :) As you can tell I'm very much a Windows based developer - I've done some Linux related stuff for work and of course uni, it's just never grown on me
I'm yet to start any serious development, hopefully tomorrow. Been a bit distracted by SupCom 2 and stuff Now THAT is a game that could use a new AI...
Re: C/C++ AI Beginner
don't go svn->git, it'll bite your ass sooner or later. start with git and learn along the way.
Re: C/C++ AI Beginner
Im using svn atm, purely because github makes me pay for privacy, probably better ways of doing it but meh
Re: C/C++ AI Beginner
AF you can store your backup git repository anywhere, e.g. on your server via ftp, etc.
Re: C/C++ AI Beginner
+1 to what imbaczek said.
as you can see, there are already 3 guys in here willing to help you with git and in #sy you will always find some, and it will save you time and nerves in the long run, if you start with it.
as you can see, there are already 3 guys in here willing to help you with git and in #sy you will always find some, and it will save you time and nerves in the long run, if you start with it.