Sorry, that was confusing. I've removed the line "There is no cap as to how many ships an AI player can have at any given planet, although the AI will sometimes choose to turn excess defensive waves to offensive purposes (the "Attack Forming at Planet X" warning)." which is wrong and outdated.
The next sentence, with the "minimum cap of 250 and a maximum cap of 2500" I have also changed to "minimum cap of 250 and a maximum cap of 2500 (per AI player)," which is the case as eRe4s3r says.
Also it seems to be that frequently a lot of people here mention planets that have something like 3000-4000+ ships, when in the second paragraph it says the cap is 2500. How is this explained, is it because of patrols?
Just as an added note to the above, those caps don't include the patrols, which might push it even higher on occasion.
And also I'm confused as to how to reroute special guard post patrols. There is kind of a "crossroads" planet that divides east from west, I have taken out every spec guard post within 2 jumps of this planet (like 8 or so spec guard posts), and they are still sending spec guard patrols through (I am certain they are spec guards because when I abandon this crossroad planet they cross between west and east not going towards me but towards some far off guard post). How does the AI choose which spec guard posts to go between? Is it possible that they are patrolling from one spec guard post on the far east going to the far west in which case I can't reasonably hope to dwindle the number of patrols unless I find every last guard post in the galaxy?
AI ships will route between any special forces guard posts that are there, no matter how far apart there are. If you had only two left in the galaxy, on opposite ends, they would route between those. To keep them from patrolling through a crossroads planet you'd need to destroy all the special forces guard posts on one side of the crossroads. Same thing is true of trains. Normally special forces ships (and trains, actually) prefer to go between planets that are about 3 hops away from their current location, and if that fails, then they would go to ones 2 hops away if possible, and otherwise they just pick one at random, wherever they might be.
One important note, though: special forces ships are only added to the galaxy when a planet containing a special forces guard post is reinforced. So if all the on-alert planets have no special forces guard posts, then the number of special forces ships would eventually dwindle to extremely low values. So you can affect their overall numbers that way, or the routes they take by destroying nodes in general.