Page 1 of 6

UPS Wars 3 - Electronic Circuits

Posted: Mon Oct 28, 2019 7:17 pm
by DaveMcW
Welcome to round 3 of UPS wars. This time, the challenge is Electronic circuits.

Previous challenges:
UPS Wars 1 - Copper plates
UPS Wars 2 - Steel plates

The concept is simple. Download the map, make a factory that builds and delivers 100k electronic circuits per minute, and do it using as little UPS as possible.

Ore patches are 50x50 in size. If your mining operation does not fit on one patch, you can travel east to find more. Note that longer transport lines may hurt your UPS.

UPS Wars 3.png
UPS Wars 3.png (13.01 KiB) Viewed 12540 times

Rules
  • Build a factory that produces (and delivers to infinity chests) 100k electronic circuits per minute.
  • All assembling machines must be built east of the desert line (X > -90).
  • All infinity chests must be built west of the desert line (X < -100).
  • You may use electric energy interface to produce power, and infinity chests to produce train fuel. No loaders or other cheat buildings.
  • You may use the map editor and helper mods to help build your factory. But UPS will be tested with all mods disabled.
  • No editing the map or technology levels. You have Mining productivity 44 and Worker robot speed 15 (one million science cost each).

Scoring

Your score will be the time it takes to run this command on my headless server:

Code: Select all

factorio --benchmark "savename.zip" --benchmark-ticks 100000

Submission

Before submitting, please run your factory for an hour of game time, and verify it produces 6 million electronic circuits per hour in the production graph. To do this fast use the command: /c game.speed = 100

Attach your saved game in a reply to this thread.

In your reply, please describe anything that makes your factory special. Does it only use belts, or bots, or trains? Is it compact, or power-efficient, or cheap to build? There are many things to optimize for, and I would like to highlight more categories than just "fastest overall".


Winners

The overall winner is a collaboration between Stevetrov and DaveMcW, with a benchmark of only 39497 ms! (Winning entry)

Trains only category
39497 ms - Stevetrov & DaveMcW
40822 ms - Stevetrov

Belts only category
50828 ms - Stevetrov
51754 ms - AssemblyStorm (Shyn)

Off patch smelting category
66223 ms - Stevetrov
70821 ms - flame_Sla

Re: UPS Wars 3 - Electronic Circuits

Posted: Mon Oct 28, 2019 8:33 pm
by Cribbit
No choice in where we put our research? I liked the design that just gave us X research points to allocate as we desired.

Re: UPS Wars 3 - Electronic Circuits

Posted: Mon Oct 28, 2019 8:49 pm
by DaveMcW
I suspect bots are already at a disadvantage on this map, so no reason to let non-bot builds have double mining productivity.

Re: UPS Wars 3 - Electronic Circuits

Posted: Mon Oct 28, 2019 9:01 pm
by Allaizn
Just as a side note: there was another UPS wars on reddit a while ago (and technically still ongoing until I finally make my car belt submission :roll: ): part 1 and part 2 whose comments contain the submissions
I guess this means that this is actually UPS Wars 4? (Not that this matters at all)

Re: UPS Wars 3 - Electronic Circuits

Posted: Tue Oct 29, 2019 1:14 am
by Medium9
I didn't know about the former challenges, and it tickles me just right. I couldn't resist and stay up way beyond my deadline to extend the GC setup of my latest 2700spm build (that gave me personally higher UPS than any other attempt before) to meet the criteria!

Hopefully I managed to meet all the parameters. This runs at around 760 UPS on my i7-4770k when fully zoomed in while standing in BFE.

Stats:
- 152 miners (3xspeed3) (76 each plate)
- 532 el. furnaces (2xprod3) (266 each plate)
- 228 assemblers (4xprod3) (114 GC and cable each)
- 3561 beacons (2xspeed3)
- 40853 blue belts
- 4796 UG blue belts
- 0 splitters
- 1064 medium pole
- 9 big pole
- ??? UG station (helmod doesn't tell)
- ??? stack inserter (this neither)

The special thing about this probably is that it avoids splitters entirely, and aims at filling the plate belts to only as much as is needed. Well, a bit above due to there not being fractions of furnaces, and taking modules away to refine it further will only hurt UPS. Also: No trains or bots. Also no UG belts where not required to cross something - everything is exposed as much as possible. Which makes UPS worse when standing in the middle of things, but has no impact when standing a bit away. (I hope the headless server is agnostic to the saved player positioning.)


I hope this will stand at least a small chance. Good luck to everyone - I hope it'll get crowded here! (Always eager to peek at improvements.)


Edit: There will probably be a lot of mod-messages on startup. It should require none at all to run just fine purely vanilla. I only retained the originally placed energy interface and copies of the infinity chests. That should hopefully work.

Edit2: Added map screenshot

Edit3: Updated the whole build, as well as save and screenshot. If you already downloaded the first version, please replace it with this new one. It's MUCH more compact and also gained another ~60 UPS on my machine.

Re: UPS Wars 3 - Electronic Circuits

Posted: Tue Oct 29, 2019 4:19 am
by DaveMcW
Nice job Medium9, you are a strong contender for real life UPS. :D

As for your save:

Code: Select all

Performed 100000 updates in 111058.528 ms
That is currently good enough for:
  • Fastest overall
  • Fastest in "belts only" category

Re: UPS Wars 3 - Electronic Circuits

Posted: Tue Oct 29, 2019 11:22 am
by knightelite
Are sleeping cars allowed to be used? (Cars can be put to sleep to use as chests via console commands, and it cuts down their UPS usage considerably).

Re: UPS Wars 3 - Electronic Circuits

Posted: Tue Oct 29, 2019 1:35 pm
by Medium9
knightelite wrote:
Tue Oct 29, 2019 11:22 am
Are sleeping cars allowed to be used? (Cars can be put to sleep to use as chests via console commands, and it cuts down their UPS usage considerably).
I'd personally say just go for it. If it won't end up in the general ranking, it could still go into a "shady tactics" category and still serve as an interesting possibility to learn from. (If I may be so bold to comment in this way on a contest that isn't mine to set the rules for :oops: )

Re: UPS Wars 3 - Electronic Circuits

Posted: Tue Oct 29, 2019 1:53 pm
by DaveMcW
knightelite wrote:
Tue Oct 29, 2019 11:22 am
Are sleeping cars allowed to be used? (Cars can be put to sleep to use as chests via console commands, and it cuts down their UPS usage considerably).
Yes. I will allow them, although I will probably add a "no car" category if they end up winning.

But I'm not sure any kind of buffer chest will be efficient enough to win.

Re: UPS Wars 3 - Electronic Circuits

Posted: Tue Oct 29, 2019 3:18 pm
by Stevetrov
To clarify a couple of points for those not familiar with the "shady tactics" of knightelite and others.

There are several things that need to be considered with cars.

1. Cars do not sleep in vanilla without using a console command. Active cars add a significant amount to update times for no benefit over sleeping cars.
2. Some people think cars are cheesy because they allow you to add a chest that is effectively 3x2 in a 1x2 gap.
3. Cars can not be blueprinted, so need to be placed manually or with console commands, some builds even require some entities to be placed before and other entities after the car.

I am not a fan of car builds but I know others are.

Re: UPS Wars 3 - Electronic Circuits

Posted: Tue Oct 29, 2019 10:07 pm
by knightelite
"Shady tactics" :). I'm still hoping that particular optimization makes it into the base game eventually.

For anyone who is curious, here's some performance numbers for sleeping/non-sleeping cars and chests. This was tested back in version 0.17.32, so results may have changed since then.

One of the big advantages of cars (as Stevetrov alluded to) is how inserters interact with the car hitbox. You can get three stack inserters worth of throughput through a one tile wide space if need be, which can be convenient. This can also mean both unloading and loading of a train can happen simultaneously through a 1-tile wide gap :).

Re: UPS Wars 3 - Electronic Circuits

Posted: Wed Oct 30, 2019 4:06 am
by mulark
On patch smelting to feed GC's, clocking some of the thrashy inserters.

Haven't tested it clocking is harmful or helpful, It's only required on the furnaces.

Copper cable ends up with only 6 ticks of downtime due to the clocking so at some point I'll swap those out for normal stacks to see how it does.

Have versions with cars active and with them set inactive via command. Didn't seem to be a large difference just eyeballing it.

Eyeballing it showed it to be a hair faster than Stevetrov's map on my machine, which considering the clocking makes that achievement rather meh.
UPS Wars 3 - mulark.10x.zip
(4.02 MiB) Downloaded 127 times
UPS Wars 3 - mulark.10x - cars inactive.zip
(4.02 MiB) Downloaded 131 times

Re: UPS Wars 3 - Electronic Circuits

Posted: Wed Oct 30, 2019 5:22 am
by knightelite
My factory is very exciting because it is uses a diagonal layout :D.
Image

It uses cars as a handoff from the copper cable assembler to the electronic circuit assembler. For anyone else wanting to do this, you need to perform the following steps:
  • Place blueprint
  • Place cars
  • Place fuel in cars (optional, but stops the annoying out of fuel icon)
  • Start up the factory (the inserters need to be active with the car having some copper cable in it)
  • Remove the beacon to the immediate left of the car. This resets the pickup target for the bottom left inserter to the car instead of the beacon
  • Put the beacon back, with modules in it.
Image

There are therefore two versions of the save, one with regular cars, and one with sleeping cars. To make cars sleep, use the following command:

Code: Select all

/c
for _, ent in pairs(game.player.surface.find_entities_filtered{name = "car"}) do
    ent.active = false
end
Other than that, the main things of note are:
  • Belt base
  • All belts only utilize one side of the belt
  • No belt merges or splits
  • Output inserters from all furnaces are clocked filter inserters set to "set filter" to minimize inserter thrashing and keep them inactive as much as possible.
  • I didn't bother clocking the copper cable inserters since Mulark thought there was probably minimal value there, so I chose to be lazy.
  • Each belt (or half-belt really) is unloaded into a pair of voiding infinity chests via two stack inserters spaced 3 tiles apart. Stevetrov previously found (in smelter wars) that clocking these voiding inserters wasn't an improvement over leaving them free running.
I haven't actually benchmarked it yet as of time of posting, since I have to download a non-steam version of Factorio to do that.

I'll have to see if I can make a train version in a few days.

Re: UPS Wars 3 - Electronic Circuits

Posted: Wed Oct 30, 2019 5:51 am
by DaveMcW
71257.775 ms - knightelite inactive cars
72792.211 ms - knightelite active cars
72942.916 ms - Stevetrov
72948.466 ms - mulark inactive cars
74590.302 ms - mulark active cars

I find it interesting that mulark and knightelite use filter signals for clocked inserters instead of enable/disable. I thought that was slower when I tested it a couple years ago, but maybe things have changed.

Re: UPS Wars 3 - Electronic Circuits

Posted: Wed Oct 30, 2019 6:51 am
by Stevetrov
I find it interesting that mulark and knightelite use filter signals for clocked inserters instead of enable/disable. I thought that was slower when I tested it a couple years ago, but maybe things have changed.
Its a 0.17 change, a filter inserter using a whitelist "set-filter" will goto sleep if it doesnt have a filter set and isnt swinging.

Inserters using enable / disable never sleep although there is a PR waiting to be approved that adds this.

Re: UPS Wars 3 - Electronic Circuits

Posted: Wed Oct 30, 2019 10:56 am
by Allaizn
Stevetrov wrote:
Wed Oct 30, 2019 6:51 am
Inserters using enable / disable never sleep although there is a PR waiting to be approved that adds this.
To be precise: they only sleep if they would sleep without the CN condition. But you usually disable them in a position were they wouldn't, which creates the appearance of them never sleeping when disabled by CN.

Re: UPS Wars 3 - Electronic Circuits

Posted: Wed Oct 30, 2019 11:23 am
by darkfrei
Are cargo wagons without trains allowed?

Re: UPS Wars 3 - Electronic Circuits

Posted: Wed Oct 30, 2019 12:03 pm
by knightelite
darkfrei wrote:
Wed Oct 30, 2019 11:23 am
Are cargo wagons without trains allowed?
If cars are allowed, I would expect cargo wagons without trains are also allowed :).

Re: UPS Wars 3 - Electronic Circuits

Posted: Wed Oct 30, 2019 12:48 pm
by schmetterling
Here is a completely not optimized design. I'll be the average Joe, the control sample. I just wanted to see how bad my normal patterns would perform compared to the other solutions...
Full belt, no bot, no train or anything. GCs are made in a 12 beacon grid design, the rest is just normal smelting columns. Everything is tied together with some half-assed beautiful spaghetti.

Re: UPS Wars 3 - Electronic Circuits

Posted: Wed Oct 30, 2019 3:07 pm
by quyxkh
Here's a first shot at it, it's not pretty but it seems to be playing in the right ballpark. Perhaps notable, it uses cs5.5 assemblers, and trains. I love trains.
pictures
edit: added a ~5% tuneup, stripped some of the excess capacity, added some wiring to keep the stop-selection follies down in the noise, added an extra unload stop just 'cause it looked like it might help.