Thanks for the answers. Plenty of good ideas that I'm going to investigate.
- mapinfo.lua (seems of very low reliability - going to have a look at some maps)
- cheating and peeking all units (seems average reliability - need to try to check if it always works or not) (thanks for the tip "gameframe ~10")
- "games expose the table of startpoints that were actually used to GG" - not finding from code nor from the game's data how to find this - need to look with more attention (I might not know enough how modern "games" are built)
- "callback->GetGame()->GetSetupScript()": quite important functionality. Thanks.
Jools wrote:...
Getting all units at start may not be accurate either, that would include animals and other units on gaia team, ...
If I manage to get all units shortly after start, I guess I can just check each unit's team and disregard the "neutral" ones.
Silentwings wrote:...
If all you want to know is where the starting units were actually placed, as opposed to the possible locations where they could have been placed, ...
I'm aiming at building up a toy AI that interacts with the game as much as a human as possible - I, as a player, do not know exactly where the other player spawned, I merely infer it from knowledge of other things (which I'm trying to get in the AI).
I'm looking to build it as non-cheating as possible, if nothing else because there's the possibility that the engine won't allow certain things. But also, because if it cheats, it can just cheat in ways that almost guarantee it a win - I think we can just spawn whatever unit wherever by command.
Silentwings wrote:...
@PaulMorpheus; To make it clear, there is no fully reliable way to determine which units are used by which games as start units and you just have to hardcode something game dependent for each game you want to cover

...
Not completely unexpected. I already knew there will have to be plenty of specialization to specific "games", especially considering how varied the games for SpringRTS can be (*). Heck, even our own (non-A)I's have adaptations to specific mods - back in the day I was a good player of most versions of XTA, average at BA and completely sucked at NOTA (just to mention some oTA variations).
* either that or build such an adaptable/learning AI that I don't even want to think how much work that would be...