More Varied AI Research Paths
Posted: Tue Apr 17, 2018 4:00 am
I've been thinking of starting a mod that varies the AI research paths a little bit. Currently it seems like the AI always researches the same things in roughly the same order (also it was really bugging me how the Ashdar Colonials and Imperials don't research Escort or Light Carriers, but instead only research Fleet Carriers much later in the game). I took a look through the code and found that indeed, the AI always researches techs according to the same predefined list.
While the list seemed kind of outdated, I thought it would make the AI more interesting if varied what parts of the tech tree it explored each game. So I created a bunch of pre-defined lists of techs representing various tech focuses that I could think of e.g. kinetic weapons, industrial production, pop growth, etc. And made the AI randomly choose to prefer various focuses over others each game.
This isn't really be aimed at improving the AI's performance so much as making the AI a bit more interesting. Instead of always facing lasers+missiles, then ions, then disruptors, your AI opponent might choose to research a different part of the tech tree in a different order than they always do in vanilla.
So for example, in some games the an AI empire might decide it wants to focus on kinetic weapons instead of energy beams. Or go for carriers before heavy cruisers, instead of always going for heavy cruisers first.
I'm thinking the approach I'd use is to create a bunch of canned lists of techs to research, that the AI switches between based on a set of desires that are randomly set at the beginning of the game. Although I guess there could be some context involved as well, like e.g. weapon/shield/armour techs being more desired if the empire is at war.
Any thoughts or suggestions? I'll post some of the tech lists I'm thinking of when I have them.
EDIT: I've implemented the research choice logic. As you can see, the AI can now actually design ships with coilguns
Since there's a lot more variety in the selection of weapons available to the AI, this mod enables the game to make much fuller use of the autodesign code.
The AI's research desires aren't totally random. I've implemented some logic so to ensure that e.g. phidi always value economy techs to at least a certain degree, and the same for orthin and energy weapons/shields etc.
If an empire doesn't have any research desires, it will initialize them the next time the empire tries to decide on a tech to research, no need to start a new game to use the mod. Now I'm just hoping that I can store each empire's research desires inside the empire table and it will persist across saved games.
The AI also seems to make stronger research choices, just due to the fact that it used to completely ignore certain branches of the tech tree.
Update v1.1
I've made some significant improvements to how the AI chooses to spread it's science income into different research paths, that will allow the AI to more clearly express it's strongest research desires, and help the AI make better choices by taking into account research paths that have techs in common.
LAST UPDATED: 2018/04/29
While the list seemed kind of outdated, I thought it would make the AI more interesting if varied what parts of the tech tree it explored each game. So I created a bunch of pre-defined lists of techs representing various tech focuses that I could think of e.g. kinetic weapons, industrial production, pop growth, etc. And made the AI randomly choose to prefer various focuses over others each game.
This isn't really be aimed at improving the AI's performance so much as making the AI a bit more interesting. Instead of always facing lasers+missiles, then ions, then disruptors, your AI opponent might choose to research a different part of the tech tree in a different order than they always do in vanilla.
So for example, in some games the an AI empire might decide it wants to focus on kinetic weapons instead of energy beams. Or go for carriers before heavy cruisers, instead of always going for heavy cruisers first.
I'm thinking the approach I'd use is to create a bunch of canned lists of techs to research, that the AI switches between based on a set of desires that are randomly set at the beginning of the game. Although I guess there could be some context involved as well, like e.g. weapon/shield/armour techs being more desired if the empire is at war.
Any thoughts or suggestions? I'll post some of the tech lists I'm thinking of when I have them.
EDIT: I've implemented the research choice logic. As you can see, the AI can now actually design ships with coilguns
Since there's a lot more variety in the selection of weapons available to the AI, this mod enables the game to make much fuller use of the autodesign code.
The AI's research desires aren't totally random. I've implemented some logic so to ensure that e.g. phidi always value economy techs to at least a certain degree, and the same for orthin and energy weapons/shields etc.
If an empire doesn't have any research desires, it will initialize them the next time the empire tries to decide on a tech to research, no need to start a new game to use the mod. Now I'm just hoping that I can store each empire's research desires inside the empire table and it will persist across saved games.
The AI also seems to make stronger research choices, just due to the fact that it used to completely ignore certain branches of the tech tree.
Update v1.1
I've made some significant improvements to how the AI chooses to spread it's science income into different research paths, that will allow the AI to more clearly express it's strongest research desires, and help the AI make better choices by taking into account research paths that have techs in common.
LAST UPDATED: 2018/04/29