Hi everyone, I'm currently working on a new AI system for managing the colonies. The solution is similar to an earlier version of the AIColony+ColonyPlan when there was a strong separation between the ideal plan for the colony and the current state. This time I will ensure that the code has better separation so that it's easier to understand, test and modify:
1. Production of an ideal plan for the colony with 100% rebel bonus applied -- with experts, tile improvements and the best buildings. The ideal plan might change if a new bonus resource appears after clearing a forest, but would otherwise stay static throughout the game. 2. Best current plan for the colony given available units and goods. 3. A prioritizer for the colony's next step -- using the plans from point 1 and 2. This code might, for example, prioritize first improving the base tile and getting a lumberjack and carpenter for building docks (when no other production site for food is available). It might also recommend just buying the docks instead. 4. The code for reorganizing the colony using point 2 and updating the colony's current wishlist and construction list using point 3. The ideal colony plan (point 1 above) is built using the colony center tile as input instead of a Colony. This will allow us to use the ideal colony plan for scoring the best sites for building a colony. For example, we could find a good place to build a colony for a given expert. We can also use the ideal colony plan for ensuring that the AI builds a diverse set of colonies, has proper production to tools and knows the value of certain areas of the map (for prioritizing colony construction and defense). The main difficulty right now is getting the correct goods production values without having a colony. I will send a separate email about this topic. Best wishes, Stian Grenborgen _______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers