1. Definitely when the grand strategic AI can make such estimations.
2. Same as above.
It doesn't matter whether or not it can make an accurate estimation yet. The point is to establish a solid framework for the AI that can be added to
later, rather than having to be rewritten completely. Also, instead of just "within resource supply range", it would be good to calculate the percentage of each physically transferrable resource that's in the section of the empire to which it is currently connected. (In the future,) each of these resources can be weighted based on the empire's estimation of how much that colony is likely to need of a specific resource. Just hack something together that gives a rough estimate of how long it will take to increase resource/fleet supply to the desired system, or even just use a variable based solely on current supply range vs. desired supply range, which can easily be replaced in the future when the AI is able to figure out how long it will take to research stuff, and what it's researching. That's still more sustainable than just having nothing there, since it's easier to expand on in the future.
I assume there's no problem with actually determining whether or not the planet is currently
within supply range?
3. This is a slightly more complicated matter. Actually a little bit more than slightly.
Since there's no diplomacy yet, all other empires can be considered hostile, and equally so. In other words, use a constant for the likelihood of empire X attacking the colony. A separate calculation for determining the value of this constant (making it a variable) can be added later. Determining proximity can be a simple calculation now, but in the future, should be expanded to include things such as enemy range/speed, the location of enemy ships, whether the nearby enemy system is undeveloped or highly developed, etc.
4. This does not seem too important as the quality of the colony should be a clear priority.
5. Same as above.
This is a matter of weighting. Depending on the empire's specific needs, each of the variables that determines planet desirability will have to be weighted differently. If the planet is in high risk of attack, for example, being able to get ships there quickly would be an important factor. Moreover, in the future, the AI should use the various values that determine planet desirability to determine how they can improve that desirability (weighed against the costs of doing so, of course), for example, by researching a tech that increases supply range, or increasing the number of ships that are near the planet in question.
The point in it was to create some formula to cut down the search space. The distance is sort of an abstraction of these more complex problems.
"Abstracting complex problems" is the reason most AIs are so stupid. The AI has to analyze the situation the same way a human would to be effective, and that means taking into account all the issues that are affected by distance, not just distance itself.
Realistically speaking are there any situations where expansion far beyond supply lines is beneficial?
Yes. My hope is that spies will be able to travel along resource supply lines that link to any planet on which they are stationed, which means that an outpost outside of supply range might be a good location for a particularly sensitive building, for example.
Also I have noticed that the colonies get destroyed quite easily when they are too far from the homesystem and new colony ships are not too cheap.
These considerations should factor into the AI's decision-making process, of course.
I do believe that the AI should be unpredictable, but if the game rules are like tic-tac-toe with 2 markers in line putting the third marker in line makes so much more sense than doing something else.
Ideally, the AI should always make the best decision. If that means putting the third marker somewhere else to gain a long-term strategic advantage, then that's what I want it to do.
If you disagree with anything I've written, I would love to argue about it, so please speak your mind.
On a semi-related note Geoff, do you plan to make WithinResourceSupply and WithinFleetSupply conditions? It makes so little sense when an Industrial Center is affecting an unconnected system on the other side of the galaxy (not that that happens all that often, mind you). I feel like most such buildings should only affect other colonies within supply range, and there are probably ship effects that should have that condition as well.