Description
I'm trying to make an AI that doesn't hardcode any of the tech tree, and instead infers it from the _game_data attribute of the bot at runtime. So far I'm able to pretty much build the tech tree from _game_data.units, using the tech_requirement attribute; this lets me build the tech tree as far as buildings.
The problem is with incorporating army units and research. For instance, colossi can be seen to depend on a robotics bay from its tech_requirement field, but an immortal has no tech_requirement, but you need a robotics facility to build it. All units have a creation_ability field, but there's no way to see which building can use that ability. Upgrades have the same problem.
So basically, my question is: is there a way to check, given a particular ability, which unit type(s) can use that ability? Or is there some other way to be able to tell which buildings can create which units programmatically?