Note that the connections between connectors are bidirectional, so that's why the output node is also sending a beam toward the X input node in the last case.









An OR gate is sort of a combination of the two:

The Talos Principle was a puzzle game released in 2014 by Croteam, the Croatian studio responsible for the Serious Sam series. I bought it recently and found myself deeply engrossed in its mechanics.As I played, there was one particular mechanic which I thought had some fascinating effects. The game features a number of puzzles which use "connectors" to connect beams of light to light-sensitive switches. One interesting property of the beams of light is that beams will cancel each other out if they cross.As I saw this effect in play I wondered what else you could do with this interesting property of beams of light. I wondered if you could make some sort of automaton with beams of light as I noticed that streams going through doors then crossing the stream that turned on the door would oscillate on and off.One night, it hit me. You can make logic gates. I'm going to use some pictures to illustrate what is happening. Triangles represent beam sources and circles represent connectors.A NOT gate is fairly straightforward:An AND gate can be made like this:Now these aren't the only constructions of these gates, but this is enough to prove that The Talos Principle is NP-Complete. Once you have logic gates, it's quite trivial, actually. You can use these gates together to construct any arbitrary boolean satisfiability problem. Crossovers are made trivial by using the third dimension to avoid crossovers. With said puzzle, the verifier is quite simple: give the player a single movable connector which they can connect only to starting connectors (with creative use of walls) representing each boolean variable. The final result of the formula is hooked up to a switch that opens a door with the sigil behind it.Since computers are essentially just clever combinations of AND, OR, and NOT gates, plus some sort of clock, we have almost everything we need to make a computer. So we're missing a clock. If you've played the game, you've probably created a few of these by accident...To make a clock, you can use a beam switch that opens a door that allows another beam to cut off the beam that opens the door. Such a clock alternates between these two states:Viola! You now have everything you need to make a computer in The Talos Principle.