Theoretical speedrun

Post all other topics which do not belong to any other category.
Post Reply
blazespinnaker
Filter Inserter
Filter Inserter
Posts: 495
Joined: Wed Sep 16, 2020 12:45 pm
Contact:

Theoretical speedrun

Post by blazespinnaker »

I'm always interested in how fast it'd be possible to complete a run in factorio, at least theoretically.

The biggest friction right now in runs are operator actions per minute(APM).

Someone posted a computer enhanced run, it was about 1 hour and 21 minutes (https://www.youtube.com/watch?v=qYIplmAQcWU&t=3464s), faster than the current record of 1:27 (https://www.speedrun.com/factorio/run/z1rwkw9m). The tool assisted run(TAR) wasn't that well planned out, IMHO, but I get it - scripting a computer to do a run is probably a nightmare. The human one is exceedingly well planned out, but APM still rules over planning.

Another way to do it is via the creative mod. I use blueprints, but climbing the tech tree is required. As this is theoretical, I think having unlimited inventory (except for intermediates) is fine. I also use unlimited reach and insta construction.

The idea really is to figure out if some ideas are missing from the current plans and running around (at least for me) just distracts from that goal.

Not a big surprise - I am able to beat the TAR with something rough. It's still rather messy and I'm cleaning it up as I go along and I'm pretty sure I can do much better. Right now I'm finding the biggest way to improve times is increase base production earlier (steel, green circuits, copper, iron).

One thing on my to do list is to rework the blueprints with an eye for how a human would lay it out in a real run.

Another useful thing about this approach is they make for shorter games. I don't have the same time to spend on factorio I used to.
OptimaUPS Mod, pm for info.

mrvn
Smart Inserter
Smart Inserter
Posts: 4641
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Theoretical speedrun

Post by mrvn »

Unlimited reach must save you a ton of time because you don't have to go anywhere. That makes picking up items from chests and dropping them into assemblers or furnaces totally viable.

If you script it I assume you would go for doing one action per tick, right? So you can transfer 30 chests per second minus ticks when you build something or pick the next tech. Would you even built any belts at all? Just place everything in rows where each assembler outputs into a wooden chest. The script needs to find some ore fields for the miners, water for the steam engines, oil for well oil, doh,. But everything else just find some place without ore, oil, water and few trees and build in rows. The script can easily remember each furnace/assembler/other and the output chest for it. It can easily keep track how often each has to be fed or emptied and I bet you can do that for everything with 30 inventory transfers per second easily. Unless end up needing more than 60 actions per second there really is no need to be clever.

One exception will be stuff with fluids, like oil stuff. You want a good blueprint for that because designing the pipes by script would be painful. Just make a template by hand that can be tiled and the script can easily build as many copies as needed. Again just fill in any items by hand and output items to chests. Just the fluids are automated.

With some variance for where ore, oil, water and trees are you could compute the minimum theoretical time to finish the game and actually play it in that time.

blazespinnaker
Filter Inserter
Filter Inserter
Posts: 495
Joined: Wed Sep 16, 2020 12:45 pm
Contact:

Re: Theoretical speedrun

Post by blazespinnaker »

Well, the spirit of the idea is to see if there are any ideas missing from standard speedruns, and picking up and putting in chests doesn't really speak to that I think.

But, yeah, that TAS run I linked to, they do exactly that. It's so fast, it almost seems like they hacked factorio or something. But no, it's just lightning quick chest transfers.
OptimaUPS Mod, pm for info.

mrvn
Smart Inserter
Smart Inserter
Posts: 4641
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Theoretical speedrun

Post by mrvn »

I think even manual the chest transfer is very powerful. In a speedrun the problem is remembering/knowing when you need to fill the inventory of something and planing your running around so you are there at the right time.

Even if you plan each inventory transfer in advance most of the time you wouldn't be able to arrive at the right places at the right time. That's why infinite reach would be such a powerful cheat. That's why in that TAS they use groups of chests instead of filling the furnaces/assembler directly. Means fewer refills. Few enough you can plan them.
blazespinnaker wrote:
Sun Sep 12, 2021 4:37 pm
One thing on my to do list is to rework the blueprints with an eye for how a human would lay it out in a real run.

Another useful thing about this approach is they make for shorter games. I don't have the same time to spend on factorio I used to.
One thing they do in speedruns that I still fail at in normal games (because I use bluebuilt or construction bots asap) is that they design the factory to be placed using click&drag or running along a line having all inserters face the same way in identical intervals and then they build it on the run. So it's just run and click click click click. If I do that I misplace half my inserters. Also no rotating inserters all the time. That's what costing me the most time when I manually build something. Same with power poles. You want to minimize them but if that destroys click&drag placement then it's not worth it. You have to weigh time vs. resources to make an extra power pole or inserter or whatever. If it takes 5s to mine the extra resources and 20s to build a more efficient sub-factory then inefficient sub-factory wins the day.


Your post actually got me wondering what it would take to build a factorio AI. I know there are self replicating factories showcases. But they start of with a starter base all setup and then just blueprint additional modules with a bit of logic thrown in. How hard would it be to actually code an AI in LUA that will build a factory base from scratch. Or write an AI that captures the factorio window and sends input events to the game. An AI that actually sees and plays the game like a human.

mrvn
Smart Inserter
Smart Inserter
Posts: 4641
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Theoretical speedrun

Post by mrvn »

I just had a thought while reading another thread.

You mentioned and unlimited inventory. Now that's cheating. But maybe we can sort of get an unlimited inventory without cheating.

In a speedrun you should always be hand crafting something. Otherwise you are wasting crafting time. So there is always something in the crafting queue. Now say you need to transport 1 million iron plates. Make sure the crafting queue has enough stuff in there to last a while. Then pick up iron pates and craft iron gear wheels. Craft one copper wire. Repeat till you picked up the 1 million iron plates. Then quickly run where you want to dump the 1 million iron plates and cancel the iron gear wheel and copper wire crafting and dump each batch of plates.

See unlimited inventory. :) Might not work for everything and you have to get the timing right or you end up with a whole bunch of iron gear wheels. But if you are doing a tool assisted run the tool could auto craft and auto cancel to make your inventory seem infinite.

I haven't watched many speedruns but does anyone use that crafting trick as inventory bonus?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3476
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Theoretical speedrun

Post by DaveMcW »

Unlimited inventory is not so interesting, because large buffers have a large opportunity cost.

blazespinnaker
Filter Inserter
Filter Inserter
Posts: 495
Joined: Wed Sep 16, 2020 12:45 pm
Contact:

Re: Theoretical speedrun

Post by blazespinnaker »

mrvn wrote:
Mon Sep 13, 2021 4:17 pm
I just had a thought while reading another thread.

You mentioned and unlimited inventory. Now that's cheating. But maybe we can sort of get an unlimited inventory without cheating.
Yeah, the idea isn't so much cheating or not cheating, but rather to see if there are missing ideas that could be used in a real speedrun.
DaveMcW wrote:
Mon Sep 13, 2021 11:25 pm
Unlimited inventory is not so interesting, because large buffers have a large opportunity cost.
Again, this is missing the point. Sometimes it's useful to make certain assumptions so as not to get bogged down.
OptimaUPS Mod, pm for info.

Post Reply

Return to “General discussion”