So a little background. A pair of friends and I were playing a vanilla game (One of the players didn't have the expansions when we started the match) against two lvl 6 AIs (Sledgehammer and Spec Ops if it matters.) We were about 3 hours in, at 335 progress, and had secured our borders, a few adv research, and an adv factory. In preparation of making the system hops to kill the AI Homeworlds we decided to do a little research raiding. So we choose a MkI or MkII system we had recently neutered because of an AI Eye and began the raid. Everything went fine until the first MkIII science stations were built, and then within minutes all three of our fleets were wiped out. In retrospect we should have pulled out and scraped the science than lose our fleets, but we thought it was just a MkI/II world, and just didn't pay close attention. But instead we got swarmed by about 2700 MkIII threat. Several intense minutes and a nuke later we are secure again...barely.
But this leads me to my question. How exactly does the AI decide what to spawn during a research raid? I was under the impression that it was based on the level of the world itself, but that was certainly 2700+ MkIII ships that the AI was spawning in response to our sabotage. I couldn't find the answer to this on the wiki or forums (tho that doesn't mean it isn't there, just that my search-fu is not very strong), so I figured I could ask the community directly.