Page 1 of 1

Densest lag-machine

Posted: Tue Feb 20, 2018 7:25 pm
by golfmiketango
I want a machine that will give me the most lag in the least tiles. Something I can turn on and off. Any ideas?

I tried building a pump that continuously pushes water through a closed loop of 21,000+ pipes but it was not nearly as computationally expensive as I expected. I am still running at 600UPS+ while running this contraption (200UPS only while looking at the blueprint):
LagMachine.png
LagMachine.png (663.99 KiB) Viewed 4720 times

Re: Densest lag-machine

Posted: Tue Feb 20, 2018 8:34 pm
by DaveMcW
Arithmetic combinators performing Each * N on a large set of signals. Increase N each tick to prevent caching. Wire the outputs together for bonus addition operations. Use the result to turn on a lamp to make sure everything is fully calculated.

Re: Densest lag-machine

Posted: Tue Feb 20, 2018 8:46 pm
by golfmiketango
DaveMcW wrote:Arithmetic combinators performing Each * N on a large set of signals. Increase N each tick to prevent caching.
Sounds like a start. I've been trying to think of slow-growing chaotic integer sequences that stay small starting from a wide array of different initial starting values so I could get combinators computing per-signal sequence iterations for a long time before they wind up in pathological/overflow sink-holes. The hofstader-conway $10000 sequence looks promising. Maybe a prng is better. Regardless, I admit I suspect something less fun to build and more brute-force-based (like your idea above) is probably more lag-density-maximizing than such ideas.

Re: Densest lag-machine

Posted: Tue Feb 20, 2018 9:05 pm
by golfmiketango
DaveMcW wrote:Use the result to turn on a lamp to make sure everything is fully calculated.
Even a combinator with nothing hooked up to the outputs at tick t, could always get hooked up to something at tick t+1, so I'd be shocked (but also impressed) if the engine is seeking "no-effect" combinators to ignore.

Re: Densest lag-machine

Posted: Tue Feb 20, 2018 11:25 pm
by BlakeMW
Hmmmm, I've never tried it, but you could try having batteries of power switches that get flipped on and off so as to continually create/merge and destroy thousands of electrical networks which ought to be somewhat expensive.

Re: Densest lag-machine

Posted: Tue Feb 20, 2018 11:28 pm
by DaveMcW
Nope, they already optimized that. https://www.factorio.com/blog/post/fff-115

Though it would be interesting to see if you could break it. :)

Re: Densest lag-machine

Posted: Tue Feb 20, 2018 11:43 pm
by quyxkh
Wire up a parallel lagged-fibonacci rng with one of the monster state sizes and start feeding signals into that, that should do it. Probably best to generate the blueprint as text to save your sanity, fetch the zlib source and buld the zpipe example, then blueprint strings are `xclip -selection clibpoard -o | ( head -c1; base64 -d | zpipe -d | jq . ) >pretty.blueprint, to see whats up, then `(head -c1; zpipe | base64) < pretty.blueprint | xclip -selection clipboard to put your generated blueprint back in the clipboard.

Re: Densest lag-machine

Posted: Wed Feb 21, 2018 12:17 am
by Aeternus
Main power plant hooked to your base via a tick oscillator controlled power switch. Turning your entire factory on and off 60 times per second should do the trick...
You can build an oscillator with an "Everything = 0" -> A = 1 looped back to it's own input.

Re: Densest lag-machine

Posted: Wed Feb 21, 2018 12:43 am
by golfmiketango
quyxkh wrote:head -c1; base64 -d | zpipe -d | jq
Cool, thanks, been trying to figure that out... After scratching my head for a couple of minutes I always end up using some web-form. What's zpipe though? Maybe this thing?edit: oh, you answered that, and yeah, it is :)

edit: Also I assume you meant "head -c -1"? -c1 would be just the first character.One could use "tail -c +2|" in place of "head -c1;"to avoid the subshell and random character on your screen but head -c1 is not a mistake.

edit: OK yes, that all works just like you said! nice.... still don't understand what format the stuff is in between base64 and zpipe though. I did find an a precompiled tool on my box that does it: qpdf ships with a little command-line utility called "zlib-flate" which does this as zlib-flate -uncompress.

Re: Densest lag-machine

Posted: Wed Feb 21, 2018 12:53 am
by golfmiketango
BlakeMW wrote:Hmmmm, I've never tried it, but you could try having batteries of power switches that get flipped on and off so as to continually create/merge and destroy thousands of electrical networks which ought to be somewhat expensive.
Don't know if this will work or not but it's a freaking hilarious idea!

Re: Densest lag-machine

Posted: Wed Feb 21, 2018 1:33 am
by quyxkh
Here's a little (7,10) starter kit, as you add signals to the constant combinator it'll kick off the rng cascade for that one.
blueprint
... yup, I gut just that up to fish, so 10 combinators on 100-ish signals each and the circuit network's taking ~290µs. Gang-start a fat lot of those you should be in a world of hurt real quick.

Re: Densest lag-machine

Posted: Wed Feb 21, 2018 2:01 am
by golfmiketango
quyxkh wrote:Here's a little (7,10) starter kit, as you add signals to the constant combinator it'll kick off the rng cascade for that one.
blueprint
... yup, I gut just that up to fish, so 10 combinators on 100-ish signals each and the circuit network's taking ~290µs. Gang-start a fat lot of those you should be in a world of hurt real quick.
With enough constant combinators hooked up this thing is super crazy to watch. Such a PITA to build though ughhhh... Makes me want to just stop and make an all-the-things combinator mod.

Went as far as I could stand and 100 stamps got me to 10 UPS :) Run-and-stamp of the first few was a particularly amusing experience :)

Re: Densest lag-machine

Posted: Wed Feb 21, 2018 2:10 am
by quyxkh
You don't have to keep the constants, you can clear out slots, it's rising-edge one-shot and the rng juist runs independently from there.
blueprint
Here's a tilable version of the rng block, I'm down below 10fps on not so very many of it and I'm not half done about two thirds done loading the signals in

Re: Densest lag-machine

Posted: Wed Feb 21, 2018 2:18 am
by impetus maximus
what is its purpose?

Re: Densest lag-machine

Posted: Wed Feb 21, 2018 2:31 am
by quyxkh
Lag your map as fast and hard as possible. "Lagged fibonacci generator" came to mind immediately for some reason :-)
GolfMikeTango wrote:still don't understand what format the stuff is in between base64 and zpipe though
It's shell pipeline syntax, the guys who built Unix's had a really lovely eye for detail. Open file descriptors are shared among forks, so when you pipe stdin into a subshell, the whole subshell can cooperate to decode the file however it likes. The `head -c1` runs first in the subshell and copies the first character, leaving the rest for the following commands working on that file, base64 -d | zpipe -d de-asciifies and then decompresses the string, and | jq . is a handy json utility.

Re: Densest lag-machine

Posted: Wed Feb 21, 2018 2:36 am
by golfmiketango
impetus maximus wrote:what is its purpose?
No purpose, really. Just horsing around. If the factorio UI/console had better isolation from the "entity-update" part of the game-engine it could actually be useful. But in real life, you're waay better off slowing down the game with console commands.

The "vision" was: I want the game to run at 1 UPS for a bit so I flip a switch somewhere in the world and voila, 1 UPS, all achievement stuff intact. But by the time I started getting interested in this I'd already figured out that was hopeless.

I suppose, the maximization problem has utility to the devs, sort of like a bug-bounty program: If someone can find a nice tidy build that totally makes the game unplayable, that might be something they could investigate. But the combinator builds are almost like cheating, so probably not at all helpful to anyone except as a source of amusement.

Re: Densest lag-machine

Posted: Wed Feb 21, 2018 2:39 am
by impetus maximus
ok, but i feel it would be something that would be too easily misused.
seeing how far you can bend or break something can be fun. just not when it someone on your server doing it.

Re: Densest lag-machine

Posted: Wed Feb 21, 2018 2:44 am
by golfmiketango
impetus maximus wrote:ok, but i feel it would be something that would be too easily misused.
seeing how far you can bend or break something can be fun. just not when it someone on your server doing it.
Never thought of that but now that you mention it, that sounds quite plausible. So, sorry if we just unleashed an army of factorio-combinator-script-kiddies in this thread but I think the cat is already out of the bag :|