Im looking at using SC for a university AI project, but I'd like to know more about what I can get from the system, and what I can access via Lua before I commit myself.
First up, is there any way to interface with the path planner? Not to change the algorithm, but more to compute the length of the path. Or is it completely cut off (as I suspect it would be)?
Second, what kind of properties do units and buildings have? I came across this spreadsheet (http://www.supcomuniverse.com/forum/sho ... .php?t=905), but its incomplete and pretty old. Things such as unit speed would be pretty useful.
Finally, and this is more of a software question, is it possible to communicate with a Lua AI mod from another process? Im looking at modelling PDDL style Planning domains which would require a piece of middle layer translation between the Planning software and the game itself.
Thanks|||you should download and read through both Sorian's AI and Duncane's AI Fixes for the FA AI.
what you want is to learn both the unit blueprint files (that's learnable via all the many modding tutorials) and the specifics of the AI system (that's a lot more complicated, but you're doing an Uni. level AI project so it shouldn't be out of your league). i do believe there's a few AI related hints in the forum stickies (if not here, then in Mod Dev. Support).
Sorian and Duncane are the real AI masters here, so wait for their input.|||Okay...
Pathing is in aiattackutilities.lua. Look for the function GeneratePath and AStarLoopBody. If you've done university CS you would have seen the traveling salesman problem and possible A* optimization... so if you think you can do better than GPG then give it a go. I havent made many changes there, but Sorian has made some significant improvements in pathing so check his code out. Note that FA maps have markers that drastically reduce the required pathing nodes if used well.
For unit info check out the supcom unit db at:
http://supcomdb.com/db/
Click on a unit to see a nice view of it. Click on the link at the top to see its blueprint in lua format (which is in the unit.scd file in game data). That should give you all the unit info you need.
In regards to communicating with lua code running in SC/FA... the answer is NO. GPG have disabled the IO and net routines for security purposes. So any AI code you create has to be stand alone and hence can't learn. (Note there is one possible work around in that you can write to the games.pref file and the game log). But that doesnt matter because SC is like chess.... it should be possible to predict all game positions in advance.
Anyway there's a nice detailed but vague post for SC/FA AI... which is just like your question

Cheers
Duncane
No comments:
Post a Comment