I am not sure this question is really interesting because the aim of solving Starcraft is to improve planning and strategies, not computer vision. I suppose there are much more interesting tasks train on in order to solve computer vision.
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.