harpy eagle wrote: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.
harpy eagle wrote: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.
sven wrote:It should persist if you stick in an empire key -- though putting it in empire.ai_state might be more 'correct'.
harpy eagle wrote:There might be some issues with the AI not always picking the best weapons available. For example, in a recent game, I saw the ashdar colonials research heavy drivers, but continued to equip their heavy cruisers with regular lasers
harpy eagle wrote:Found and fixed a few bugs (392bac9). Forgot to filter out impossible techs when evaluation one_of() groups, and weapon research paths and their heavy variants shouldn't clobber each other any more. However, the AI desires for those paths will still be linked.
Code: Select all
desired_research_spread[path] = 2^desire
sven wrote:Yeah, that sounds kinda like a bug in the autobuild mechanic. If you see this happening again, would you upload the game?
sven wrote:Did you ever experiment with different exponential spreads? i.e., tweaking the formula in:Code: Select all
desired_research_spread[path] = 2^desire
That the target spread is at root exponential makes sense (because the tech costs are roughly exponentially increasing), but, there's plenty of different exponential spreads one might use here. Are you confident 2 is a large enough base?
harpy eagle wrote:There's some logic to handle species tech preferences, but for the most part it just assigns a random, independent number for each desire between -1 and +1. According to Wikipedia the the standard deviation interval for this is -0.577 to +0.577.
So if we plug that in, we find that the AI will want to spend about twice the number of beakers on a typical "desired" tech path vs a typical "undesired" tech path (2^(0.577+0.577) ~ 2.2).
I guess this is kind of low. Maybe four times, five times would be more reasonable? For a different angle, we could also think about how much spread would be too much. e.g. would ten times be too extreme?
harpy eagle wrote:Also, if the goal is to give the AI distinct "personalities", at least as reflected by their tech choices, maybe setting the desires using independent, random numbers isn't be best approach.
For example, we could instead shuffle the list of possible tech paths, and assign them increasing desires. This would ensure that there is always some research paths that are strongly desired, and others that are undesired.
But maybe I'm starting to overthink the issue.
sven wrote:Here some kind of card system starts to feel natural.
sven wrote:(where each card would themselves serve as some kind of abstractions bundling together some of the more specific research path definitions you've created)
Code: Select all
energy_weapons = {
lasers = {.5,1},
heavy_lasers={.5,1},
missiles = {-1,0},
heavy_missiles={-1,0},
...
}
sven wrote:Right now I'm daydreaming about how, exactly, such a multi-card system might work. We could imagine drawing 1 card from 3 different decks, called, say, "economy", "hulls", and "weapons" (where each card would themselves serve as some kind of abstractions bundling together some of the more specific research path definitions you've created).
sven wrote:I'm not sure either, though my *hunch* is that if there's a tech you really want priced at 1000, and one you don't particularly want priced at 250, you're probably going to go for the 1000 tech most of the time. So, 5-8x could maybe be not wrong? That said, I did some testing with the mod last night, and from what I can tell, the current values are in fact working pretty well, in the sense that the AI will noticeably favor the tech paths it's supposed to be favoring.
sven wrote:Yeah, that sounds kinda like a bug in the autobuild mechanic. If you see this happening again, would you upload the game?
Users browsing this forum: No registered users and 5 guests