I haven't changed the logic for how many guardians start on each post... ever, actually. So it should be whatever Chris set up last, back in the 4.0/5.0 days.
But I'll take a look at the current/cap and maybe make some revisions when I'm in there.
How do you think it should answer the question "how many guardians should planet X start with?" ?
How about an expected value of .4 to .6 for every non wormhole guard post, with no more than 2 on a single guard post? And a planetary max of min(.9 * that planet's guard posts,
guardians per world? (No planetary min, to allow some worlds to seed without guardians).
EDIT3: Some sort of extra logic would need to be made to ensure that galactic average does not deviate too far from the expected value, so the AI would still have some guardians on game start even if the RNG hated it during the "this is how many guardians you get" selection, and to stop the RNG from letting every world from having or nearing that min(.9 * that planet's guard posts,
for almost every planet.
For AI homeworlds and core worlds, this should be closer to an expected value of 1.2 for every non-wormhole guard post for the core and home worlds. For the core worlds, no more than 2 per guard post, with a planetary max of 10, and a planetary min of 1.05 * guard posts on that core planet. For the AI homeworlds, no more than 3 per guard post, with a planetary max of 14, and a planetary min of 1.1 * core guard posts on that home.
These would only be for initial seeding. Not sure about how often reinforcements should give one. Caps for reinforcements should be higher than the caps for game seeding, though maybe not much higher.
EDIT: Oh yea, the constant caps (like max of 8 per non-core and non-home world, if that would be less than .9 * number of guard posts) should go up with difficulty. Any multiplier to the guard post counts in any of these should remain constant over difficulty, as the number of guard posts goes up over difficulty anyways, so no need to "double dip" with those.
EDIT2: For the above, count the command station itself as one of the guard posts. If the AI only gets a chance to have some of their guard posts have more than other on a planet, their first choice for one of those posts to get more of them should be their command station.