Does anyone know how the AI determines how many freighters of each kind it maintains in its fleet?
I've noticed the number of freighters and miners fluctuates up and down quite a bit as the game proceeds.
So the AI is retiring freighters and miners from time to time.
If I recall correctly, the computer builds a set number of small, medium, and large freighters each time a colony is founded, getting you the baseline fleet. Overall demand (and demand fulfillment) for resources seems to be the driving factor in long-term fluctuations while pirate activity and war are the major drivers of short-term fluctuations in the size of the freighter fleet. I don't know how that translates to the mix of freighters that the computer builds, however.
Also wondering about freighter design. Is there any point in giving them different cargo sizes?
In the sense of whether or not the computer will use them where they're most efficient? I don't think so; I believe that the computer simply selects the closest freighter to point A that lacks a mission when it generates a mission to transport cargo from point A to point B.
Giving different freighters different cargo sizes is one way to vary the resource and time costs of building freighters; freighters with higher cargo capacities tend to have better fuel economy and lower maintenance per unit of cargo capacity, but also require more resources to build and tie up construction yards longer whereas freighters with lower cargo capacities and thus lower resource costs and shorter construction times get into operation sooner. It's usually not that much of a concern, but keeping the average freighter resource cost down might help avoid or mitigate resource shortages or clear them up faster. Note, however, that a ship's design is set when ordered and cannot be changed until after completion; keeping the average resource costs of your freighters down can work as a preventative measure against construction delays due to resource shortages, but changing freighter designs to reduce their resource costs while construction is already delayed by resource shortages is unlikely to go very far towards mitigating the problem, as you will often have a relatively large number of ships already in the construction queue when you first notice a resource shortage.
There is also a consideration of absolute fuel cost. If reducing a freighter's cargo capacity means you can reduce its static energy cost, then it will use less fuel overall even if its fuel economy per unit of cargo capacity is worse than that of a larger freighter. Probably not a lot less unless the reduction in static energy cost is significant, but sometimes a little bit less fuel consumption is more useful than higher overall efficiency, especially if the higher overall efficiency is largely theoretical because the freighters frequently run mostly-empty.
Variable freighter size gives you some influence over the overall resource cost, fuel consumption, construction time, and efficiency of your freighter fleet. You can get the same effect with a uniform freighter fleet, though.
A possibly more significant draw, though, is simply that a varied freighter fleet is, at least in theory, more visually-interesting than a uniform freighter fleet, because you have a mix of little shuttles and big bulk freighters flying around rather than only one or the other.