contingency generator - adQuid/DecentAI GitHub Wiki

Contingency generation is like idea generation, but for players the AI is NOT controlling. Instead of a list of lists like the IdeaGenerator interface returns, this interface returns a list of contingencies, which also includes the player who would be taking the actions. There can be any number of contingencies per player per call of the generator. Separate contingencies are evaluated piecemeal, even if they belong to the same player.

Contingencies are intended to be limited to the actions of other players that one would need to be worried about. Being attacked would be an obvious example, while scrapping a resource building that opens up the resource to others might be a less obvious example of a contingency that would be good for a player. Actions that would never immediately change someone else's behavior don't need to be considered.