Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! 2.6/7 » The Academy » Factory and Mine compounding (How do you optimize resources over time?)
Re: Factory and Mine compounding Tue, 19 November 2013 05:42 Go to previous messageGo to next message
Tomasoid is currently offline Tomasoid

 
Chief Warrant Officer 3

Messages: 182
Registered: December 2005
Location: Ukraine

Wow, old threads pop up again... ^:)

About 7 years ago there was similar discussion, during which I figured out that:
With certain race settings and planet/pop conditions (mineral concentrations, habitability etc.), mines/factories/terraforming path is not optimal when factories built first. I even posted spreadsheets, as far as I recall. (Cannot find it all now ( ). In that spreadsheet, it was clear that, when manually add some mines building at some points in the middle of planet development path, total resource output of the planet increase. Sometimes significantly. Also, need to tell that it very depends on initial germ, pop growth and germ concentration.

Bad thing about this is that it is individual for each planet with different habitability, initial germ etc. So it take significant time to tweak the path manually and find good (not telling the best) development paths. I wanted to write an algorithm that automatically builds the best factories/mines/terraforming path, though did not had time to finish it. Rolling Eyes


[Updated on: Tue, 19 November 2013 05:43]




WBR, Vlad

Report message to a moderator

Re: Factory and Mine compounding Tue, 19 November 2013 18:05 Go to previous messageGo to next message
skoormit is currently offline skoormit

 
Lieutenant

Messages: 665
Registered: July 2008
Location: Alabama
Tomasoid wrote on Tue, 19 November 2013 04:42
...I wanted to write an algorithm that automatically builds the best factories/mines/terraforming path, though did not had time to finish it.


Hmm, with modern computing could a brute-force algorithm find the optimal path in reasonable time?

(Hold on, time for napkin math:
Inputs to the problem are the planet and race details. About 20 total facts. Mostly integers, some floating points.
Three variables per year (resources spent on factories, mines, tforming).
Possible values of each variable: on the order of 1000.
Possible combinations over three variables: on the order of one million (the square of 1000, since the value of the third variable is just the resources remaining after the first two variables).
Floating point calculations to make per combination per year: let's say 20ish.

So something on the order of 20 million floating point calculations per year to find the results of all combinations for that year. Raise that number to the x power to find the results of all possible paths over x years.)

But all this is an aside. I don't necessarily want an algorithm that will optimize my queues for me, I just want to understand the optimization question a little better so that I can make better-informed tradeoffs in-game.



What we need's a few good taters.

Report message to a moderator

Re: Factory and Mine compounding Tue, 19 November 2013 19:04 Go to previous messageGo to next message
Altruist is currently offline Altruist

 
Commander

Messages: 1068
Registered: August 2005
Location: Berlin
skoormit wrote on Wed, 20 November 2013 00:05
But all this is an aside. I don't necessarily want an algorithm that will optimize my queues for me, I just want to understand the optimization question a little better so that I can make better-informed tradeoffs in-game.


Well, apart from theoretical optimization, in a "real" game of Stars I have a different approach.

1) Considering I have chosen a race with factories, I am, of course, keen to maximize the compounding effect of building factories first. In general... but Stars is always specific and thus when talking about tradeoffs...

2) Mineral concentration: In an AccBBS game pretty soon one needs to build quite a lot of scouts, freighters/privateers. If germ and/or iron concentrations are low, the limiting factor can be not resources but lacking minerals. So now also pop or rather the ability to spread your pop onto other good planets comes into the equation plus the necessity to scout and escort.

So the priority list changes:
A freighter to get away pop has priority over building factories. If an escort is needed, that, too, has priority over factories. If to achieve this I need more mines and perhaps due to low minerals those need to be built even some years before, then mines get top prioriy over everything else.

One reason is that the compounding effect of factories is a limited. In practice you will NOT build factory after factory but for a while only as much as 25% pop on your HW can operate. And soon enough only new planets will allow you to stay (somehow) on the exponential growth rate due to the compounding effect of pop growth PLUS factory building on an ever growing number of planets.

When now also considering that you are not playing sim city but against opponents and competing over planets, hunting scouts etc., I doubt very much that it is possible to figure all this into an algorithm... which is as it should be and why we play Stars.

Nevertheless factories are important and so we meditate over our turns how to design ships (perhaps less germ hungry ones or less expensive ones) and colonization strategies to optimize several things: pop growth AND factory building AND scouting AND making life miserable for our neighbours AND staying competitive with the far away player who seems to grow just ideally and without any hassles.


[Updated on: Tue, 19 November 2013 19:11]

Report message to a moderator

Re: Factory and Mine compounding Tue, 19 November 2013 20:29 Go to previous messageGo to next message
skoormit is currently offline skoormit

 
Lieutenant

Messages: 665
Registered: July 2008
Location: Alabama
Yes, Altruist, and those real-game considerations are why I would like a more thorough understanding of the tradeoffs.

For example, suppose early in a game I find a neighbor off to the west, and suppose that there are some rather good planets roughly in the middle between our HWs. I'd like to be able say something like the following with confidence:

"If I build 4 xray dds this year it will cost me 100 resources over the next five years, in addition to the cost of the ships themselves."

Right now I can say something like that with confidence, because I have a spreadsheet that crunches the numbers for me. I'd prefer to have a formula for the general case, even if it is an inexact one. Something as simple as "given factory settings of x, y, and z, a germ concentration of g, mine settings of a, b, and c, and q available germanium, every factory less than the maximum possible built each year costs [something something something] resources over the following 5 years."



What we need's a few good taters.

Report message to a moderator

Re: Factory and Mine compounding Tue, 19 November 2013 22:04 Go to previous messageGo to next message
LittleEddie is currently offline LittleEddie

 
Lieutenant
Helped track down one or more Stars bugs

Messages: 517
Registered: February 2011
Location: Delaware
Quote:
"If I build 4 xray dds this year it will cost me 100 resources over the next five years, in addition to the cost of the ships themselves."


The other part of the problem is that if you don't build the 4 xray dds now, will the 100 resources you gain in the next 5 years matter?

ie, can you gain/keep enough planets with the 4 dds to offset the 100 resources lossed?

Report message to a moderator

Re: Factory and Mine compounding Wed, 20 November 2013 05:27 Go to previous messageGo to next message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
skoormit wrote on Wed, 20 November 2013 02:29
suppose that there are some rather good planets roughly in the middle between our HWs.

This being Stars! I'd rather ask from the other angle: How much are several good/breeder planets worth? About the same as the entire Res/mins/science/ships output of the HW *each*, per turn? How hard will it be to take them from someone else as opposed to just colonizing them 1st? Say, ten times at least, assuming they don't counter? And how soon should I scout them to maximize my options of avoiding a costly fight? Sherlock

100/200/500 resources don't seem that big a tradeoff, then. It's the borderline cases that you want to calculate as exactly as possible, but alas, these are the hardest. Twisted Evil



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Re: Factory and Mine compounding Wed, 20 November 2013 18:01 Go to previous messageGo to next message
skoormit is currently offline skoormit

 
Lieutenant

Messages: 665
Registered: July 2008
Location: Alabama
LittleEddie wrote on Tue, 19 November 2013 21:04
Quote:
"If I build 4 xray dds this year it will cost me 100 resources over the next five years, in addition to the cost of the ships themselves."


The other part of the problem is that if you don't build the 4 xray dds now, will the 100 resources you gain in the next 5 years matter?

ie, can you gain/keep enough planets with the 4 dds to offset the 100 resources lossed?


I'm not asking about "the other part of the problem" right now.

The example I gave is just an example of the type of thing I'd like to be able to know with some measure of certainty. The "100 resources" bit I just made up. The example is not meant to present a particularly difficult tradeoff decision to make.

Right now, I can only come up with the answer by using a spreadsheet to crunch the numbers year by year. Can anyone indicate how I could go about solving the general case?



What we need's a few good taters.

Report message to a moderator

Re: Factory and Mine compounding Wed, 20 November 2013 18:03 Go to previous messageGo to next message
skoormit is currently offline skoormit

 
Lieutenant

Messages: 665
Registered: July 2008
Location: Alabama
m.a@stars wrote on Wed, 20 November 2013 04:27
It's the borderline cases that you want to calculate as exactly as possible, but alas, these are the hardest.


Do you have any advice on how to do that?



What we need's a few good taters.

Report message to a moderator

Re: Factory and Mine compounding Thu, 21 November 2013 05:11 Go to previous message
m.a@stars is currently offline m.a@stars

 
Commander

Messages: 2765
Registered: October 2004
Location: Third star to the left
Quote:
Do you have any advice on how to do that?

Not of the mathematical kind. Hit Computer

But greed is good. Twisted Evil



So many Stars, so few Missiles!

In space no one can hear you scheme! Deal

Report message to a moderator

Previous Topic: Ship Teleportation bug
Next Topic: Running out of fuel while hitting a minefield
Goto Forum:
  


Current Time: Fri May 03 18:10:26 EDT 2024