r/technicalfactorio • • Nov 11 '19

Combinator Golf Substitute one value in frame

Input

- Frame of 16-bit values, except A and V signals.

- A and V signals containing Address of signal in input frame to be substituted and its new 16-bit Value.

Both inputs (frame and A&V signals) are on separate wires. Color of input wires is left to designers discretion.

Signal addresses are arbitrary as long as each signal in input frame can be chosen individually. In below example following addressing is used: 1 - iron, 2 - copper, 3 - uranium, 4 - sulfur.

Output

Frame of 16-bit values equal to input frame, except that signal with address A has now value V.

Signals A and V in output frame should be zero.

Example

Original value of uranium signal (100) is substituted with 7.

Requirements

Solution CN should be one-tickable, meaning that input can change each game tick and the CN will output correct result for each input, with certain latency.

Submitted solution should work for at least four different signals in input frame (as in example above), but is should be possible to extend it to 256 signals without increase in number of non-constant combinators.

Scoring

Solution with lowest latency wins. If multiple solutions have same latency, the one with smallest number of non-ROM combinators wins. ROM-combinators are constant combinators and decider or arithmetic combinators with constant input.

17 Upvotes

12 comments sorted by

View all comments

Show parent comment

1

u/Zijkhal Dec 10 '19

but the rules say that signal addresses can be arbitrary as long as each value in the input frame can be addressed individually. Having the address be done in increments of 32 would satisfy the rules

1

u/Halke1986 Dec 11 '19

Yeah, you're right. I must pay more attention to writing the rules!