Basically SC1 was reversed via memory location reading and was long the staple playground for AI competitions. University teams and what not.
Blizzard knew of this and silently condoned it. When SC 2 came around they helped move things over because who doesn't want that epic AI PR.
Not 100% sure how it's achieve technically on SC2 but blizzard is definitely actively helping push this technically. (within limits - they counterweight is they don't want to help cheaters hack their stuff)
>Q. How does AlphaStar perceive the game?
>A. Like human players, AlphaStar perceives the game using a camera-like view. This means that AlphaStar doesn’t receive information about its opponent unless it is within the camera’s field of view, and it can only move units to locations within its view. All limits on AlphaStar’s performance were designed in consultation with pro players.
Most humans will be able to identify cloaked units, but only if they look carefully, and not in heavy battle. Can the AIs see and/or identify cloaked units?
It begs the question if fair gameplay is even possible unless the AI uses machine vision against the same interface. For fair human-vs-AI games, they shouldn't allow cloaked units!
I do agree that detecting cloaked (or burrowed) units is a bit of an interesting case, since a simple API like I mentioned would make it trivial for the AI to detect these units. Perhaps you could do some sort of probabilistic system, or some sort of "attention" system where the AI has to choose where on the game screen to spend its limited attention, and more attention in an area around a cloaked units would increase the probability of the AI "detecting" the cloaked unit. That probably comes close to matching how humans detect cloaked units, e.g. when you're deliberately looking for an observer around your army you have an almost 100% chance of finding it if it's there.
The github repo shows that the AI takes an Observe action, and it essentially gets data on every unit it can see in a machine friendly format.
The previous version got info on every unit it could conceivable witness, including units that were offscreen, but technically 'visible' according to the game rules. This version seems to have changed that to only return units that are actually /on/ the screen.
It might be "unfair" for some almost purely number-based confrontation like a phoenix-versus-phoenix battle. But are we really that impressed by testing which human happened to be better at estimating the number of stacked phoenixes? To me, that's not what's interesting about competitive Starcraft 2. I'm more interested in micro, like pulling back injured units, or choices like "it makes sense for me to force us to trade out our phoenixes right now even if I lose the battle."
Because of that they have a problem with invisible and burrowed units - human players can miss the shimmer/shadow because it's barely visible, but their AI sees it every time. I think they gave up on simulating this stochastic human behavior.
Still, the game is complex enough that the fact that they can play it at a professional level might as well be a miracle.