infinite research cost and effect (math!)

Post all other topics which do not belong to any other category.
Post Reply
pichutarius
Fast Inserter
Fast Inserter
Posts: 158
Joined: Mon Feb 27, 2017 12:47 am
Contact:

infinite research cost and effect (math!)

Post by pichutarius »

0. Disclaimer
1. this thead is created by human, error is inevitable. please point out any mistake u find.
2. this thread assumed u have no life and play (or plan to) infinitely long, ie initial/running cost is negligible.
3. this thread is messy and full of math. proceed at ur own risk.
4. this thread do not consider module, in order to maintain my (and ur) sanity.
1. Liquid (and coal) conversion
gas ≈ 1.111oil
light ≈ .7407oil
heavy ≈ .5555oil
coal ≈ 3.889oil
or inversely, oil = 1.8heavy = 1.35light = .9gas = (9/35 ≈ .2571)coal

these directly come from advanced oil processing, coal liquefaction, cracking and simple algebra.
i will use these conversion to convert oil product into raw oil in next section, except for the coal conversion. that's just for reference in case needed on poor oil map.
2. Raw → science pack
(i'll use "sp" to refer "science pack" hereafter.)

sp1 = 2.00000iron + 1.00000copper
sp2 = 5.50000iron + 1.50000copper
sp3 = 34.0000iron + 9.50000copper + 1.00000coal + 22.2222oil
mil sp = 27.0000iron + 7.50000copper + 5.00000coal
prod sp = 46.5000iron + 16.2500copper + 2.50000coal + 59.7222oil + 10.0000stone
hi sp = 44.3500iron + 84.2500copper + 5.50000coal + 151.389oil
sp sp = 101.535iron + 85.2875copper + 9.95000coal + 324.722oil
Σ = 260.885iron + 205.0375copper + 23.9500coal + 558.056oil + 10.0000stone

sp sp is calculated as the cost to launch a "satellited" rocket and divided by 1000.
detail
basic idea of 1sp/s base:
-952miner (498iron + 392copper + 46coal + 16stone)
-989furnace (458iron + 360copper + 9brick + 162steel)
-280pumpjack (assuming 2/s oil)
-28refinery (assuming advance oil processing)
-60lab (no upgrade)
-17.14lab (max upgrade)
-1rocket every 1000sec
3. Science pack → research
infinite research.png
infinite research.png (14.12 KiB) Viewed 16428 times
"type" and "cost" should be pretty self-explanatory
"n>=" state the minimum level to use space science, and for the formula to be valid
"bonus" is stated as final multiplier (except "robot n"). eg: mining 17 means productivity*1.34
"max speed dps" is dps with max speed upgraded and no dmg upgrade, equipped with best usable weapon. AP: pierce ammo, X: explosive, U: uranium
eg: at laser 8, dps = 192*(.7*8-1.6) = 768

things to notice:
1. cost of mining productivity and robot count is linear (+100sp), the rest is exponential (*2sp).
2. with just max speed upgrade, laser has the lowest dps.
3. gun turret receive both bullet and turret bonus, hence the only one with n^2 growth. given enough time, it will out damage all linear growth. (costing 2 upgrades)
4. Bonus
these are not intended in original post, they are generated when im working on my math. i decided to post them in case someone find them useful.
dps compare
lab test
Last edited by pichutarius on Thu Dec 07, 2017 7:04 am, edited 5 times in total.

Ace_W
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Tue Oct 04, 2016 12:13 am
Contact:

Re: infinite research cost and effect (math!)

Post by Ace_W »

Nicely done!!

If anything the graphs really show the effect of the scaling in a nice visual format.
"No! This one goes there! That one goes There! Right?!"

quinor
Filter Inserter
Filter Inserter
Posts: 404
Joined: Thu Mar 07, 2013 3:07 pm
Contact:

Re: infinite research cost and effect (math!)

Post by quinor »

What if you add prod3 everywhere?

d4rkpl4y3r
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Wed Apr 27, 2016 8:24 pm
Contact:

Re: infinite research cost and effect (math!)

Post by d4rkpl4y3r »

The turret dps chart uses ap ammo. With uranium rounds this looks a bit different.

Wisey
Inserter
Inserter
Posts: 24
Joined: Fri Nov 04, 2016 9:28 pm
Contact:

Re: infinite research cost and effect (math!)

Post by Wisey »

Looks good, save me having to do the bits I've not worked out myself - I'd only done iron and copper.
The numbers all match what i did except copper for yellow science i got 84.25 per pack
Workings out
Additional you may want to show totals into the three types of research (Military, Non Military & Robot Number) as you did in section 3.

G

pichutarius
Fast Inserter
Fast Inserter
Posts: 158
Joined: Mon Feb 27, 2017 12:47 am
Contact:

Re: infinite research cost and effect (math!)

Post by pichutarius »

@Ace_W: thanks~

@quinor: im too lazy for that, but rough estimate, u can place 4 prod3 to each sp(include silo, exclude satellite) and 2 prod3 in labs. so needed amount is reduced to (1 - .4)(1 - .2) = .48 1 / (1.4 * 1.2) = .595 (thanks to d4rkpl4y3r), which means roughly 60% as much raw is needed.

@d4rkpl4y3r: yes it is. im using AP as of the time im making this. now im using U which is 3 times better. i drop U because it will be off the chart after 8ksp cost (4ksp for each upgrade).

@Wisey: u are right! thanks for pointing it out. i get the number from sandbox mode, after 100 unit the game roundoff so im blaming the game :P
Last edited by pichutarius on Tue May 30, 2017 3:37 am, edited 3 times in total.

d4rkpl4y3r
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Wed Apr 27, 2016 8:24 pm
Contact:

Re: infinite research cost and effect (math!)

Post by d4rkpl4y3r »

pichutarius wrote:so needed amount is reduced to (1 - .4)(1 - .2) = .48, which means roughly half as much raw is needed.
That is not how this works. It would be reduced to 1/(1.4 * 1.2) = 0.595, so you still need more than half as much.

Cerulean
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Jan 21, 2017 5:07 pm
Contact:

Re: infinite research cost and effect (math!)

Post by Cerulean »

I copied this work into https://wiki.factorio.com/Science_pack#Types so that people will be able to find it later. Thanks!

(and you might like my own math at https://repl.it/IWyE/1, but I didn't break down the oil fractions. It took me a moment to convince myself that breakdown was reasonable -- ie, if someone gave me 1000 crude oil and asked me to return 555 heavy oil, I would have a problem. But in practice most crude oil gets converted to petroleum gas, so it's reasonable to express everything in terms of petroleum gas cost.)

pichutarius
Fast Inserter
Fast Inserter
Posts: 158
Joined: Mon Feb 27, 2017 12:47 am
Contact:

Re: infinite research cost and effect (math!)

Post by pichutarius »

@d4rkpl4y3r: im a stupid LOL... thanks

@Cerulean: actually 1000 crude oil is equal to 1800 heavy oil, not 555. also the conversion is valid as in long term average, when LOTS of different liquid come and go.
moar math

FasterJump
Fast Inserter
Fast Inserter
Posts: 192
Joined: Sat Jul 09, 2016 11:43 am
Contact:

Re: infinite research cost and effect (math!)

Post by FasterJump »

d4rkpl4y3r wrote:
pichutarius wrote:so needed amount is reduced to (1 - .4)(1 - .2) = .48, which means roughly half as much raw is needed.
That is not how this works. It would be reduced to 1/(1.4 * 1.2) = 0.595, so you still need more than half as much.
That is not how this works. With prod III modules everywhere, you have cost reduction at each stage of the material processing.
Example: cost of 1 green circuit
1 green circuit = (1 iron plate + 3 wires )/1.4
1 iron plate = 1 iron ore / 1.2
2 wires = 1 copper plate / 1.4
1 copper plate = 1 copper ore / 1.2

If my math is right, 1 green circuit costs 0.595 iron ore and 0.638 copper ore (instead of 1 iron and 1.5 copper).
Reduction is -40% iron ore consumed and -57% copper ore consumed.

For red circuits, it would be 0.85 iron ore used instead of 2 (57% discount), and 2.10 copper ores used instead of 5 (58% discount).

d4rkpl4y3r
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Wed Apr 27, 2016 8:24 pm
Contact:

Re: infinite research cost and effect (math!)

Post by d4rkpl4y3r »

FasterJump wrote:That is not how this works. With prod III modules everywhere, you have cost reduction at each stage of the material processing.
But it is. The english language is context sensitive and our context was prod3 in science assemblers and labs, nothing else.

pichutarius
Fast Inserter
Fast Inserter
Posts: 158
Joined: Mon Feb 27, 2017 12:47 am
Contact:

Re: infinite research cost and effect (math!)

Post by pichutarius »

@FasterJump: sp have different length of stages and prod module can be used by some product while not by others, math become very messy.
and i said that im too lazy, its just a rough estimate (or upper bound).

ultramn
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun May 21, 2017 3:50 pm
Contact:

Re: infinite research cost and effect (math!)

Post by ultramn »

Here's the raw materials needed with and without Productivity 3 modules everywhere. You can see the difference is quite dramatic. In the case of copper ore, you only need 23% as much!!

Raw materials needed (without productivity modules):
- Petroleum gas (liquid): 428.5
- Iron ore: 262.38
- Copper ore: 205.79
- Water (liquid): 115.5
- Light oil (liquid): 105
- Coal: 23.95
- Stone ore: 10
- Heavy oil (liquid): 7.5

Raw materials needed (With productivity 3 modules everywhere possible):
- Petroleum gas (liquid): 127.32 (29.7% as much)
- Iron ore: 99.458 (37.9% as much)
- Copper ore: 47.246 (23.0% as much)
- Water (liquid): 46.562 (40.3% as much)
- Light oil (liquid): 41.994 (40.0% as much)
- Coal: 9.0856 (37.9% as much)
- Stone ore: 5.9524 (59.5% as much)
- Heavy oil (liquid): 2.9435 (39.2% as much)

This does not take into account labs, which can further reduce everything by a factor of 1 / 1.2!

This also doesn't take into account modules in any miners/pumpjacks. Those are less useful to put productivity modules in because of the research.

Productivity modules are amazing. It makes the math messy, but you'd be a fool not to use them if you want the most research you can get.

pichutarius
Fast Inserter
Fast Inserter
Posts: 158
Joined: Mon Feb 27, 2017 12:47 am
Contact:

Re: infinite research cost and effect (math!)

Post by pichutarius »

true that.

normally i use prod3 on silo and labs (after that, top-down in production chain list). those usually are bottlenecked by input, so craft speed penalty isnt a penalty at all. furthermore prod has greatest effect (discount) on high end product.

on the other hand, miners and pumpjack are bottlenecked by deposit area, and prod3 makes it even worse, better off using speed3.

Factorie
Fast Inserter
Fast Inserter
Posts: 100
Joined: Wed May 31, 2017 2:29 am
Contact:

Re: infinite research cost and effect (math!)

Post by Factorie »

Absolutely insane. Good formatting too ;)

Artman40
Fast Inserter
Fast Inserter
Posts: 168
Joined: Sun May 25, 2014 4:44 am
Contact:

Re: infinite research cost and effect (math!)

Post by Artman40 »

So if you want mining productivity 1, you need 2250 iron ore and 750 copper ore.

For mining productivity upgrade 1 to break even, how much and for how long do all the miners have to mine?

pichutarius
Fast Inserter
Fast Inserter
Posts: 158
Joined: Mon Feb 27, 2017 12:47 am
Contact:

Re: infinite research cost and effect (math!)

Post by pichutarius »

mining productivity 1 needs {750,250} ore, not {2250,750}.

short answer: less than 38% cost of rocket+satellite.
deduction
obviously there is a follow up question, what about higher levels?
short answer:
2: less than 77% cost of rocket+satellite.
3: less than 117% cost of rocket+satellite.
after that its a jump on cost because blue science starts to kick in. but thats off topic, maybe i'll calculate it another day on another topic. (or not)

related: viewtopic.php?f=16&t=47223

User avatar
Gergely
Filter Inserter
Filter Inserter
Posts: 595
Joined: Sun Apr 10, 2016 8:31 pm
Contact:

Re: infinite research cost and effect (math!)

Post by Gergely »

Can someone PLEASE translate this into "normal" english? :shock:

Post Reply

Return to “General discussion”