well I think that festivities should be postponed until you, either use up all your tiles, and can't. Terriform no more, or you can't afford to build up no more. Specialization is good when you have tech. If you need planet, and if you have tech then specialize else generalize, and plan to research tech. If you have tech, and planet if best for this upgrade current buildings for specialization.
now as far as Invasion I think randomly invading a planet your at war with is a bad idea. Remember it is easier to defend planets when they are close together. If the planet is the planet is the closest with who you ate war build invasion fleet. If two, or more is equal distance then which one is better. If both ate same quality only then random. Maybe the only exception to this is when you are fighting multiples, but one is stronger than other. Beside this being more sound strategically. This makes more sense influence wise. Not random targets. A Ai value system giving different values based on what resources the planet haves class type what kind of buildings it has how well you need it and any other thing I didn't think of.