异形工厂(Shapez)

异形工厂(Shapez)

257 个评价
How to split a belt into 3 (and mathematically why it works)
由 caminatior 制作
This is a mathematical proof. If you don't want to read it you don't have to. There is a picture at the top of this guide showing you how to do it without the math and an explanation on how to do it with any number of belts in the general use section.
15
4
5
6
5
4
2
   
奖励
收藏
已收藏
取消收藏
The Image
Here it is for the people who don't want the math
WARNING
Beyond this point is some NERD ♥♥♥♥. Precede at your own peril.
Using fractions instead of items/second
I am going to talk about each belt as a fraction of the number of items per second it carries divided by the number of items the original belt carries.

For example, If the input belt carries 10 items per second, and it is split into 2 belts that each carry 5 items per second, the 2 belts will each be 1/2. This is so I can generalize and not have to talk about specific numbers of items per second, as it makes the math easier.
mathematically proving the output of the belts is 1/3
The input belt is split into 2 1/2 belts, then 4 1/4 belts, 3 of those 1/4 belt continue on to whatever building awaits them. The 4th belt is put back into the input splitting it into 2 1/8 belts, then 4 1/16 belts 3 continue on, and so on.




Each time the forth belt loops back around it is added to the other 3 belts making an infinite sum of fractions.

Algebra time.

S = the infinite sum of fractions being added to one output belt.

S = 1/4 + 1/16 + 1/64 +...

the first step is multiplying both sides by 4

4S = 4(1/4 + 1/16 + 1/64 +...)

due to the distributive property everything in the parentheses is multiplied by 4

4S = 1 + 1/4 + 1/16 + 1/64 +...

the next step is subtracting 1 from both sides

4S - 1 = 1/4 + 1/16 + 1/64 +...

this step is substituting the infinite sum with S, because the right side of the equation is identical to the definition of S

4S - 1 = S

The final step is to solve for S

4S - 1 = S
-4S -4S

-1 = -3S
*-1/3 *-1/3

-(-1/3) = -(-3S/3)

1/3 = S

1/3 = 1/4 + 1/16 + 1/64 +...
Why the simple option doesn't work
The simple option seems obvious, "Why don't you just not use one of the output? There are 3 belts if you just ignore one." The problem with that is a balance can't split a belt if there isn't 2 belts to split onto, so it will output everything onto one belt instead of 2. It will produce 2 1/4 belts and 1 1/2 belt instead of 3 1/3 belts,


With this configuration some buildings will be getting too many items, and some not enough. Efficiency is the name of the game, you can't have something so simple cause so much inefficiency.
More general use
This same logic can be used to split a belt into any number of equal belts. All you have to do is find the smallest number that when multiplied by 2 a few times equals the number of belts you want( A simple way to find this is to take the number of belts you want and keep dividing it by 2 until it can't be divided evenly anymore.), split the belt into the next biggest power of 2 (2, 4, 8, 16, 32, etc.) and send the unneeded belts back to the input, then split the remaining belts until you have the number of belts you want.
More general use (example)
For this example I will split a belt into 10 equal parts.

First divide 10 by 2 until it cant be divided evenly.

10/2 = 5

Then split a belt into the next smallest power of 2, 8 parts and send the unneeded 3 back into the input.


Then split all 5 remaining belts in half


Then send the output to where ever you desire.
I remembered there are splitters and mergers
I'm gonna quickly show how to set it up with splitters and mergers its a lot easier and requires less thinking.

First make a line of outputs.

Second add a splitter for every other output.


Third repeat step 2 untill there are only 2 splitters


Fourth reconnect the unused outputs.


Fifth use a balancer to reinsert unused outputs and input.


If you use a splitter and merger for this step instead of a balancer there will be more than the max items/second on the belt between the splitter and inserter causing a clog and loss of efficiency.


And thats it.
Special thanks
This guide was inspired by a comment on another guide who suggested the simple option and my passion for math and overthinking automation games.
And thank you for reading my first guide, please tell me if I made a mistake I wrote this at 2 am and have subsequently discovered that I hate this with a passion, so I will not be taking feed back and will be promptly forgetting about this guide entirely, as it's 3 am right now and I didn't proofread it very well. Ok for real this time I'm not coming back. I just had to add that part about splitters and mergers.
General Proof for n outputs
I'm back with new knowledge and a whiteboard. this is a general proof if you care to decipher my scribbles.

General Proof























n=5 case
39 条留言
󠀡󠀡 6 月 16 日 下午 4:17 
You Sir are a Genius
mhollingshaus 4 月 12 日 下午 9:32 
WARNING:MORE MATH AHEAD
note: if your looking for a smaller infinity of splitting blueprints, just use only the primes and then connect them together. :steamhappy:
Cpt. Metal 1 月 12 日 下午 12:17 
Why do you write your sigma sign backwards?
Lightwing 2024 年 12 月 26 日 上午 1:23 
Mhmmm.... Yeah, sure, I get it :steamsalty: :crtcool:
TechConcordance 2024 年 12 月 11 日 上午 4:04 
This is very similar to the idea of having a re-roll side on a dice.
For example, imagine you have a six-sided die but used the 6 face as a re-roll.
This would mean you have 1, 2, 3, 4, 5, and a re-roll
This would mean that, even if it takes a theoretically infinite amount of rolls, you'll always roll a number between 1 and 5.
conceivable 2024 年 10 月 28 日 上午 7:52 
This is very interesting. I think a simple framing that motivates the general n output scenario is that you're basically creating N equal outputs where N>n is some power of 2 and then the remaining N-n outputs you feed back into the system, where they are uniformly re-distributed. The symmetry between all the n outputs is reason enough to see that you get 1/n distribution in each, even without considering the infinite sums.
hbarudi 2024 年 10 月 14 日 下午 2:00 
Minimum math required: Calculus 2 or higher.
ghost of delete key 2024 年 9 月 15 日 上午 10:04 
This reminds me of TTL Cookbook but with maths, and virtual widgets instead of real logic chips...
Leo555V1 2024 年 7 月 14 日 上午 3:41 
bro took spliting into another level :steamthis:
skygodsinc 2023 年 12 月 14 日 上午 4:53 
I dont understand half of what you said but I LOVE IT :) Will come back later when I am more awake and go through it again.