Looking at the saw tooth graphs the AI players generate, it seems to be they often switch between two focuses.
Well, as a player I surely don't want to do that. But now I found a situation that almost demanded it. I had conquered a Gysache capital. I wanted them to research, but with research focus, the target stability was 4, too low for the cultural archive and the history analyser. With production focus, stability was 8, thanks to focus preference and industrialism. So the best I could do was actually to switch between the production and research.
I don't think such a situation will be too common, but still I wonder whether we could avoid it or provide an interface to automate the handling, like switching between to focuses automatically.
Focus Micromanagment
Moderator: Oberlus
Forum rules
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Re: Focus Micromanagment
Regarding the saw tooth AI's graphs, when a planet has one of the industry/research target meters much bigger than the other, doing the following is better than sticking to the best meter:
- Max out the biggest meter (say industry, current and target value 30, research is 5 and 10).
- Switch to the smallest meter until it reachs target (so 5 turns to research, getting 6, 7, 8, 9, 10, industry was 28, 27, 26, 25 and 24).
- Switch back to biggest meter, reanse and repeat.
The planet ends up having an average research around 7 (+40% of maximum when set to industry) and average of 26 industry (so you sacrifice a small percentage of maximum industry, tiny loss of production, noticeably speed up of research).
I never liked that behaviour of the AI or the fact that human players can do it too. I'd like meter growth to be different to avoid that, e.g. growing and decreasing as a percentage of the difference between current value and target value.
- Max out the biggest meter (say industry, current and target value 30, research is 5 and 10).
- Switch to the smallest meter until it reachs target (so 5 turns to research, getting 6, 7, 8, 9, 10, industry was 28, 27, 26, 25 and 24).
- Switch back to biggest meter, reanse and repeat.
The planet ends up having an average research around 7 (+40% of maximum when set to industry) and average of 26 industry (so you sacrifice a small percentage of maximum industry, tiny loss of production, noticeably speed up of research).
I never liked that behaviour of the AI or the fact that human players can do it too. I'd like meter growth to be different to avoid that, e.g. growing and decreasing as a percentage of the difference between current value and target value.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Focus Micromanagment
There have been attempts to penalize focus switching to make toggling focus less or not beneficial... There are focus change penalities scripted, but apparently not enough? Bureaucracy policy adds additional focus change penalties, but that's not relevant to AIs that won't adopt it anyway.
Force Energy Structures tech increases the rate of increase by 4 and decrease by 2, for planets with stability >= 5, which probably makes the issue worse.
I made a pull request that:
• Makes the focus change penalty 2 on the turn of the change for the non-focused resource meters (industry, research, influence). This will mean a drop of 3 for non-focused meters and an increase of 1 for the focused meter (assuming both are far enough above and blow their respective targets)
• Changes the Force Energy Structures rate increase to +/- 3 independent of stability
Force Energy Structures tech increases the rate of increase by 4 and decrease by 2, for planets with stability >= 5, which probably makes the issue worse.
I made a pull request that:
• Makes the focus change penalty 2 on the turn of the change for the non-focused resource meters (industry, research, influence). This will mean a drop of 3 for non-focused meters and an increase of 1 for the focused meter (assuming both are far enough above and blow their respective targets)
• Changes the Force Energy Structures rate increase to +/- 3 independent of stability
That definitely won't happen. It's exactly the wrong solution to such an issue.
Re: Focus Micromanagment
There's an additional problem that arises with stability here due to the +15 from defense focus. A planet that is -3 normally and +12 with defense has a temporary window where production and research focus are possible.
Re: Focus Micromanagment
What do you think about the following idea: When checking for minimum stability requirements, the game uses the lower value of current and target stability.
Note that I do not want the stability to go down immediately. A drop in target stability could also be caused e.g. by a temporary loss of the capital connection.