The variant AI's will require a wide range of information when considering which buildings to upgrade. As an example, some will require the levels of every single building in the settlement.
In order to facilitate this, I suggest each AI submits an "information packet" with the select building function. The precise shape and nature of this information packet may need to vary based on the AI in question, therefore the attached AI for each player will also come with a function that will generate a suitably structured "information packet" to be submitted alongside the general information on possible buildings
The variant AI's will require a wide range of information when considering which buildings to upgrade. As an example, some will require the levels of every single building in the settlement.
In order to facilitate this, I suggest each AI submits an "information packet" with the select building function. The precise shape and nature of this information packet may need to vary based on the AI in question, therefore the attached AI for each player will also come with a function that will generate a suitably structured "information packet" to be submitted alongside the general information on possible buildings