Common micromanagement problems

Describe your experience with the latest version of FreeOrion to help us improve it.

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.
Message
Author
User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Common micromanagement problems

#16 Post by Dilvish »

Pahan wrote:Here is how I see it:
  1. Let RPr, RPp, PPp, and PPr be planet i's target RP when focused on Research, target RP when focused on Production, target PP when focused on Production, and target PP when focused on Research, respectively.
  2. Then, MRTrp=(RPr-RPp)/(PPp-PPr) represents the marginal rate of transformation (MRT) --- the opportunity cost of 1 PP in RPs for that planet. (MRTpr=1/MRTrp[i], of course.)
  3. Sort an empire's planets set to Automatic focus by their MRTrp.
  4. The PPF can then be drawn by moving planets on the list between Research and Production one at a time, updating the RP and PP totals. Similarly, once a trade-off is set, it's straightforward to find where to draw the line to attain the requested trade-off level. [1]
That's actually the primary framework for how the existing AI does it (and yes, has to actually switch planet focii and check what that does to the targets), subject to some extra details such as first setting aside some planets fixed at growth, or fixed at research because they have a computronium moon, etc. It's nice to see this is a recognized analytic approach for the issue. :D

There are a couple additional complications to the issue for FO though -- one is the (somewhat recently imposed) penalty for switching focus (which at least no longer kicks in just from temporarily switching focus to check things like this); the AI has some modifications to try minimizing such penalties (the basic algorithm is susceptible to churn), but I think a human can still do better at that task. Another issue is when the empire is broken into multiple Resource Groups due to incomplete supply connections somewhere (such as due to blockade)-- there is no clearcut and comprehensive decision possible about when this should lead to planets being set to Research (which doesn't need supply connection), though of course some kind of rule of thumb can be employed.

These limitations to the automated algorithm wouldn't necessarily make it wrong to provide a "helper AI" using them, but it makes it a bit less clearly appealing. The general idea of helper AIs has come up before, but I don't think there was such a clear resolution of the topic so as to consider it a closed topic; I for one at least think it's fine to periodically revisit particularly with regards to specific ideas like this.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Common micromanagement problems

#17 Post by MatGB »

I never actually saw your first post to the thread Pahan, must've slipped through, however I think I fundamentally disagree with you
when an empire contains a large number of planets (or is conquering planets rapidly), the player has to micromanage whether each planet is going to be focused Research or Production, taking into account that particular planet's absolute and comparative advantages, while keeping an eye on the overall balance between Research and Production production in the empire, and this is a major late-game annoyance, at least for me
A single choice made on conquest that only needs to be revisited if you pick research and then get to the end of the tech line isn't, to me, micromanagement. It's a fairly straightforward decision for me based on whether there's a gas giant generator in the system and what the species is best at. Once done, unless there are other planets in system to conquer, or that species is new to me and I want to colonise with it, I'm basically done, time to move on.

For me, the only micromanagement problem that annoys me every game is the late game "find all the research focusesed worlds and make most of them industry" thing that you need to do once you've got most of the key techs, the Objects menu helps with that but beyond that...

There is, now a "preferred" focus for each species and they'll default to that on conquest, at some point I plan to go through all of them and redefine several of them but it works fine. There isn't, currently, an Empire preferred choice and I think in the late game I'd prefer it if all conquered planets get Industry by default.

Combining this with the recent changes in the current test releases that set most meters, including supply and output, to zero on conquest and it works in a nice balanced way for my preference.

Focus settings are there to reduce/elminate the need to micromanage in the way that, for example MOO2 needed you to assign each population unit to a task, and making a single choice per system is, to my mind, part of the game, it's such an easy one to make I don't think automating it would ad anything, especially for me, and would also detract from the game in my mind, you're supposed to be making strategic decisions about stuff.

I can see the benefits of a helper that manages focus settings over time, but given the penalties for changing focus setting are fairly severe (and that focus can be used for other things like defence, stargate, PsyDom, etc) I don't think it'd be a good thing for the game, focus is part of the strategic choice, it's not like you need a build queue per planet for basic level structures like in a lot of other games of this sort.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Krikkitone
Creative Contributor
Posts: 1559
Joined: Sat Sep 13, 2003 6:52 pm

Re: Common micromanagement problems

#18 Post by Krikkitone »

I think that

1. the penalties for switching mean you do not want to switch back and forth in an automated way

However, you may want some way to identify which planets are the best ones to switch

As such some way of listing and sorting planets... For example

Simplest: Each world has a stat of its "Target for X if X was focus"
Then I can sort my Industry worlds by which will have the most Research when I switch it.

For more advanced: each World has a "Switch Ratio"

ie Target X if this world had X as its Focus / current Target Y (Y as focus)

So if I want to switch Industry to Research
I see planets ordered by which would give me the best Research gain/Production loss for switching.

Then I just switch the top planets.

Pahan
Space Krill
Posts: 6
Joined: Mon Mar 31, 2014 1:26 pm

Re: Common micromanagement problems

#19 Post by Pahan »

Dilvish wrote:There are a couple additional complications to the issue for FO though -- one is the (somewhat recently imposed) penalty for switching focus (which at least no longer kicks in just from temporarily switching focus to check things like this); the AI has some modifications to try minimizing such penalties (the basic algorithm is susceptible to churn), but I think a human can still do better at that task.
Certainly. But, said human finds the task very tedious late in the game, so said human would prefer to delegate it, especially since doing better than the AI under the typical late-game circumstances (large, monolithic empire) requires far more calculation than is fun. Early in the game, when every RP counts, the user should be able to, and should, manage things manually.
Dilvish wrote:Another issue is when the empire is broken into multiple Resource Groups due to incomplete supply connections somewhere (such as due to blockade)-- there is no clearcut and comprehensive decision possible about when this should lead to planets being set to Research (which doesn't need supply connection), though of course some kind of rule of thumb can be employed.
In my experience, either it's a handful of planets (which can be managed manually, letting the bulk of the empire be managed automatically), or a temporary state of affairs. Either way, the user can always assume direct control.
MatGB wrote:A single choice made on conquest that only needs to be revisited if you pick research and then get to the end of the tech line isn't, to me, micromanagement. It's a fairly straightforward decision for me based on whether there's a gas giant generator in the system and what the species is best at. Once done, unless there are other planets in system to conquer, or that species is new to me and I want to colonise with it, I'm basically done, time to move on.
If you conquer an empire whose species are good at Production and bad at Research, wouldn't it make sense to flip some of your planets with species that are worse at Production and/or better at Research over to Research? Your heuristic generally works, but there are many factors influencing a given planet's trade-off between RP and PP, including species, presence of specials, gas giants and asteroid belts in the same system (as well as their development), and neighbors. Decisions made at the time of colonization or conquest aren't necessarily optimal even score turns later.
MatGB wrote:For me, the only micromanagement problem that annoys me every game is the late game "find all the research focusesed worlds and make most of them industry" thing that you need to do once you've got most of the key techs, the Objects menu helps with that but beyond that...
I find that I have to switch empire-wide priorities a bit more than once per game. And, it's tedious to find which planets are optimal to switch.
MatGB wrote:There is, now a "preferred" focus for each species and they'll default to that on conquest, at some point I plan to go through all of them and redefine several of them but it works fine. There isn't, currently, an Empire preferred choice and I think in the late game I'd prefer it if all conquered planets get Industry by default.

Combining this with the recent changes in the current test releases that set most meters, including supply and output, to zero on conquest and it works in a nice balanced way for my preference.
I don't follow what this has to do with my proposal.
MatGB wrote:Focus settings are there to reduce/elminate the need to micromanage in the way that, for example MOO2 needed you to assign each population unit to a task, and making a single choice per system is, to my mind, part of the game, it's such an easy one to make I don't think automating it would ad anything, especially for me, and would also detract from the game in my mind, you're supposed to be making strategic decisions about stuff.

I can see the benefits of a helper that manages focus settings over time, but given the penalties for changing focus setting are fairly severe (and that focus can be used for other things like defence, stargate, PsyDom, etc) I don't think it'd be a good thing for the game, focus is part of the strategic choice, it's not like you need a build queue per planet for basic level structures like in a lot of other games of this sort.
For vast, vast majority of planets, vast, vast majority of the time, the optimal choice is trivial after a few basic calculations. However, a human player trying to shift, say, some of the Production over to Research has to figure out which of the Production-focused planets would gain the most RP per PP lost if switched to Research. This is tedious, especially late in the game, when there are many planets. Choosing which planets in the interior of the empire are focused on what is not even a tactical decision, much less strategic. It's arithmetic.
Krikkitone wrote:ie Target X if this world had X as its Focus / current Target Y (Y as focus)

So if I want to switch Industry to Research
I see planets ordered by which would give me the best Research gain/Production loss for switching.

Then I just switch the top planets.
I like this idea; just getting a list sorted by the marginal rate of transformation would solve 70% of the problem.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Common micromanagement problems

#20 Post by Geoff the Medio »

It should be possible to set up some code to calculate the predicted target meters for planets if their focus was X. A much more complicated similar function is done for predicting populations of planets if they were to be colonized by various species.

Piwoslaw
Space Floater
Posts: 40
Joined: Tue Jul 23, 2013 4:52 am

Re: Common micromanagement problems

#21 Post by Piwoslaw »

Did not want to create new threads, so found this oldie with what I was going to write about anyway...
MatGB wrote:For me, the only micromanagement problem that annoys me every game is the late game "find all the research focusesed worlds and make most of them industry" thing that you need to do once you've got most of the key techs, the Objects menu helps with that but beyond that...
How about an option which allows to change all planets of one species to a certain focus. For example, at some point in the game I change all Scylior planets to Production, regardless of what their focus was until now.
Another example of usage: All of my Scylior planets are focused to Research, but I've recently conquered new systems, among which are Scylior planets. Instead of manually changing each new planet's focus, I just force a species-wide change to Research.


Some other micromanagement suggestions (these could be switched on/off in the options):
  • When Gas Giant Generator becomes available, all of my gas giants with outposts start building one. Also, any newly outposted giant automatically starts building a generator.
  • When Terraforming becomes available, all colonized planets start terraforming (assuming theyare not already 'good'). Exception needed for Exobots.
  • An option that automatically builds a colony on an outposted planet of certain type. Example: As soon as a toxic planet is outposted, then a Chato colony begins to form (assuming supply, etc.). This might need some tweaking.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Common micromanagement problems

#22 Post by Geoff the Medio »

Piwoslaw wrote:How about an option which allows to change all planets of one species to a certain focus.
Use the objects window. Set the filter to show just planets with the desired species, then select them all, and use the right-click menu to set focus.
setting filter
setting filter
Objects_Set_Filter.png (165.47 KiB) Viewed 940 times
setting focus
setting focus
Objects_Set_Focus.png (97.01 KiB) Viewed 940 times

User avatar
Bromstarzan
Dyson Forest
Posts: 206
Joined: Sun Feb 28, 2016 9:56 pm
Location: Sweden

Re: Common micromanagement problems

#23 Post by Bromstarzan »

Nifty :mrgreen: !
| i7 7700K [email protected] | GTX 1080 Ti | RAM: 32GB | PSU: 750w | W10 x64 | 2xAcer1920x1080 |

User avatar
Cpeosphoros
Space Kraken
Posts: 124
Joined: Sat Jan 30, 2016 11:29 am

Re: Common micromanagement problems

#24 Post by Cpeosphoros »

Also, you can change the column headers on the Objects view (e.g. Industry output) and then order the planets by that value, allowing you to choose which planets are better to change focus.
All contributions are released under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidelines.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Common micromanagement problems

#25 Post by MatGB »

Cpeosphoros wrote:Also, you can change the column headers on the Objects view (e.g. Industry output) and then order the planets by that value, allowing you to choose which planets are better to change focus.
Yup, I have mine set to always display target industry and actual industry, so I can see where things like Terraforming and Gaia are best placed (if they're at max output, you can improve it, if they're ages off it's not worth it yet)
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Post Reply