MATLAB OneButton Contest - Circuit Runner - Tips and Tricks!

How to Play
In Circuit Runner, your goal is to make your way through a series of logic gates while staying ahead of the glitch chasing you.
Each gate has a set of binary inputs, either 0 or 1. Work out what the output should be and press when the scanner highlights the correct path.
  • Upper path: Output 1
  • Lower path: Output 0
Your first press locks in your answer for that gate, so make sure the correct path is highlighted before pressing.
If you choose the wrong path or fail to answer in time, your signal gets jammed, allowing the glitch to catch up. Keep getting the answers right to stay ahead!
STEM Concept: Boolean Logic
Boolean logic is the basis of how digital circuits work. It uses two possible values, 0 and 1, which can also represent false and true.
Logic gates take one or more binary inputs and produce an output based on a particular rule.
For example, an AND gate only produces an output of 1 when both its inputs are 1. An OR gate, on the other hand, produces 1 when at least one input is 1.
In this game, you'll come across different gates and need to quickly figure out their outputs. This is the same process used to construct truth tables in digital logic.
Timing Your Press!
You'll need to think quickly as the game progresses.
  • Read the gate and its inputs as soon as they appear. Try to work out the output before looking at the scanner.
  • The scanner starts at 0 for every new gate and switches between the two paths. Press when it highlights your answer.
  • As you move through the stages, the scanner switches faster and the gates approach more quickly, giving you less time to decide.
  • Try to get three correct answers in a row to activate a two-second speed boost. Every correct answer also helps you get further ahead of the glitch.
Getting an answer wrong temporarily jams your signal, so it's worth checking your answer rather than pressing too early.
Logic Gate Reference
Here's a quick reference for the gates you'll encounter:
  • AND: Outputs 1 only when both inputs are 1.
  • OR: Outputs 1 when at least one input is 1.
  • NOT: Reverses the input. If the input is 0, the output is 1, and vice versa.
  • XOR: Outputs 1 when the two inputs are different.
  • NAND: Outputs 1 when at least one input is 0.
  • NOR: Outputs 1 only when both inputs are 0.
  • XNOR: Outputs 1 when both inputs are the same.
A useful way to remember the gates is that NAND, NOR and XNOR are simply the opposites of AND, OR and XOR respectively.
If you're unsure about a gate, try thinking about when its output would be 0 instead.
How It Works in MATLAB!
The game uses MATLAB's logical operations to calculate the correct output for each gate.
At the start of each stage, the available gate types are shuffled to give you a different sequence of questions.
The game continuously updates the scanner as it switches between the two paths. When you press, MATLAB locks in the output that was highlighted on the last displayed frame and checks it against the correct answer.
The graphics are updated throughout the game to show the track, scanner position, score and distance from the glitch.
As you play, try to get familiar with the different gates rather than calculating each output from scratch. Once you recognise their patterns, answering becomes much faster, which is exactly what you'll need in the later stages.