Botie's workshop · neurons and activations
Build a Light-Pattern Detector
BOTIE
Examples, experiments and workspace controls
Connect a tool's inputs to see what it produces. You can try a branch before connecting it to Result.
Try your own inputs
Increase both light readings by the same amount. Should the neuron change its decision? Now keep the right light fixed and move the left reading just across the two-unit difference.
Context for this challenge
Combine the two weighted readings into left brightness minus right brightness.
Let's build a small version of the light-pattern detector from the history. Two sensors report brightness on the same scale, one on the left and one on the right. We want to recognise a pattern where the left side is sufficiently brighter. The weights act like the potentiometer settings: they control each sensor's contribution. A bias sets how much contrast is needed, and an activation turns the combined signal into a decision.
Inspect the component calculation
Add(
First contribution: Multiply(
Value: Left light sensor
Multiplier: 1
)
Second contribution: Multiply(
Value: Right light sensor
Multiplier: -1
)
)Examples and results
- Left light sensor
1
- Right light sensor
3
- Required result
-2
- Left light sensor
3
- Right light sensor
1
- Required result
2
- Left light sensor
2
- Right light sensor
1
- Required result
1
- Left light sensor
4
- Right light sensor
1
- Required result
3
- Left light sensor
2
- Right light sensor
2
- Required result
0
- Left light sensor
3
- Right light sensor
2
- Required result
1
- Left light sensor
3
- Right light sensor
3
- Required result
0
Try a fresh construction
This clears this draft, including its undo history. Earlier successful attempts stay recorded. Build again without opening hints to record an independent attempt.
Stuck? Inspect a worked construction
The tools below form one possible solution. You can assemble it, follow its signals, and undo that change to return to your own construction.
Assumptions and test precision
The readings use an invented brightness scale shared by both sensors. This recognises one simple pattern; a learned visual recogniser needs many detectors and training examples. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.
Your last tested pieces can start the full construction. An existing draft there keeps its own pieces.
Both sensors become bright
This check uses the pieces from “Wire a detector for left-side contrast”.
BOTIE
- Left light sensor
9
- Right light sensor
8
Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.
Build a construction in the workspace above first. This case will test those pieces.
What roles do the negative right-sensor weight and the bias play separately?
Weights determine what is measured, bias sets its offset, and activation determines the response to that score.
The readings use an invented brightness scale shared by both sensors. This recognises one simple pattern; a learned visual recogniser needs many detectors and training examples.
Work through the Python challenges →