Тёмный

Factorio Automated: A 1000SPM self-expanding factory built with bots and Lua 

Chris Uehlinger
Подписаться 791
Просмотров 230 тыс.
50% 1

Check out this followup if you have questions or issues with getting things running: • Followup: Factorio Aut...
The scenarios:
- Bot-based factory [FIXED AS OF 2024-02-19]: drive.google.com/file/d/1luWU...
- The older and less polished train-and-belt-based factory: drive.google.com/file/d/104kx...
Unzip these and put the folder inside the scenarios folder in Factorio's data directory: wiki.factorio.com/Application...
The bot-based one has a file in it called von_noying.lua, if you want to turn off biters set the safe_mode variable in that file to true.
If you want to transplant the root megatile to a new scenario, there are a lot of steps. You'll obviously need to copy-paste it, but make sure to bring over the blueprint book from the Blueprint Deployer, throw a stack of heavy oil barrels in one of the storage chests and put at least one logistic bot in one of the Roboports to bootstrap things. The pins the algorithm puts on the map also won't line up if you move the root megatile, so you'll need to adjust the variables PIN_OFFSET_X and PIN_OFFSET_Y in the Moon Logic combinator until they line up.
The save files (these are with the factories producing 1000SPM) may be easier to get running:
- bot-based: drive.google.com/file/d/1eG3f...
- trains-and-belts-based: drive.google.com/file/d/1Z0r3...
The code for the algorithm: gist.github.com/chrisuehlinge...
How this was recorded:
For clips where I'm talking about UPS on my M1 Max MacBook Pro, I recorded using a 4K30 capture dongle with screen mirroring turned on to force the resolution (since the Macbook Pro screen isn't actually 3840x2160). However I wanted 4K60 for as many clips as possible, so for all the other footage I used my Windows desktop (Intel 8700K) and used a GTX1080 for rendering the game and an RTX2080Ti for encoding the footage in the highest quality I could. I used OBS for all captures and edited in Adobe After Effects.
References:
- ‪@niftymaniacfactorio5050‬ • GreyGoo Mk I: A self-e...
- ‪@DroCaMk3‬ • Hi, I'm JOSEF! (Self-E...
- ‪@Nilaus‬ • How I Made Factorio Pl...
- The 10k SPM bot base: / 10k_spm_bot_base
FAQs that aren't answered in the video:
Q: How long did this take to make?
A: I started in 2021, I spent about 2 months on the initial trains-and-belts factory, then another month or two on the bot-based factory. Over the course of the past couple years I probably spent about six months total working on this, but most of that was tweaking and minor improvements.
Q: What's with the name?
A: The bot-based factory is called "Von Noying", a name that references the concept of "Von Neumann Probes" and which I came up with when I was frustrated with an issue I was running into. That name is all over all of my files now, so it's the one I'm stuck with. Notably, I worded the whole script to avoid saying the name because I'm honestly not in love with it.
Q: What are those two lines of lights on the root megatile?
A: Those keep track of the percentage of idle logistic bots. I keep those lights on their own power network so I can use the graph of their power usage to measure whether the factory has enough logistic bots over time.
Q: What's the deal with those two nuclear-related tiles in the root megatile?
A: Those were initially designed to be stamped out by the algorithm, but finding a good "build condition" for the uranium enrichment tile in particular proved difficult. In the end I discovered that one of each tile is enough to fuel 1000SPM worth of nuclear megatiles, so I just kept them in the root megatile to simplify things.
Chapters:
0:00 Introduction
0:45 Mods used
1:33 Part 1: The Design of the Factory
1:36 The Algorithm
3:10 Manufacturing Tiles
4:24 Solar Megatiles
4:54 Nuclear Megatiles
5:27 Oil Processing Megatiles
6:17 Mining Tiles
6:51 Part 2: The Factory Lifecycle
6:56 Kickstart demand with the "Mall of Shame"
7:42 Building the first Research Tile
8:17 The climb to 1000SPM
8:55 Biter Defense
10:09 Part 3: Evaluation Pros and Cons
10:15 Pro: Small Tiles mean low stakes
10:53 Pro: Fine-grain measurements of supply and demand
11:17 Pro: Transportation is simple
11:54 Con: UPS
12:35 Con: Water
12:56 Con: Modules
13:36 Things that aren't Cons
14:00 Other factories you should check out
14:35 Conclusion

Игры

Опубликовано:

 

15 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 315   
@leeconderacci
@leeconderacci 2 месяца назад
Love the chestals and the luxurious hair at the end! 10/10
@DanielNerd
@DanielNerd 4 месяца назад
bro automated the game itself. that must be one of the most factorio things i've ever seen anyone do on factorio!
@Barthoization
@Barthoization 4 месяца назад
Soon it will be able to run doom
@ChrisStavros
@ChrisStavros 3 месяца назад
Eh it's been done before, and without cheaty tools like the Lua combinator.
@alexmuliar4615
@alexmuliar4615 3 месяца назад
@@Barthoization It already has run Doom
@ThatOliveMrT
@ThatOliveMrT 4 месяца назад
'Finally I can play the game now' energy lol
@gameringdudeguy1126
@gameringdudeguy1126 4 месяца назад
"BIGGETS FACTORY EVER! 400+ TRAINS, 1M+ BOTS 8K RESOLUTION QUALITY" energy
@Trupen
@Trupen 4 месяца назад
This is automation on another level
@bpop2148
@bpop2148 18 дней назад
TRUPEN !
@ratchet1freak
@ratchet1freak 4 месяца назад
another option for artillery is to figure out whether (artillery_range² - (width_of_base/2)²) < tile_size² (or some other threshold) that way you know to insert a artillery tile in the middle. And you can adjust from there as you need to add artillery tiles and they get moved out of range of each other to make sure that you can always keep clearing.
@uehreka
@uehreka 4 месяца назад
That’s a really good idea. It would take a fair amount of annoying debugging (since potential bugs wouldn’t show up until the factory had been running for hours) but overall it’s probably the correct answer, even if it would be difficult.
@Dan-gs3kg
@Dan-gs3kg 4 месяца назад
​@@uehreka you can do mock testing with models of reduced functionalities, or reduced environments.
@sunofabeach9424
@sunofabeach9424 3 месяца назад
unfortunately, Lua cannot calculate square roots of values
@ratchet1freak
@ratchet1freak 3 месяца назад
@@sunofabeach9424 you don't need the sqrt operation to know whether the sqrt of something is smaller or larger than another known value, square both sides of the equation
@sunofabeach9424
@sunofabeach9424 3 месяца назад
@@ratchet1freak unfortunately, Lua cannot square sides either
@gabagool...not_italian...
@gabagool...not_italian... 4 месяца назад
Video was made seriously well when I was just expecting an amateur level of production lmao. Also the turn while bringing up tool assisted speedruns was a good touch haha
@uehreka
@uehreka 4 месяца назад
Haha, I’m glad someone noticed!
@austismm
@austismm 4 месяца назад
​@@uehrekadont use ai voice next time. video is great but the ai voice leaves a sour taste in my mouth
@uehreka
@uehreka 4 месяца назад
@@austismm lol, I didn’t use an AI voice, that’s what I sound like.
@seanseen_
@seanseen_ 4 месяца назад
​@@austismmthat's his real voice. At the end of the video you see him talking.
@mypersonalstuff-cy7gi
@mypersonalstuff-cy7gi 3 месяца назад
@@uehreka you can be a voice actor :)
@petrus4
@petrus4 4 месяца назад
This is a very elegant design. I am impressed. A few observations:- - The 2x2 breeder reactor design is great. Most people overcomplicate on nuclear, because they want to maximise neighbour bonus, but as you and I have both figured out, going above 2x2 increases your complexity massively. - I didn't think of going coal liquefaction only for oil. That's a wonderful idea. Automating the placement of pumpjacks is prohibitively difficult, as I'm sure you've observed, and by doing it that way, you've sidestepped the placement issue completely. You seem to have achieved something similar with your mining drills, by simply using a uniform square layout. Most people attempt to follow the shape of the ore patch, which again makes placement more difficult. - The design of your decision making system is the simplest and cleanest I've seen anywhere, as well. Most people seem to go for clock loop based designs, which get fiendishly complex. Designing based around quotas is definitely the way to go. - I haven't started using Recursive Blueprints yet. I am still placing my sectors manually, although at the moment I am using hexagons. It isn't possible to make perfect hexagons with Factorio's square grid, but I got around that by grouping four tiles together in a square, and using that as a single unit. My hexagons have side lengths of 11 of those 4 tile units each. The main practical reason why I use hexagons, is because I can both place roboports at the vertices, and get close to centroid equidistance. This means I have six roboports per sector, with minimal traversal distance. That in turn means that my bot flight time is minimal, which allows me to maximise the amount of bots I can have in the air at once, before I incur FPS loss. I experimented with squares, and found that the FPS/UPS drain was too big, due to excessive bot flight time; it was necessary for me to get that down as much as possible. Hexagons would be difficult to place with Recursive Blueprints though, because of the different horizontal and vertical length offsets.
@uehreka
@uehreka 4 месяца назад
This comment deserves a point-by-point reply, so here goes: (forgive any typos, I’m on my iPad with a terrible bluetooth keyboard) - Yeah, beyond 2x2 you start to have the problem where the surface area of your reactor cluster is too low and it becomes hard to efficiently distribute all that heat. Although in this case the real reason I didn’t go beyond 2x2 is because there would be no room for all the exchangers and turbines needed to soak up all of the heat they’d output. - The design was my own, but I gotta credit DroCa’s JOSEF for inspiring me to get off my ass and do coal liquefaction. And yeah, in general I try and make the placement of stuff as “dumb” as possible. The “smarter” the algorithm gets, the higher the likelihood of a really nasty and hard to isolate bug showing up deep into the run. - I tried as hard as possible to “encode” any sort of quotas into the blueprints and not the algorithm. It may seem to some like an arbitrary choice, but over time I developed a sort of intuition for what I considered the best way to separate concerns. - The idea of using hexagons makes my head spin, that’s nuts. Yeah, if you can get the offsets correct, you can probably reap a lot of benefits from the really good properties of the Bestagons. I’d recommend trying out the moon logic combinator, because once you’re in “programming land”, weird offsets become just another thing you can solve with a function and some for-loops.
@petrus4
@petrus4 4 месяца назад
@@uehreka Putting your quotas into the blueprints rather than your algorithm isn't arbitrary at all. It makes perfect sense. It will always make your life easier to incorporate as many event hooks into your terrain/topology as possible, because terrain checks are always simpler to write than generic/free floating clock loops. If I want a clock loop, I have to make a first loop of an arbitrary length, and then however many shorter loops to get down to the precise length I want; and the other disadvantage of clock loops is that I can't just add another instruction to the queue if something unforeseen happens. With a terrain check, all I'm doing is scanning the terrain ID for my nearest tile. The rock stupid way of doing things is to have a local storage tank tied to an RS latch. As long as the level in the tank is above a certain level, the output stays open, and everything proceeds as normal. When the output drops below the minimum, the output closes and the input opens in order to refill the tank; or for example, you build more mining sectors and bring in more ore. It resets once it is full again.
@palee2576
@palee2576 4 месяца назад
This video is seriously underrated, dosh doshington level quality
@baboin1851
@baboin1851 4 месяца назад
Wow this was an extremely impressive video. Self-govourning machines are amazing in every single game. Massive props to you for doing this. I will try and simulate this on my ryzen 9 7950X and 6GHz 96 Gigs of ram rig to see how far the design can be pushed, I will return to you with the results in a month or so. May or may not also be recorded, I'm not sure if I can record as well. I'm 13 hours in at 500 SPM and 80-70 UPS without overclocking anything. Edit: Just passed 1000 SPM, needed to perform two restarts because of a bug that stopped the design of choosing what to build in a new mega tile, I'm not sure what's causing it, but I will trouble shoot. 27 hours in. Current CPU 1 clock 5.5 GHz, current ram speed 5.6 GHz, current UPS 55. Edit 2: Just passed 1.5k SPM. I managed to fix the issue and find the problem. 40 hours in. Current CPU clock 5.7GHz, current Ram speed 6.4GHz. Current UPS 43. Edit 3: A lot of time has passed and many changes have been made. Many, many bugs and things that took ironing out later.(I'm learning Lua due to this, thanks, Chris.) I've managed to create two worlds, one without biters and one with. Both of them are now at 2k SPM. They aren't the first worlds I created. I found some issues that I will post about in my full dissertation. Current CPU temperature 76' C, current clock 6GHz. Yeah, I'm at my limit. Current RAM speed 6.5GHz, I managed to squeeze a little more from them too. Even with my water cooler it doesn't work. I might attempt wiring a car radiator to my processor, but I've been busy so I can't really focus on that, it will take probably an entire day. Current UPS 30. I've also noticed the problem that it doesn't display the UPS correctly, it says it's 30, but from my tracking I found it to be closer to 20. Even my graphics card seems to be struggling a little bit when playing at 4k. Yes. This base is so insane that it's pushing against the ridiculously optimised factorio graphics. In the biterless world I'm getting 45 UPS, but it's closer to 35. Things I will need to do: Remove rocks and trees from the generation. I've been told it might improve the performance. If anyone has any other ideas, I would love to hear any other performance fixing tips and tricks. Soon I will begin changing up the individual tile designs to feature beacons. It should improve performance many fold. I might replace the water barreling chains with one of the waterfill mods too.
@thatonebean141
@thatonebean141 4 месяца назад
I'm comenting so i can come back to this comment later on, i'm intruiges and commited now !
@SIRJACOBSTINE
@SIRJACOBSTINE 4 месяца назад
@@thatonebean141 I second this. see you in a month.
@Fireblats
@Fireblats 4 месяца назад
legend!
@whatusernameis5295
@whatusernameis5295 4 месяца назад
oh wow lol
@BlacKHellCaT78
@BlacKHellCaT78 4 месяца назад
very impressive! cant wit for the full result. Might I recommend going to a lower than 4k graphic resolution to save on gpu bandwidth + overall system temps? Unless the cpu and gpu are running through 2 different water loops, the GPU temp and load will slightly contribute to higher CPU temp as well.
@JordanMetroidManiac
@JordanMetroidManiac 4 месяца назад
This turns the game into an environment with a significantly smaller action space. The game doesn’t run quickly enough for any normal deep learning rig to optimize this, but it would be interesting to see what reinforcement learning could do to optimally place tiles in order to reach 1k SPM.
@Maric18
@Maric18 4 месяца назад
thats a thing that seems like it can be optimized using classical techniques. just gotta model all the variables, like the production speeds and increasing robot lag with distance, production costs for the blocks, energy usage and so on and then just ... find some maxima
@davidebic
@davidebic 4 месяца назад
​@@Maric18 but RL is the lazier solution. Your proposal would require some serious effort xD
@Maric18
@Maric18 4 месяца назад
​@@davidebic yeah i mean i exhaustively searched all possibilities in my game that has 10 10 sided dice , so its just 10^10 cases and i let it run overnight and count occurrences because i was too lazy to do like an hour of math + looking up how to calculate how common each sorted way to roll 10 dice would be
@DroCaMk3
@DroCaMk3 4 месяца назад
Wow, congratulations on this amazing SEF! This is on a level of complexity that JOSEF could only dream of... If he had the amount of brain cells needed for dreaming (n>1) And thanks for the shout-out, makes me very proud to be in a list with Grey Goo!
@uehreka
@uehreka 4 месяца назад
Thanks! When I found JOSEF a month ago (mid way through writing this script) I was still using infinipipes for crude oil, and it was seeing that JOSEF had handled both Coal Liquefaction AND offshore pumping that made me go “OK, I need to step up and solve at least one of those”. Good on you for managing to solve both. Also the brain train is brilliant, you manage to solve a lot of problems by using Factorio’s mechanics alongside combinators to accomplish things that would be really difficult with combinators alone.
@KeithOlson
@KeithOlson 4 месяца назад
@@uehreka As you two love puzzles with this level of complexity, you'll be happy to hear that Zacktronics--of 'Space Chem' fame--has his 'Inifinifactory' for free on Epic Games this week. Enjoy! (...or ragequit, uninstall, and question your life. Your choice. :evilgrin: )
@duster4898
@duster4898 4 месяца назад
Good job, always love to see new takes on automated base
@mike2672
@mike2672 4 месяца назад
Followed the nilaus series with this mod, was impresive too. Enjoyed the video and ty for sharing the files, Will try running it later ✌
@brentritchie6199
@brentritchie6199 4 месяца назад
My goodness that is a whole new level of complexity well done!
@3-valdiondreemur564
@3-valdiondreemur564 2 часа назад
I've actually spent the entire day designing a city block blank template (rails, stations, some basic logic /wiring) to allow me to easily design whatever I want in them, and with the circuit network I am planning to build it might actually allow it to become a self expanding base, which I am thrilled about!
@fernandobustosjimenez9949
@fernandobustosjimenez9949 4 месяца назад
Simply mesmerizing! Great job dude, keep it up!!!!
@mantacid1221
@mantacid1221 4 месяца назад
Perhaps travel times could be optimized by tracking what each module requires, rather than using a tier system. That way, when there is demand for a certain resource, production for that resource is built close to where it is needed most.
@Gavagai297
@Gavagai297 4 месяца назад
Okay the second you had the dk64 tinker music playing you had me. Easy sub
@15Redstones
@15Redstones 4 месяца назад
I think the main reason why the base is hitting UPS issues at 1k spm instead of 10k is that things aren't beaconed. Prod modules without speed beacons makes production really slow. Maybe have it use entirely unmoduled tiles at the beginning and switch to beaconed ones once it has enough resources to craft tier 3 modules? That'd require 2 different tiles for the basic resources.
@uehreka
@uehreka 4 месяца назад
The issue there is that, since the tile size is constant, adding beacons means fewer assemblers, and the math on that didn’t usually work out well. My initial math told me that prodmods would be better than speed mods since by reducing the number of ingredients needed for everything, I’d be reducing the total number of bots needed to accomplish a certain amount of science. It’s possible I’m wrong there, and that the longer travel times caused by a larger, slower factory offset the reduction in traffic from using prodmods. However it feels like it would be difficult to demonstrate that mathematically given how complex this system is.
@15Redstones
@15Redstones 4 месяца назад
@@uehreka replacing a nonbeaconed tile with 12 assemblers with a beaconed tile with 1 assembler might make things slower but should improve UPS. Another option would be beaconed megatiles that are used later on for things that already have a large number of regular tiles.
@peterschmidt1900
@peterschmidt1900 4 месяца назад
Huge respect for trying this, AND for making it work!
@greenfieldblacksky9051
@greenfieldblacksky9051 Месяц назад
The thoughtfulness of this design is great, plus I love that shirt
@davidjonsson9320
@davidjonsson9320 4 месяца назад
This was a great vid keep up the good work man!
@minebuilder1805
@minebuilder1805 4 месяца назад
I really love to see self expanding factories but i could not desing one, the most advanced thing i desinged is an automated miner for dangoreus with uranium mining and relatively easy to change direction. I will run this one for sure, just without infinite chests and i will try to remove modules too.
@uehreka
@uehreka 4 месяца назад
In theory you could run the factory, look at how many buildings come out of each infinichest using the combinators above them, then replace the infinichests with storage chests containing that many of the item. Some of them (concrete comes to mind) won’t fit into one storage chest though. Removing all the modules could be an interesting approach, just make sure to use the Max rate calculator mod to set new values for the constant combinators and inserter conditions in each blueprint.
@primzyyyyy
@primzyyyyy 4 месяца назад
Great video, hopefully more Factorio content is coming to your channel. I have subscribed.
@finlay9260
@finlay9260 3 месяца назад
This is amazing. Downloaded and played it myself and it's stunning to watch all the processes working together to create a unique factory. Also, thank you for using DK64 and BK/BT music for this, loved it!
@DaxterAs
@DaxterAs 4 месяца назад
Great video, this feels like the most natural end game for factorio. It would be cool to have blueprint capable robots in a future vanilla version
@omgwat
@omgwat 4 месяца назад
I wanted to do EXACTLY this and you did it. On a MacBook Pro too even. Congrats, this is amazing
@kiransturt7651
@kiransturt7651 4 месяца назад
Commenting for the algorithm... you need more subs!!! love this video, will absolutely be attempting this myself.
@Apollo49152
@Apollo49152 4 месяца назад
That is amazing! I've always wanted to see what would happen on one of these self expanding bases if you could throw an insane amount of high end hardware at it and let it run for a few weeks.
@freaki0734
@freaki0734 4 месяца назад
could it be possible to add in a function to remove some stuff? like the inner laser turret walls artillery tiles etc. and build over them after a certain time? seems like it could help with lag etc. in the later game
@casualgamer8450
@casualgamer8450 3 месяца назад
Love the factory & acid factory in background
@Easy2own
@Easy2own 4 месяца назад
Really really Sick . Its like the Nilaus selfbuilding Base but i didnt watch his Video . But its so awesome what people create out of Factorio ;)
@Ben_R4mZ
@Ben_R4mZ 21 день назад
This man out here playing a whole different game.
@BBJF12
@BBJF12 Месяц назад
For the offshore pump issue, I would highly recommend the waterfill mod. It allows you to place a "lake" tile anywhere using a recipe similar to cliff explosives, that way, it is exactly the same shape no matter where you place it
@uehreka
@uehreka Месяц назад
So I actually have the Waterfill mod installed, but at least at the time I started, it didn’t properly support putting waterfill into blueprints.
@elginx
@elginx 4 месяца назад
Absolutely insane. I'm speechless, sorry Dosh
@Hawk7886
@Hawk7886 4 месяца назад
This is goddamn amazing and the banjo tooie music elevates it to 11/10. I apologize if you mention it in the video, but I'm really curious what your total produced/consumed bot numbers look like. Clearing Biter waves with a single line of laser turrets must've consumed tons of the little guys. Also, how does it initially start out? Do you manually have to play through until you unlock the needed tech for it to function?
@uehreka
@uehreka 4 месяца назад
Glad you noticed the music! Wrt the bots: I have inserters and logistic chests wired up such that at any time I try to have 1000 construction bots and 500*(number of megatiles) logistic bots (a coefficient I found through trial and error). So I get a couple 100k logistic bots if biters are turned off. You’re right about casualties though: this week I’m away from home and can’t check the exact numbers, but I recall at one point seeing that I had churned through over 1 million of each bot type after a couple hundred megatiles. As for how it starts: I use the scenario editor and do things like pre-unlock the tech tree and disable the intro and victory text boxes. The first clip of the video is what it looks like when I hit “Save and Play”.
@ZytphenA
@ZytphenA 4 месяца назад
This deserved a sub, a like and a comment! Great job!
@thereal-ghost
@thereal-ghost 4 месяца назад
Nice to see someone using general LUA for bot building. Our group normally just injects with C tooling and wraps python or c# for more streamlined builds. Props on sticking with LUA nicely done.
@sunofabeach9424
@sunofabeach9424 3 месяца назад
IT IS FUCKIGN Lua NOT LUA
@MSB3000
@MSB3000 4 месяца назад
This is the best version of this that I've seen
@blacknight6147
@blacknight6147 4 месяца назад
Question, in the recent factorio friday facts, they mentioned that in 2.0 you will be able to use circuits to change the recipes in assemblers. It allows a "universal assembler" design that can make anything as needed, instead of having a set assembler for one specific product. Would this be useful for your design in the future, or would you still stick to just having normal preset assemblers for everything?
@uehreka
@uehreka 4 месяца назад
Oh Factorio 2.0 is gonna blow this thing wide open for that and other reasons. The SEFs in 2.0 are gonna be insane. Part of the reason I got off my ass to make this video I’d been sitting on for over a year is because I know in a year or so when 2.0 comes out a lot of this will be obsolete and the meta will be so much crazier.
@blacknight6147
@blacknight6147 4 месяца назад
@@uehreka if they ever add recursive blueprints to 2.0, do you think this could be done in vanilla?
@uehreka
@uehreka 4 месяца назад
@@blacknight6147 Yes, but like I say in the video, you’d probably need at least a 3x3 megatile (9 megatiles) of combinators. Combinators operations are like even lower than assembly instructions in terms of compute power. But yeah, that would be very exciting. I haven’t heard anything to that effect in FFF though.
@Shnugs
@Shnugs 3 месяца назад
This is such a neat implementation. The script could use a little refactoring to tidy up the 350 line wall of if/else statements. I tried coming up with a tiling strategy for vanilla and am pleasantly surprised that I also started by organizing the items into tiers as well as tiling. You went the extra mile and setup the logistics to automatically determine what tiles would be necessary and how to place them. Really good shit, man. I'd be proud as hell of this if I were you.
@Pompomatic
@Pompomatic 19 дней назад
Very fitting choice of factory music, hehe
@garath_
@garath_ 4 месяца назад
Thanks for the video! Love it!!
@dexio85
@dexio85 3 месяца назад
Very nice! Love some of the solutions here.
@cosmiclattemusic
@cosmiclattemusic 4 месяца назад
this guy deserve be part of the Factorio development team
@DrMoe.Lester
@DrMoe.Lester 3 месяца назад
Automating the playing of the actual game?! Dude you've won Factorio.
@NickShabazz
@NickShabazz 4 месяца назад
Love it, well done!
@FuncleChuck
@FuncleChuck 4 месяца назад
Wow, I'd been thinking to myself: "I should really buy Factorio, and then have someone else play it for me for optimal optimization" and here you've done it. This makes ME the top Factorio player of all time.
@poega123
@poega123 3 месяца назад
dat DK64 song fits so perfectly, one of the scariest bosses on N64
@cybernesis0750
@cybernesis0750 3 месяца назад
The water barrelling process is so inefficient, that it's almost have kind of a loop. need more energy -> more power plants -> more barrels and materials for them -> more bots carrying barrels -> need more energy. Just replacing a single power-plant blueprint (with Pump Anywhere mod) increased UPS and useful production tiles count a lot.
@leoniswulf
@leoniswulf 4 месяца назад
Cool vid. Now I need to find one like this for Industrial Revolution 3.
@oddyquinn9521
@oddyquinn9521 3 месяца назад
Impressive work!
@LanceThumping
@LanceThumping 2 месяца назад
I've just started working on my own self-expanding factory, so this video is a great find for ideas. At the moment I'm leaning towards trains with either belts or isolated bot networks. Fully bot based feels wrong for some reason to me, maybe it's the inefficiency of when bots decide to travel the whole map to make deliveries. (Not that I think it's not a valid strategy) I'm also leaning towards pure combinator based setups but finding out about that Moon Logic mod might be useful since I can use it for more rapid prototyping. (It's much easier working out a program when you aren't laying transistors by hand). For defense, I'm planning on having the base expand in a layered spiral. The outer border is bordered with some walls and laser turrets with a station for an artillery train to come to a stop clear out any nests near the tile, then leave and lock out the station. The current plan is that as long as the base is expanding fast enough biter nests will never build up near the edge. As it expands previous sections will be deconstructed and converted to a new tile depending on resources (like if there is ore) and demand. Also a big change was going to Recursive Blueprints+ instead of the original because it provides detection for ghosts. With it, it's possible to detect if a tile is still being built before progressing which I wouldn't be able to do without a connected construction network like yours. Also I'm using the Constructron-Continued mod so that I can have Spidertrons automatically handle any builds, I think the only other option for expanding with this style is a mod for trains with some sort of bot capability. Would love any feedback you might have. I'm generally trying to keep it more vanilla (makes me want to switch to your style so that I can remove Constructrons) but it's a balance. I think, for train based builds, Factorio 2.0 is going to be massive. Train interrupts will simplify trains massively (as it stands they are terrible in some respects). EDIT: I forgot to mention, that I was also using Waterfill so I didn't have to deal with figuring out pumping but that shot of a blueprinted pump setup might let me switch to barrels (which kinda sucks because of how much complexity that brings with a train setup).
@Borthralla
@Borthralla 2 месяца назад
As soon as I saw you were only using productivity modules I knew it was going to be a serious issue. Tier 3 productivity modules are incredibly overpowered, but they're only really feasible when used with beacons of speed modules. Using speed modules like this decreases both the amount of modules used total and the energy consumption by a large factor. When you use 4 productivity modules the speed is extremely slow by itself, so without speed modules you will need to use several times more assemblers that all need to have all 4 module slots with tier 3 modules, which is an insane amount of tier 3 modules that no one would want to use in practice. If I were making a base like yours legitimately, I would either not use modules at all or I would start using combinations of productivity and speed modules in particular assembling blocks that consume the most resources, such as blue circuits and purple/yellow science production, and labs. For labs you could start building moduled labs after tier 3 modules are craftable while keeping the old labs in place, or you can have a mechanism that upgrades the older labs in place after a certain point in time.
@movax20h
@movax20h 3 месяца назад
Beautiful. And so meta. I like it. And I like the demand based expansion logic.
@MattHudsonAtx
@MattHudsonAtx 3 месяца назад
nice use of inversion-of-control pattern
@panwasap7
@panwasap7 4 месяца назад
The factory must grow...
@RyanHandby
@RyanHandby 4 месяца назад
Amazing haha. This is so extra and I love it.
@oblivion_2852
@oblivion_2852 4 месяца назад
I'd be very curious to know if using 4 beacons and 2 rows either side would use less power and resources for the same or more production
@JavierSalcedoC
@JavierSalcedoC 4 месяца назад
Very cool SEF! I think there's a way to see the CPU useage per entity somewhere in the debug mode
@chocolate_maned_wolf
@chocolate_maned_wolf 3 месяца назад
Man built the Faro Plague
@florintudic
@florintudic 3 месяца назад
I finally have enough courage to play this game!
@alexm7023
@alexm7023 3 месяца назад
I've been wanting to try Factorio in a while, but from all the video I watch it have a big learning wall. This convinced me to finally buy Factorio
@CentreMetre
@CentreMetre 4 месяца назад
Laser Turrets: "Your up against the wall and i am the fucking wall"
@steamnstuff
@steamnstuff 4 месяца назад
Sadly, when I load the game, it spits out the error "Level.dat not found". What am I doing wrong?
@GiantCrow
@GiantCrow 3 месяца назад
Banjo Tooie music is an insta sub, nice vid
@scialomy
@scialomy 19 дней назад
Next gen: "GPT Factorio: I trained a model to design and run self-expanding factories"
@mikeyjohnson5888
@mikeyjohnson5888 4 месяца назад
Anything grey goo like tickles my brain so much. Honestly wish there was a scientific field for its application in space travel/exploration.
@bcfuerst
@bcfuerst 3 месяца назад
You propably don't need much of an algorithm. I like your tier system becasue you can basically just turn this into a stack machine like the JVM. You start at the end condition and keep calling dependencies recursively. Just add special conditions that insert science and energy at the top of the call stack when demand or timing treshholds are encountered. In a way a factory is just a program anyway and you can construct the AST of that based on the tiered dependencies
@PoissonHamster
@PoissonHamster 4 месяца назад
amazing work
@pythonfoundations
@pythonfoundations 4 месяца назад
this is incredible
@Asssosasoterora
@Asssosasoterora 4 месяца назад
I wonder if it would be possible to somehow use "scenttrail" to optemize the factory. Where if enough materials travel from one spot to another. Then the system notice that and build a belt system connecting these two points, optimize the production.
@Dufftata
@Dufftata Месяц назад
hello, I watched a while ago one of your earlier videos where you talk about teaching. Now, I watched this on YT: "How I Learn to Speak Any Language in 24 Hours" And saw a connection. You prob enjoy this. Have a nice day! cheers
@superbnns
@superbnns 4 месяца назад
I wanna get a little silly and change the ammo for the Artillery cannons to Atomic Artillery. How would I do that?
@termandino7351
@termandino7351 4 месяца назад
Crazy shit 🤯🤯 gj man
@abicus3502
@abicus3502 4 месяца назад
Can you make a part that replaces tiles with more efficient tiles, long after they are built? Just for optimisation. First tiles are made for simplicity, second versions are made for efficiency, replacing only some of old tiles.
@blucatdev
@blucatdev 4 месяца назад
This is inspiring!
@sudsy3
@sudsy3 Месяц назад
it probably would be easier to write a lua compiler to generate a blueprint of combinators, than it would be to design this with combinators by hand.
@ocleron1698
@ocleron1698 3 месяца назад
I set the line you mentioned in the description to true to turn biters off but they still show up, thoughts?
@hellboy19991
@hellboy19991 4 месяца назад
Not using the lua mod would be a nightmare, I feel it's justified to use it. I can't imagine you're doing anything with it that can't be solved in any way using the default wires and combinators and stuff. (wire signals are touring complete, right?)
@uehreka
@uehreka 4 месяца назад
Yeah, you’re right on all counts: combinators are Turing complete, so they can perform any arbitrary compute task, however just because they can doesn’t mean it’s easy or fun to do so. And yeah, I’m not doing anything with the Lua code that isn’t possible in stock, with one exception: I reach through to _api and set map pins for each tile to make it easier to keep track of things. But that’s just a quality-of-life thing, not required for the factory to accomplish its goal.
@user-qm4ev6jb7d
@user-qm4ev6jb7d 4 месяца назад
@@uehreka How about a compromise: a standalone script (in Lua or whatever other language) *that writes the blueprint string* full of combinators, to be imported into the game?
@uehreka
@uehreka 4 месяца назад
@@user-qm4ev6jb7d So at this point Lua is not the UPS bottleneck, so whatever algorithm you’d want to do in that outside script you could just write in the moon logic combinator. Unless you’re thinking of deep learning stuff (at this point I’ll address that in my followup video) I don’t know that there’s much reason to offload to an external script.
@user-qm4ev6jb7d
@user-qm4ev6jb7d 4 месяца назад
@@uehreka I meant that as a way to use one less "cheaty" mod. The game itself will just receive a regular blueprint of the "control center" - and yet, every part of that control center will be documented in code. And deep learning is an interesting idea. I haven't thought of that before you brought it up. You might not even need it to be very "deep" - maybe you can get away with a simple Logistic Regression with hand-picked features. I've seen a guy get quite far in the game of 2048 using that method.
@OshidaBCF
@OshidaBCF 4 месяца назад
Professor Layton OST? Amazing work
@uehreka
@uehreka 4 месяца назад
Thanks! The music was Frantic Factory from DK64 (start of level, production floor and R&D) and Grunty Industries (Indoors) from Banjo Tooie.
@OshidaBCF
@OshidaBCF 4 месяца назад
@@uehreka ah shit i got confused sentient IA in factorio that judges your build when?
@uehreka
@uehreka 4 месяца назад
@@OshidaBCF you jest, but after watching this video I legit started thinking about training a Reinforcement Learning model to play Factorio (which would likely involve “judging” game states): ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-DcYLT37ImBY.htmlfeature=shared However given that it took this guy $1000 in cloud computing resources to beat Brock, I don’t see RL in Factorio being a thing unless someone wants to throw $1M at it or new significantly cheaper RL techniques emerge.
@OshidaBCF
@OshidaBCF 4 месяца назад
@@uehreka i think instead of an ai "playing" factorio, an ai piloting this "self building" base could work. Perhaps a special mod to allow interactions between a external software and factorio i aint gonna try because my pc cannot run ai at all, although it would likely be cool as hell
@uehreka
@uehreka 4 месяца назад
@@OshidaBCF Ooh I see. So there are definitely hacky ways of having Lua code communicate with another program by like, writing to a file and then reading from another file. So replacing my handwritten “function” with a neural network that estimates that function is totally possible. With that being said though, the amount of time it takes for this factory to start producing science means that the training process would be grueling. You’d have thousands of games where the factory just runs out of power or produces tons of stuff randomly before anything coherent started happening. But with a well defined reward metric and… still probably $10k-100k, you might end up with an AI that can improve on my algorithm by better predicting what will be needed next instead of reacting to demand and power spikes after they happen.
@CosmicCells
@CosmicCells 4 месяца назад
Ok I need help as I am a Noob: I changed the local is_safe_mode from false to true: local is_safe_mode = true and I also changed the game.speed = 15; because I thought it was way too fast to actually abserve whats going on. I have biters and it doesnt reduce the speed, what am I doing wrong?
@edgar9651
@edgar9651 3 месяца назад
Nice! How long did it take you to do all this?
@tyacyoung
@tyacyoung 4 месяца назад
I nominate you for president
@JFinns
@JFinns 3 месяца назад
This is basically the definition of a 7800X3D build. (X3D chips benchmark this game so much faster than anything else)
@Skydea
@Skydea 4 месяца назад
Man I love this! I am trying it right now, but my factory builds 95% of the time only Iron smelting and not a single mine.
@Svalorz
@Svalorz 4 месяца назад
Have you considered running a "defragmentation" step in the factory to relocate/swap existing tiles so that related products are closer together and thus make the factory potentially significantly more efficient?
@Svalorz
@Svalorz 4 месяца назад
You could even have specially designed efficient megatiles for a single product that get used when all tiles within get assigned the same thing after relocation to further improve efficiency.
@tornbreeze7467
@tornbreeze7467 4 месяца назад
Hey.. could you perhaps write in the video description which mods are needed for the scenario? It always shows me that objects have been removed even though I have installed all the mods that you mentioned at the beginning.
@uehreka
@uehreka 4 месяца назад
Try running one of the save files in the description, that will allow factorio to sync the mods.
@Cronuz2
@Cronuz2 9 дней назад
I dont like "cheating" in these games, since it breaks the point. But you broke the point, made a new goal and clearly made thoughts on the cheats, which makes it ok and no less impressive. Amazing work :D really impressive
@user-np8fw7ih2y
@user-np8fw7ih2y 4 месяца назад
太厲害了,我還在忙著鑽研怎麼該區塊更好,這邊已經進展到不用人了!
@Dufftata
@Dufftata 4 месяца назад
im more impressed by the amount of pixels youre getting, i have less on my macbook pro 2023
@Dufftata
@Dufftata 4 месяца назад
subbed tho, dis gud stuff
@uehreka
@uehreka 4 месяца назад
To capture footage from the MacBook Pro (which I did for any part where I verbally reference UPS stats) I used a 4K30 capture dongle and turned display mirroring on to force the resolution. However I really wanted 4K60 for as much footage as possible, so the rest of the footage is from my Windows Desktop, rendered using a GTX1080, but encoded using my RTX2080Ti so I could get high quality captures. I had hoped that the M1 Max’s media engine would allow me to capture 4K60 locally without a capture card, but for some reason it wasn’t working out and I was getting 1FPS garbage captures, which was definitely a bummer. I’ll add this info to the description to clarify since I don’t say it out loud in the video.
@aljuvialle
@aljuvialle 3 месяца назад
How much time it takes for this algo to fill whole map with one mega-giga-factory?
@Wiry-lp2mr
@Wiry-lp2mr 4 месяца назад
Wow this is an insane project nice work
@acquati3226
@acquati3226 4 месяца назад
bro, you automated the automation game... 🙃
@Cranefly
@Cranefly 3 месяца назад
Regarding solar panels barely breaking even due to the amount of roboports required to cover the panels, wouldn't it be possible to remove roboports once the solar panels are built? I suppose that opens up all sorts of problems for when and how to expand beyond the current solar panel tiles though.
@uehreka
@uehreka 3 месяца назад
Nah, the roboports are needed to keep the bots charged as they make their long journeys across the factory.
@oskarperson6599
@oskarperson6599 3 месяца назад
As an AI system designer I enjoyed every minute of your video :) Well done!
@diophantine1598
@diophantine1598 4 месяца назад
Is the code in Factorio fully programmable? If so I might look into optimisation algorithms like hill climb or genetic algorithm for optimising the factory layout more.
@uehreka
@uehreka 4 месяца назад
There are occasionally things you can’t do (like I had difficulty iterating through all active bots and getting their current travel times) but most aspects of the world you can observe and modify. Every mod you’ve ever seen (even crazy ones like Space Exploration) are all written in Lua. With that being said, the big issue you’ll run into is that it takes a long time for the game to run, which makes more meta stuff like genetic algorithms or deep learning difficult to pull off since training or iteration is very time consuming. That’s why I went with a more straightforward deterministic algorithm.
@diophantine1598
@diophantine1598 4 месяца назад
@@uehreka something like hill climb is both highly efficient and straightforward to implement. It’s just the fitness calculation which would be more complicated. Based on what you said, it should be relatively straightforward to do in Lua, even if the algorithm would likely be somewhat more complex than a deterministic approach, though I don’t fully understand the specifics of your deterministic approach.
@RM-xr8lq
@RM-xr8lq 4 месяца назад
had to look up frantic factory from DK64, great songs in that game
@CamelEnjoyer
@CamelEnjoyer 4 месяца назад
Very impressive
@diophantine1598
@diophantine1598 4 месяца назад
If I understand this correctly, this is a Von Neumann machine!
Далее
50 Factorio Mods You Cant Live Without
17:17
Просмотров 857 тыс.
I Made a Neural Network with just Redstone!
17:23
Просмотров 549 тыс.
Coca-Cola 😂🫲
00:20
Просмотров 2,1 млн
When Optimisations Work, But for the Wrong Reasons
22:19
Advanced Factorio Tips You Didn’t Know Existed!
11:20
Factorio teaches you software engineering, seriously.
21:27
Can you beat Factorio on the SMALLEST ribbon world?
19:23
How the UN is Holding Back the Sahara Desert
11:57
Просмотров 12 млн
How I made a 3D Level in a 2D Game
24:28
Просмотров 3,1 млн
A problem so hard even Google relies on Random Chance
12:06
CS2, но мой ПИНГ - 1000 / PUBG
18:44
Просмотров 219 тыс.