How I Made Factorio Play By Itself | Ultimate Automation Challenge Tutorial
HTML-код
- Опубликовано: 7 сен 2024
- FACTORIO SELF EXPANDING BASE:
The ultimate goal in Factorio is to have the game play itself. Project started to build a Self-Expanding Base in Factorio.
This is not a novel concept, but my attempt is to make it simple and have it continually scaling. It is an opportunity to leverage the community to build something better than any of us could have done alone.
This is approached as an IT project with scoping, constraints, deliverables, minimum viable product etc.
Please consider supporting the channel on Patreon (access to save games):
/ nilaus
SCHEDULE:
Twitch Livestreams: 20:00 CEST
SOCIAL:
Patreon: / nilaus
Twitch: / nilaus
Discord: / discord
Twitter: / christiannilaus
Website: nilaus.tv
Tips: streamlabs.com...
Livestream VODs:
All livestream VODs are available on my second RUclips Channel: @NilausTV
MODS:
Recursive Blueprint+ - Allows deployment of blueprints through Circuit Network
Editor Extensions - Inifinite resources and instant build
(other mods with minor impact)
#Factorio #StayEffective #SelfExpandingBase - Игры
programmers when they can do something manually in 10 minutes but can automate it in 10 days:
I'm the same with my programming but Id rather program it once and take a while over doing the task ever again
Tectonica said it best. You can build thousands of machines, but there's only ever going to be the one of you.
10 mins for the next * years or 10 days forever...oh the balance of effort!
Its a joke guys, now one is saying automating is bad
@@Cecil_Augus Flesh is weak. Machine is eternal.
d=P
32:00 Two wrongs don't make a right, BUT, three rights make a left. Fascinating base. Good work!
I believe joSEF identifies resources by attempting to place pumpjacks and miners and seeing if any get expended, which I reckon could be done even with the infinite chests, but the methodology for that base is wildly different, and it is interesting to see the differences between approaches.
I seem to remember that the first spiral self-expanding Factorio base I watched many years ago in a video (which also used recursive blueprints) did actually collect the resources and built the components for the expansion. As far as I remember they just covered city blocks with a miner grid blueprint, where only the miners which actually had something to mine materialized. The guy then sorted the mined products into copper, iron, coal and stone and had a station for each type.
Since the guy also used a no-water map but didn't use magical water-out-of-nowhere mods, he couldn't build batteries and thus his base browned out during the night. Oil was also not available - it was all about growing the base.
Galaxy brain: do a Seablock version, so you guarantee the availability of water.
The resource scan can be done.
When you create a block always make a mining block. Then after x time/ x many blocks if there is more than x ore skip the block if there is 0 ore deconstruct all miners and build a real block
You'd need a sorting system too. And probably a threshold for amount of ore so you don't bother mining trivial deposits. And of course you also have to do oil deposits, refining and cracking. Though I guess you could skip pumpjacks and rely on coal liquefaction.
Then you would also want to add supply constraints. Don't build more science if there's demand for iron, copper or oil - just build empty city blocks (only rails) until you've built enough raw resources to satisfy demand.
Of course then you'd have a rather sparse base with a lot of empty blocks. Perhaps you could resume building normal blocks from the first empty block. You'd need some kind of signal in the resource blocks that tells the building loop "skip me". I'm not sure what that could be, though.
Very elegant solution for debugging. Similar to your many-to-many train network, it's one of those things I'm almost sad to know, as it's hard to go back or try other stuff. Despite that, I always look forward to videos like these.
25.20 I love that you show us a huge complex undertaking, something I can just about follow on a conceptual level, but also freely admit you have no idea how this part works as it was made by a collaborator. So wholesome sir x
A great project. Unfortunately, new research laboratories and missile bases are being built before existing ones are fully utilized. The same applies to the production of science packages. I modified the blueprints a little:
- An extra copper stop for copper ore
- Added a missing inserter in plastic production
- Oil trains return to the Infinite Ore block if they cannot be unloaded
- Lower sulfur buffer at sulfur production train stops (because it delayed the start of production of sulfuric acid)
- A circuit that prohibits the construction of further research laboratories, rocket bases, etc. (unfortunately the signals are ignored as soon as the AI can no longer find anything to build, then it still builds new research laboratories, rocket bases, etc.)
- Infinite provider chests for base building parts in every infinite ore block (prevents drones having long flight distances as the factory grows)
Despite small errors, it's a great project that's a lot of fun.
I really want to see the resource gathering implemented! although of course it would require the resource nodes to be much closer together, but still it would be fun
Worth a watch for for the solar design alone, imo. if you squint hard enough, your 4 : 3 :: 25 : 21. I like the 'woven' appearance.
It's how I usually do solar. Put down some medium poles to make a fully-covered area with no gaps or overlap, then pack solar panels around them as tightly as possible, and fill in the gaps with accumulators.
I loved this. Great job! I liked the developer part since I am developer too.
Tabu is a German word it means that something is not allowed to do or to have
It's usually spelled Taboo in English, so there's been comments doing a "Well ackchyually" and "correcting" the spelling, even though Tabu is a valid alternative spelling in English too
This video gave me some great ideas for my own megabase. I'll try to implement the max train-on-demand and the way of refueling!
I loved the explaination of fixing and maintaining production environments. One thing I noticed when you fixed the blueprint, I said to myself, where is the QA of the production fix? Verification in the blueprint but that would be redundant in this aspect lol
"So far I have shown you how it works, But anyone who has done anything relating to development know that things dont" - Nilhaus
Can relate to this more than I should.
Also saw at least in the first backup, That the Yellow science Does not restrict 1 train which backs up the Fuel train and causes havoc.
Have you shared a BP book of this build? Like you did with a base in the book. I'm not interested in 100% automation, rather nice city blocks with resources production.
I like the 1-1-1s. its perfect for early game 'mine carts'! a reskin maybe cargo tweaks and voila! mine carts!
Nilaus re-invents token ring networking. Cool to see.
Now that is a brilliant build you and the community has made :)
Circuit network is "not debuggable" "You have to invent your own breakpoints"
There is, of course, a mod for that. Allows you to freeze arbitrary groups of combinators and singlestep them: Controllinator
...which someone had to invent on their own.
"Keeping this as vanilla as possible-"
"JuSt UsE mOd, 5hEaD"
Great video, even better factory. Thanks!
An algorithm for a spiral isn't super hard, but I have no clue how I would translate that into factorio logic xD. If I were to do something similar I'd probably just use a simple rectangular grid :).
That could also make it easier to work with coal/nuclear power, just make one expand to the left the other to the right... I'd just build 2 grids next to each other, a power grid and a production grid. Would have to be a custom map with some straight shoreline to make things easier. I see how adding mining automation would make things way harder tho, you'd end up with city blocks with 100 ore mined after 2 minutes and the block is empty... then you'de have to come up with an algorithm to remove mining blocks and replace them with something new. That process wouldn't be impossible, but it would probably tank the performance cause you'de have to keep track of the location where you removed a block, store that info, build a new bloc before continuing the spiral, ... nightmare fuel.
40:40 a true Enter the Matrix moment
heh i have been fooling aroundin factorio building my own modular system. and i ended up using that editor mod for my dev environment too. as the saying goes - "everyone has a test environment, some people have a seperate prod as well" :P
As for mining I'm no pro but would just making the second possible block built (solar first) be a mining block. Simply slap passive provider chests on the miners to be taken to a sorting block. (In this case sorting block needs to be built before, so maybe mining should be #3 in the possible list.)
The real kicker is will you just leave the cell empty after mining? I take it once this bad boy starts it doesn't have a proper way to edit itself
You could store the demand of each block in a combinator and look for items with negative demand and prioritize them as you do now. You could then have a single combinator in the brain always demanding one siencelab driving the expansion. I dont think this would allow for overproduction since the trainnetwork should only add delay and not limit throughput, but if i did limit throughput the "supply" numbers wouldnt be accurate though...
You said you could get rid of the infinite resources and/or deal with biters. Does that mean you don't have plans to do so? I always thought it would be cool to make a blueprint for the "brain" that you could stamp down at a certain point of a standard game of Factorio and then it would take over expanding the factory after, but that would require dealing with resources and maybe also biters. Either way cool stuff.
For the "stamping the brain down at a certain point of a standard game" compatibility, I personally would even deem it acceptable if the player took care of placing the mining blocks and providing the construction materials. (The brain wouldn't even need to care if the player built an actual hub block, used an infinity chest, or hand-crafted the items.) The automated brain would only need to be able to detect when the player has sufficiently re-filled the stockpiles in the logistics system.
And the cheaty "raw resource from thin air" block would need to be disabled: Which you can easily do by taking the iron ore token out of the brain (to put it into "permanent Tabu").
Maybe the brain could be given the capability to detect when a construction site is already occupied with a player-built (mining or hub) block; Or it could be left to the player to deconstruct the mines before the spiral reaches those blocks.
This is the order in which I would implement more features:
--- Take into account the stockpiles of construction materials before placing a new city block.
--- Detect and skip pre-occupied city block locations.
--- Build one or two hub blocks as the first thing the factory does (or one more set of hub blocks before/after each science lab block).
--- Detect resource patches and auto-build mines (and offshore pumps).
Awesome proof of concept.
i really like the concept of stations requesting trains, and trains beloning to the providing station and not the demanding station. i think i might screw around with that in my Pymods world. have been dabbling a bit with cityblocks, given that i love trains, and have very mixed experiences TBH, but i like fiddling around with trains, intersections, cityblocks, etc. my maybe proudest train related thing i have made is an endgame wall, supplied by a single train, based on demand, the roboports on the wall were all seperated by 1-2 tiles, so i never had issues with bots being too far away, or bots taking an hour to get to a wall segment with resources. i won't get to this level, but im fine with that, ill keep dabbling around with a little of everything.
Watching how easy this was to troubleshoot errors made me sad on how my work doesnt have these features
I could be doing my programming homework right now but instead I’m watching this
i think you have officially beat factorio 😂
Very nicely done! Good job!
With resources it’d be interesting to see a mall where it would only stamp down an new block if the components were available (miners, assemblers, etc)
I think the better solution would be to stamp down new mall blocks as needed, using the existing demand-driven system.
if recursive blueprints can deconstruct the biter one could be solved in an easy way: for every block you build you first deconstruct the space where its going, then build a defense block to "the outside" (you can definitely find the block that is 1 further away from the center, don't ask me how xD) that includes a wall, some turrets, maybe flamethrowers and an artillery installation. supply via train (the train ends should have gates)
doesn't need to be directional if it defends in all directions :D
I kind of like that idea, but I see some problems. First, if you deconstruct the space where the next block would go, and there are defenses there, it would make the base vulnerable at that point untill the "outside" defenses are built. Next, it would require a lot more time constructing and deconstructing defenses.
What I would do instead is:
1) Check if the next block is a "corner block". There are 4 possible corner blocks, but we need to choose one of them and start the defense loop always on that one. Using the existing logic on this video we could check if we've arrived on a corner block. A corner block can be identified with (X = Y) OR (X = -Y), but in our case we just want to build new defenses once each loop. Let's pick the top right corner for that. The top right corner is identified by (X=Y) AND (X > 0).
2) If the next block is the top right, we can pause the main loop and start a new one on (X+2,Y+2) (let's call the new loop variables (M,K)). We can now build an outter shell of defenses around the shell where the next group of blocks will be built.
3) For that shell of defenses we would need 2 blueprints, a corner defense and a straight defense. We need four comparisons to decide which blueprint to build and on which orientation:
condition 1) M = X+2.
condition 2) K = -Y-2.
condition 3) M = -X-2.
condition 4) K = Y+2
At least one and at most two of those comparisons will be true, so we have 8 possibilities. The possibilities and outcomes are:
If conditions 1 and 4 are true, build a corner block with no rotation (it's the top right corner of the outter shell).
If only condition 1 is true, build a straight block with no rotation (it's on the right edge)
If 1 and 2, build a corner with 90º rotation (bottom right corner)
If only 2, build a straight with 90º rotation (bottom edge)
If 2 and 3, build a corner with 180º rotation (bottom left corner)
If only 3, build a straight with 180º rotation (left edge)
If 3 and 4, build a corner with -90º rotation (top left corner)
If only 4, build a straight with -90º rotation (top edge)
4) After all of those are done and the second loop is back at (X+2,Y+2), we can start a third loop at (X+1,Y+1), deconstructing every block (those will now be the previous defense blocks, made obsolete by building the outter shell).
5) After the third loop is done, the main loop can start again.
Yes, this would make the expansion to halt for longer and longer based on how far from the center we are, but it would also take longer and longer between each halt.
I guess that Nilaus still won't want to play with biters (at least until he has implemented every other improvement). But that won't stop me from giving my opinion.
On first glance this sounds possible. Determining the adjacent outside block: Has to be. Defending in all directions and fully preventing biter infiltration: Definite yes. Clearing the space for the next artillery block in time for it's construction: I'd generally say most probably, but definitely if construction materials have to be crafted, and artillery shells have crafting priority.
There is one fundamental contradiction to Nilaus' design philosophy for his SEF: He assumes that the player is at the tech level where they have just built blue science and unlocked bots; but artillery research takes yellow science (and spidertrons take yellow and purple). And without artillery shells you'd have a hard time clearing the biter nests. (You could use the same direction-agnostic philosophy by going 2 blocks further out and expanding out to a 3x3 city blocks ring of turrets around that city block. But the main problem with turret creep remains: that it's a multi-step process.)
And these new "terminal consumers" (artillery canons consuming artillery shells) require a whole chain of additional types of production city blocks to craft those shells.
And then there's always the possibility that biters break the wrong entity at the wrong time. Trains could get stuck at missing rail pieces causing gridlock; construction bots could get called out at the wrong time to repair damaged stuff; roboports are already sometimes getting connected to the power grid too late, and with biters being involved they could even get disconnected. There's a lot of possible complications on that outer ring that you'd want to insulate your base from.
And there will certainly be further problems that only show up when you actually try to do it.
TLDR : Biters don't add anything to the game beyond a headache in the early to mid game, and are too unpredictable for this style of expansion due to how the system works. You'd likely need to have a full suite of defences for every cell, and you'd not have enough space left for the supporting production to meet demand.
Here's the problems you might not be considering.
1) Biters, in the default setting, expand and repopulate. The system may replace destroyed buildings, but not trains, and it would break the system as bots would be dedicated to repair and replacement duties instead of what the system is designed for.
They also, ah... don't work in straight lines or set schedules, so can very quickly disrupt a system mid action, and then good bye ten hours to one special boy.
Biters tend to get deleted out on large construction ideas because it's not a challenge. It's a drain of resources and a chore, especially in the late game where you can slap on shields, stack laser defense, and hip thrust through thousands of them. It's just wasting time, and processing power, for no additional benefit.
I'd mention "It's Easy!" then following it up with "dunno lol" probably might have been a hint it's not that simple, but I'm not slapping you down here. Just offering a counterpoint.
2) Define "Outside". Think on that for a moment.
You can probably indeed run a separate system ahead of the first, but you probably aren't understanding that the base here doesn't exactly "know" where the centre is. A spiral is used because it's infinitely expandable.
You'd also swiftly hit a snag. Let's put this on a num pad. If I'm getting biters from Nine, and the system is on Two prepping to build on one, that's three to four stages before it gets to *maybe* building a wall.
What if it decides to build on the ruins of the base a nice shiny solar array instead of a gun when it gets there?
The answer to both problems is that all cells need to have defences, and the system only builds up once the wall is finished. But I'm not certain you can create separate global bot networks, so my earlier issue with builders getting choked up on repairing rather than new structures will still happen eventually. But you can't just have the base try to logic out where the defenses need to go because there's no reliable way to track incoming attacks, pollution buildup and spread, and you'd run the risk of something else being selected rather than a defence cell. And defending them all will quickly lead to redundancy, far less space for more valuable production, delays and ultimately destruction due to not reacting to a defence breach should an attack catch the base at a golden opportunity.
Simply brillant !
This is really cool.
Your mind is a beautiful thing.
would love to see this with the time acceleration mod. 64x for 24 hours just watching the counters go up
Who designed the spiral coordinates logic, and do they have a video/post on how it works ?
How do you like the train system here, where each block is surrounded by rails? I just finished watching the Megabase in a Book series which takes a different approach to the rail system. Which do you prefer?
Hi. What a great project. Please make it realistic. I would be so cool to use it in a real world.
Realistic.. crash on an unknown planet and build a megabase on your own..
base
So this base is based? 🤣🤣🤣
Why didn't you use nuclear power for this base? It seems like most of your city blocks are dedicated to power production, and the nuclear reactors would almost certainly reduce the number that you would need.
I dont know the answer for sure but I'm suspecting it has to do with calculations/ups. Solar panels/accumulators use a trick in coding to all be factored at once, making it a low pc requirement to run. Nuclear, while potent, will require more calculations for fluids, supplies, trains, etc. Most megabase-thinking setups use a lot of solars for this reason, to preserve game speed via UPS.
@@Dawnseeker_Ch He did say in the video, that the reason for only solar, is that all other power forms require access to water. So, one less headache to worry about.
@@Dawnseeker_Ch the solar calc is a simple one. No trick. Just that each panel outputs the same power at the same time. Accumulators are basically the same. Therefore the calc is NumPanels * kw. (I cant recall atm how much panels put out).
1) current build uses no water
2) idk about you but my 2x2 reactor is dummy thick and wouldn't be able to fit in a city block. You'd either have to get a good design or change how city blocks get distributed for this one edge case
How are you automatically adding trains and cargo wagons to the system?
Could you maybe link the previous timelapse video as a clickable card to the video? Might bring some clicks as well
love this
hello where can i download the city block blueprint for this?
Leave it running... it will be a great stress test for your PC 🤣
Am I wrong to want to see different speed runs of different auto mega base designs?
Question? Given enough space, will the blocks form a fractal?
I am *so* going to copy locomotives in the middle
is there a way to connect logic from the accumulator system to the switches, for example if charge =50% the refinery switches shut off and then if 40% the steel smelter switches cut off and so on. I'm sure its doable but a cool self preservation measure.
Already implemented in the base 😉
wondering if the plotter logic circuit / logarithmic spiral could be adapted to hexagons
add miner blocks instead of infinite chests unloading resources to trains? Not sure if there is a way to just tell the base to expand if it runs low of materials
The trick is detecting where you can put miners and oil. It’s not impossible, but it’s rather difficult.
The supreme goal of Factorio players is optimizing so much they don't even have to play the game anymore
Functionality, what is the difference between letting the power crash and shutting down a base recource production? The shut down just propagate through the entire factory and take a long time to return to true creating false demand flags the whole time while doing so. Could you just set the min power level higher like 75% to completely resolve this issue?
*Firstly,* power crashing to a brownout *affects logic combinators,* which would almost certainly throw off the brain. (Or at least the "we need power" SR latch. This exact thing happened on stream with one of the first power detection designs he tested.)
*Secondly,* you actually seem to have it the wrong way around. Having the _whole_ factory shut down _at once_ (or slow down at once) is a condition from which recovery is pretty much instant (because all the stockpiles in the train stations are neither filled nor depleted). Shutting down -let's say- only the steel production will cause the steel stockpiles to be depleted during the night, because all steel consumption will continue running at full speed, and thus selective shutdowns will actually need _some_ time to recover.
However, the blocks that Nilaus shuts down (iron plate, copper plate, steel plate, bricks, oil refining) all *take in only raw resources.* And meanwhile, the whole rest of the factory will keep working unaffected for _some_ amount of time (which it wouldn't do if the power crashes completely). So he (or actually the brain) has to over-build these smelter blocks (in order to allow them to catch back up to demand after they've been shut down), and he has to over-build the blocks that provide the raw resources. But not the science labs and everything in between.
*Thirdly,* yes, you could avoid over-building these "smelting" blocks by changing the power cutoffs. Having the factory build new solar blocks once the power drops below 50% means that (after the solar blocks are brought back up to spec) only 50% of the accumulator charge is used to bridge the night, and 50% is merely an emergency reserve to avoid total shutdown when the charge drops below 50%. (This is assuming that the factory can bring the power fully back up to the 50% specification every time it drops.) So, with a cutoff at 50%, the factory should build twice as much power production blocks as are needed.
If you changed the condition for building more solar blocks to 75%, the factory should build 4 times as much power blocks as needed. But in return you could change the cutoffs for the smelting blocks to 25% and know that they should basically never turn off (and thus won't need to be over-built).
So, these cutoffs are always a compromise between
--- fully guaranteeing that the power never crashes completely
--- over-building the solar city blocks as little as possible
--- over-building the smelting blocks as little as possible.
Do the cutoffs that Nilaus chose give the optimal balance? Almost certainly not. But they do the job _well enough._
@@Pystro Thanks, that was very informative. I definitely had not considered the SR latches interaction.
"Tabu" is the German spelling of taboo and Wikipedia says it's the historical spelling as well, so it might just be that German, and probably others, never deviated from the original spelling while English did.
So the technical term might have been loaned from one of those languages (Japanese does this a lot, many terms in Engineering and Medical fields are German loan words), or it was established and frozen in technical literature before English changed the spelling of the colloquial term.
It is still pronounced exactly the same as the English "taboo", with a long vowel at the end, so you using a short U threw me off until you said taboo at one point 🤣
Tabu Search is the name of the algorithm as it is named in the seminal article by Fred Glover in 1989. Whether that is a misspelling or not is irrelevant, because the algorithm is called 'Tabu Search' in the field of Operations Research. Since that is my field and that is what I am referring to, then Tabu is the only correct way
@@Nilaus Oh I'm totally on board with the spelling! Just some thoughts on how the spelling ended up like that (i.e. I doubt it was a mistake), plus the note that it might/should/could still be pronounced like "taboo" even if the spelling is different.
Of course, if thousands of people only see the different spelling and consequently choose a different pronunciation, and do so consistently, then that becomes the de facto _correct_ pronunciation for that technical term.
I wonder if F. Glover ever commented on the "intended" pronunciation, Wikipedia doesn't list it.
Or maybe "tabu" is/was actually pronounced with a short vowel, that's entirely possible as well.
Id like to see a version without the global roboport network with trains delivering the materials to the new block builds.
You could also remove roboports and construction stations after they are no longer needed.
Theoretically possible. Requires handling both removal logic, and adding a massive complication to the expansion spiral logic.
full lengt and post a link to the save off this game just befor activate the button
You should try to invest time in learning Space engineers (the Game) 😅
when chapters?
blueprints?
Can you do that on a death world?
No
I think the true White Whale for Nilaus will be when he automates cliff removal in production rather than in pre-development planning :)
Possible blueprint?
They're in the save games over on his Patreon
7500 hours? You do know that a year only contains 8000 hours?
That’s what happens when you play the same game for 6 years lol
I know... I've played Sid Meier's Civilization for more than 20,000 hour, but that's over 30 years now.@@americankid7782
And?
Can we get a full list of mods please ? I know those 2 are the important ones but I see some other things like those number displays that I like :)
the number displays are "nixie tubes"
If you grab the save game off the patreon you can sync mods with save which would then allow you to download and enable any and all mods present within the save, then it's as simple as making sure you have a blueprint of the initial city block, the brain if you will, and opening up a new world with no resources, no caves, no biters, no trees, slap down the brain block, put items where they are needed to make everything work, and press the big green go button to then start the whole thing off building itself, the downside is the fact that half the game is not included in this as there is no resources to collect and everything you stamp down is just spawned in not built in any way, nor does this handle biters in any capacity
hmm sounds danish
Josef
Your too smart to waste your life playing games.
This ain't just no game pretty boy
Is it a wasted life if it pays the bills and provides enjoyment at the same time? He's said he found other jobs less fulfilling and other reasons for why he does youtube things. I fail to see the problem.
You're.
Also, you've been here since 2013, needed to have seen the video, clicked on it, then typed this comment to tell someone who has an active patreon, and links to developers, "they're wasting their lives".
Stick to your "big gay playlist" next time, buddy.
He isn’t wasting his life. He does this in his free time and makes money from it.
Thank you, but I am too smart to waste my talents dying slowly in a corporate hellscape, so I have taken my academic passion for logistics to a place where it is appreciated and can be applied: gaming and RUclips
blueprints?