idle
Curriculum0/5 done

Ch 1: Single Neuron / Perceptron

One unit, two weights, and the birth of a decision

A perceptron (here: one dense neuron) computes

y = σ(w₁x₁ + w₂x₂ + b)

where σ is the sigmoid. It draws a linear decision boundary.
XOR is not linearly separable — a single neuron will struggle.
AND and OR are linearly separable — the neuron can succeed.

Immediate Mode tip: change lr or epochs and train again.
Watch the loss curve and the glowing neuron activations.

Challenges

DSL EditorNeuralBASIC
Data & Decision Boundaryxor

xor: 4 points plotted. Not trained yet — press Train to draw the decision boundary.

Train the network, then tap the plot to ask it about a point that was never in the data.
Networkactivations · weights

Not trained yet

The architecture comes from your DSL. Weights and activations appear once you train.

Metricsloss · accuracy
Loss
Accuracy
Epoch
LR
0.8
Loss
1.1200.0000epoch
Accuracy
100%0%chance0epoch

No curves yet

Loss and accuracy are recorded per epoch. Press Train.

Dataset: xor
Socratic Tutorch1
Tutor

Welcome to NeuralBASIC. I'm your Socratic Tutor — I won't hand you full solutions. Predict, train, observe, explain. Ready for Chapter 1?