Forum Discussion

JupyterPS's avatar
JupyterPS
Copper Contributor
Jun 24, 2026

"VBAF Learning Trail -- From Zero to AI Developer in PowerShell 5.1"

VBAF -- Getting Started

A Guided Trail from Zero to AI Developer

Welcome. You are about to learn how artificial intelligence actually works --
not by reading about it, but by running it, watching it, and breaking it.

VBAF implements neural networks, reinforcement learning and multi-agent
systems from scratch in PowerShell 5.1. Every algorithm is readable.
Every concept is explained in the code comments.

This guide takes you from installation to building your own AI agent.
Follow the camps in order. Do not skip ahead.

Time required: 2-4 hours for Camps 0-3. Camps 4-5 are open-ended.

CAMP 0 -- BASECAMP

Get VBAF installed and your first output on screen

Goal: see "VBAF Framework ready!" on your screen

Step -- Install VBAF from PSGallery

2 Replies

  • MITCHELTEC's avatar
    MITCHELTEC
    Copper Contributor

    This is really cool way to teach it, building neural nets and RL agents in plain PowerShell strips away all the framework magic that usually hides what's actually happening. The "run it, watch it, break it" angle is exactly how it clicked for me too, reading about backprop never landed untill i stepped it line by line. One thing I'm curious about: how are you handling the matrix math under the hood, are you leaning on raw arrays or wrapping something like Math.NET? With 5.1 specifically I'd imagine performance gets intresting once the agents start training .Either way I'm bookmarking this and running through Camp 0 tonight.

    • JupyterPS's avatar
      JupyterPS
      Copper Contributor

      Pure raw arrays -- no Math.NET, no external libraries, nothing.

      Every matrix operation is implemented as nested for-loops over [double[]] arrays. The weighted sum in a neuron is literally:

      powershell

      $sum = $this.Bias for ($i = 0; $i -lt $inputs.Count; $i++) { $sum += $inputs[$i] * $this.Weights[$i] }

      No vectorisation. No BLAS. No GPU. Just arithmetic.

      On performance:

      Honest answer -- it is slow compared to Python. A DQN that trains in seconds in PyTorch takes 2-3 minutes in VBAF on the same hardware. The FastMode flag (smaller networks, shorter episodes) helps a lot for quick experiments.

      But that is actually the point. When you see the training loop running step by step at human-readable speed, you can watch what the algorithm is doing. The slowness is a feature for learning -- you can insert Write-Host anywhere and see exactly what each neuron computed.

      For production -- use Python. For understanding -- the slow version teaches you more.

      The PayOff:

      When you finish Camp 1 and open VBAF.Core.AllClasses.ps1 -- you can read the entire backpropagation implementation in one sitting. No autograd magic. No graph compilation. Just the chain rule written out explicitly. That is worth the performance tradeoff for learning purposes.

      Enjoy Camp 0 tonight! 🇩🇰