TL;DR
Extend nuclear reactor neighbor bonus to indirectly connected reactors, with bonus based on distance, in order to encourage experimentation with layout, getting away from the simple 2-by-X design.The Motivation
Regarding nuclear reactor design, the developers have indicated that their hope would be that reactor mechanics would encourage elaborate and creative layouts, without one simple layout being clearly optimal and dominant. And while there's been plenty of discussion about laying out the heat pipes, heat exchangers, turbines, and steam tanks, it appears that an incredibly simple 2-by-X layout of reactors has become the agreed-upon gold standard for the core layout. A rather boring 1-dimensional design, with no need for further experimentation to find out if it can be made better.This, I believe, is due to two reasons, and has led me to think about ways to alter this dynamic and make more elaborate layouts competitive compared to simplistic layouts.
The main reason is how the neighbor bonus applies only to directly connected and perfectly aligned reactors, up to a maximum of three neighbors. The result is that a 2-by-many layout maximally utilizes the neighbor bonus, with only the four reactors on the end getting two thirds of the bonus instead of the full bonus. No matter how else the reactors are laid out, there's no way to get more than this; there will always be at least four reactors with only two neighbors. And pretty much every other near-optimal design greatly complicates the ability to route fuel cells to the reactors. (I almost came up with some clever designs to solve the fuel transport issue, except I need an underground belt that can go under two adjacent reactors, 10 tiles, and that doesn't exist in vanilla.)
The second reason is that the heat loss caused by long heat pipes encourages players to maximize the perimeter length:reactor ratio, so that the maximum number of heat exchanger groups can be placed within a short distance of the reactors. The one-dimensional layout provides this maximum ratio, as the perimeter length is exactly proportional to the number of reactors. In contrast, a more square or circular design would minimize the ratio, such that the perimeter length is proportional to the square root of the number of reactors.
The 2-by-many layout is therefore a dominant strategy, optimal in two key ways, and there's no reason to try anything else, because anything else would be sub-optimal.
The Solution
Alter the neighbor bonus to also include reactors connected through heat pipes and other reactors, with the amount of bonus inversely proportional to the distance (or better yet, the distance squared).Example: Let's say that the neighbor bonus between any two reactors is (C / distance)^2. I'll set C = 2.5, because it produces numbers easy to work with, but it could be set to anything for balance purposes. (Similarly, instead of squaring things, a custom power could be used for further balance tweaking.)
Now consider a layout of five reactors, with one in the middle and the other four placed one on each side of the first, like a +. The reactor in the center is at a distance of 5 away from each of the four outer reactors, so its reactor bonus is 4 * (2.5 / 5)^2 = 1 = 100%. Each of the four outer reactors is a distance of 5 away from the center reactor and a distance of 10 from the other three, giving each of them a bonus of 1 * (2.5 / 5)^2 + 3 * (2.5 / 10)^2 = 1/4 + 3/16 = 7/16 = 44%. So the five reactors combine produce an output equivalent to 7.75 independent reactors, a 55% cumulative bonus.
What if we wanted to expand this setup? Let's line eight more reactors around, creating a diamond or diagonal square layout. (For now, we'll ignore the space need to supply fuel; I'll address that in a bit.)
Code: Select all
[R]
[R][R][R]
[R][R][R][R][R]
[R][R][R]
[R]
Continuing the pattern will result in ever increasing bonuses, but at a diminishing rate of return. This is both good for people who are willing to go to any length to squeeze out more performance, as well as for people who are looking for a "good enough" balance that suits their personal preference.
The Benefits
Because of the inverse square formula, the best bonuses will come about when the shape of the reactor complex spreads out in all directions equally, and the weakest bonuses will result from lining things up as one long row. This sets up a competition between attempts to maximum the neighbor bonus and attempts to have sufficient perimeter length to organize heat exchangers around relatively short heat pipes. As a result, players would surely look for creative ways to balance these competing objectives optimally. Further, the best balance will depend on how compact people can make their heat exchanger layouts. Someone who can figure a way to cram more heat exchangers around a short heat pipe will require less perimeter around the reactors, allowing them to instead make their reactor layout more circle/diamond/square-ish* and thereby increase the neighbor bonus effect.Of course, fuel has to be delivered to reactors. Since in this system they can receive the neighbor bonus through indirect connections, it would become possible to leave gaps between the reactors, connected by heat pipes**, which would allow room for inserters and running belts or placing logistic chests. But don't spread things out too much, because any increase in distance between reactors lowers density, which lowers the neighbor bonus. So once again, players would be encouraged to find creative ways to weave logistics in with their reactors to maximize density while still effectively getting the fuel where it needs to go.
Notes
*The optimal shape is dependent on the distance measurement used. Manhattan distance would result in a diamond as an optimal shape. Manhattan plus equal-cost diagonal connects would result in a square. Euclidean distance or anything approximating it (such as diagonals costing 40% more than straight connections) would result in a circle (or circular approximation).**The distance through heat pipes and through intermediate reactors could be weighted differently. For example, a connection from one reactor to another that has to pass through an intermediate reactor might be more efficient than two reactors connected to each other through 5 units of heat pipe. The former might compute bonus based on a distance of 10 units, while the latter might be based on a distance of 15 (2.5 through half of the first reactor, 5 * 2 through the heat pipes, and 2.5 through half of the second reactor.) Or it could be the opposite, where heat pipes are better conduits than reactors themselves. All depends on balance tweaking.
***A basic implementation could determine the per-reactor neighbor bonus simply by running something like Dijkstra's algorithm on each reactor. This is approximately O(n log n) for each reactor, so the total cost for any cluster of connected reactors would be O(n^2 log n). Not exactly a pleasant cost, but it only has to be paid whenever the reactor network changes, and even for 64 reactors, the work is proportional to 24K "steps", and I wouldn't be at all surprised if a typical computer eats through that work no problem. But even if the devs absolutely loved this overall suggestion, it'd be prudent to implement a basic version of the algorithm early to validate my optimism, before proceeding to implement the full feature. I also would not be surprised if there's a more intelligent way to calculate the neighbor bonus of all the reactors in a single process, reaching perhaps O(n^2) or O(n log^2 n). I was thinking for a moment of the Floyd-Warshall algorithm, but that's O(n^3) because it presumes the worst case number of connections between nodes, which a strictly 2D graph will not even remotely exhibit.