Logic Gates (Without Combinators!)

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
Post Reply
Ironmarck
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Nov 24, 2014 4:37 pm
Contact:

Re: Logic Gates

Post by Ironmarck »

NotABiter wrote:
luhem7 wrote:Oh man, this is how it starts you know... soon you will be implementing a full fledged computer in the game.
I was considering doing an in-game computer. I worked out an efficient way to deal with multi-bit values (storage, bitwise ops, and math ops) as well as how to do a "speedy" (to the extent the game allows) multi-port register file. But each piece of such a computer requires extensive configuration with respect to placing the right number and type of items (wood, coal, iron plate, etc.) in the right place, and currently blueprints do not capture that information so construction robots won't place the items for you, making such a construction on the scale needed to do a computer a lot more work than I am willing to do (and hopelessly error prone). Another option is to design the system to be "self booting" so to speak -- have extra parts whose sole purpose is to move items from mass/uniform storage to where they need to be such that you achieve some valid initial state, but this adds so much crap to the design (such reset pieces end up being the vast majority of the build) that it's just depressing to think about how space- and part-inefficient the final result is, plus it's a lot more design work. (I also have ideas for packet-based communication and packet-based routing of raw materials both by belt and train, making it possible for the computer to truly control a massive base, but they suffer from the same issues.) That just leaves making it via some Lua scripting, but that really seems like cheating.

It's kind of sad, because I was hoping to build my first multi-GW computer (maybe the first multi-GW computer in human history!).
Maybe you could use the blue logistics chest.
Just build the whole system disconected from the power network, give the robots the items from a red chest, remove the red chest and conect the power.

Yttrium
Long Handed Inserter
Long Handed Inserter
Posts: 81
Joined: Mon Jan 05, 2015 1:47 pm
Contact:

Re: Logic Gates

Post by Yttrium »

NotABiter wrote:
luhem7 wrote:Oh man, this is how it starts you know... soon you will be implementing a full fledged computer in the game.
I was considering doing an in-game computer. I worked out an efficient way to deal with multi-bit values (storage, bitwise ops, and math ops) as well as how to do a "speedy" (to the extent the game allows) multi-port register file. But each piece of such a computer requires extensive configuration with respect to placing the right number and type of items (wood, coal, iron plate, etc.) in the right place, and currently blueprints do not capture that information so construction robots won't place the items for you, making such a construction on the scale needed to do a computer a lot more work than I am willing to do (and hopelessly error prone). Another option is to design the system to be "self booting" so to speak -- have extra parts whose sole purpose is to move items from mass/uniform storage to where they need to be such that you achieve some valid initial state, but this adds so much crap to the design (such reset pieces end up being the vast majority of the build) that it's just depressing to think about how space- and part-inefficient the final result is, plus it's a lot more design work. (I also have ideas for packet-based communication and packet-based routing of raw materials both by belt and train, making it possible for the computer to truly control a massive base, but they suffer from the same issues.) That just leaves making it via some Lua scripting, but that really seems like cheating.

It's kind of sad, because I was hoping to build my first multi-GW computer (maybe the first multi-GW computer in human history!).
Let me smash your dream even further, factorio is an very precise game exept that inserters ( And many more things ) will not go at the same speed if placed in another chunk, so building any sort of time tracking device will not ensure your entire computer is in sync with other parts which means you would have to be smart about your component placement especially when you try to compare things ( Like most logic gates do )

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: Logic Gates

Post by cube »

Inserters are as precise as everything else, the problem is that actions of entities in the game are not simultaneous and the order of the actions is not easily predicted (but it is completely deterministic).

For example two inserters taking from a single chest that is filled by a third inserter is problematic, because the situation might end up that one inserter takes, everything, the other takes everything, or something in between, depending on the order of building them and partially also on position in the world.

IMHO belts would be better for timing of logic gates, with inserters only having a single long window to take items (fast inserter taking from almost empty belt is easily predictable and no problem at all).

Bleda
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Sun Feb 02, 2014 6:58 pm
Contact:

Re: Logic Gates

Post by Bleda »

This is awesome. I especially like Neotix' seven segment display. There should be a LED object for this kind of stuff. Maybe even with configurable color.

With this you could create a calculator that actually displays the result... I don't know if I could do that, but I'm sure someone eventually will. ;)

LordFedora
Filter Inserter
Filter Inserter
Posts: 310
Joined: Fri Nov 07, 2014 3:46 am
Contact:

Re: Logic Gates

Post by LordFedora »

planned for 0.12.something

NotABiter
Fast Inserter
Fast Inserter
Posts: 124
Joined: Fri Nov 14, 2014 9:05 am
Contact:

Re: Logic Gates

Post by NotABiter »

Ironmarck wrote:Maybe you could use the blue logistics chest.
That might just work. Thanks for the idea. I haven't been playing Factorio recently, but when I get back to it I'll see if that can be made to work in my designs.
Yttrium wrote:Let me smash your dream even further, factorio is an very precise game exept that inserters ( And many more things ) will not go at the same speed if placed in another chunk, so building any sort of time tracking device will not ensure your entire computer is in sync with other parts which means you would have to be smart about your component placement especially when you try to compare things ( Like most logic gates do )
Do you have more details on the nature of these chunk-to-chunk differences?

These differences would mean that even a fairly small bit of logic that normally works could fail if it just happened to be on a chunk boundary? (If so, that doesn't seem very nice.)

BTW, my designs don't currently rely on time tracking, but rather make use of a clock signal - but speed differences would still break that (i.e., if the clock generator is running too fast for other elements to keep up -- though as long as there is some limit on the slowness it should be fixable by artificially slowing down the clock generator).

You now have me worried about how red/green wire networks that cross multiple chunk boundaries might (mis)behave. (E.g., if there's a chance that signal propagation might experience single-game-tick delays at chunk boundaries. Though my current guess is that signal wires do not have a direction of propagation and are actually processed as monolithic entities by the game, so they're free of any "clock skew".) I'll have to do some tests when I get some time.
cube wrote:For example two inserters taking from a single chest that is filled by a third inserter is problematic
...otherwise known as a "race condition". I have enough experience in multi-threading, multi-processing and hardware design to not make a mistake quite as obvious as the one you describe. (Though there may be other pitfalls in "factorio logic" that I don't know about, such as the chunk issue Yttrium mentioned.)
Bleda wrote:There should be a LED object for this kind of stuff. Maybe even with configurable color.
I would be happy with being able to turn lights on and off at will (via red/green wire signals), even during the day. (Even ignoring using lights for computers, it's just annoying to have a nice bright factory... and then suddenly it gets real dark because, you know, the sun has started coming up. I'd rather burn the juice and run the lights all day than deal with that.)

Configurable color sounds cool though. Especially if that is dynamic (somehow based on red/green wire signals) so I could make an in game computer with a "full color" (4 or 8 colors) dot matrix display.

Blitz4
Inserter
Inserter
Posts: 21
Joined: Sat Mar 07, 2015 9:37 pm
Contact:

Re: Logic Gates

Post by Blitz4 »

LordFedora wrote:planned for 0.12.something
Whoa!

Blitz4
Inserter
Inserter
Posts: 21
Joined: Sat Mar 07, 2015 9:37 pm
Contact:

Re: Logic Gates

Post by Blitz4 »

Neotix wrote:Fully operating Seven-segment display
Image

It will show how many items are in smart chest (from 0 to 9).
Connecting multiple displays with proper configuration in smart switches, it can show how many items are in storage :D

I used lamps but they're problematic. Now I'm using inserters and "no power icon" :D If i want to display "1", smart switches provide electricity to segments ADEFG and segments BC have no power.
Amazing!

Requires the Smart Circuit Systems mod (https://forums.factorio.com/forum/vie ... =14&t=6272)
I'm guessing this is what's being added to 0.12?

Post Reply

Return to “Combinator Creations”