AI learning path

Build a neural network from scratch in C#

15 challenges take you from the dot product to a network that learns XOR, then on to modern optimizers like Adam, with no AI libraries: neurons, activations, loss, gradients, backpropagation and training. Solve them in order in C#; each one runs in your browser with instant tests and an AI review.

  1. 1

    Building blocks

    Vectors, activation functions and a single neuron.

    0/3
    1. 1 Dot Product of Two Vectors Easy Solve in C#
    2. 2 Activation Functions Easy Solve in C#
    3. 3 Single Artificial Neuron Easy Solve in C#
  2. 2

    Forward pass

    Layers, a two-layer network and loss functions.

    0/3
    1. 1 Dense Layer Forward Pass Medium Solve in C#
    2. 2 Forward Propagation in a Two-Layer Network Medium Solve in C#
    3. 3 Loss Functions: MSE, MAE and Cross-Entropy Easy Solve in C#
  3. 3

    Training

    Gradients, backpropagation and gradient descent, up to solving XOR.

    0/5
    1. 1 Derivatives of Activation Functions Easy Solve in C#
    2. 2 Gradients of a Single Neuron Medium Solve in C#
    3. 3 Backpropagation in a Two-Layer Network Hard Solve in C#
    4. 4 Train a Neuron with Gradient Descent Medium Solve in C#
    5. 5 Train a Neural Network to Solve XOR Hard Solve in C#
  4. 4

    Better training

    Weight initialization, mini-batches, momentum and Adam.

    0/4
    1. 1 Xavier and He Weight Initialization Easy Solve in C#
    2. 2 Mini-Batch Gradient Descent Medium Solve in C#
    3. 3 Gradient Descent with Momentum Easy Solve in C#
    4. 4 Adam Optimizer Medium Solve in C#