1. STDP Learning Rule

Spike-Timing Dependent Plasticity (STDP) is the biological hack that lets neurons strengthen or weaken their connections based on who “spiked” first. Dominate the timing, dominate the weight.

Why it matters: Precise timing means your simulated neural network learns patterns faster, no feeble emotions allowed haha, only raw timing power.

STDP Window Function:
Δw = A₊ · exp(−Δt/τ₊) for Δt > 0 (potentiation)
Δw = −A₋ · exp(Δt/τ₋) for Δt < 0 (depression)
ParameterWhat It ControlsDefault Value
A₊Strength boost when post follows pre0.1
A₋Strength drop when pre follows post0.12
τ₊Time window for potentiation (ms)20
τ₋Time window for depression (ms)20

2. Memristor STDP Emulation

Memristors are tiny resistors with memory, they change conductance based on voltage history. Use them to mimic STDP naturally, without writing a single rule by hand.

Why it matters: Hardware-level plasticity means real-time learning devices that don’t rely on brute-force code loops.

Memristor Conductance Model:
G(t) = G₀ + ΔG · f(V(t), t)
dG/dt = η · V(t) · g(G, V)
ParameterRoleDefault
G₀Starting conductance (µS)1
ηLearning rate factor0.01
V_thVoltage threshold to trigger change (V)0.5
τ_mMemristor’s intrinsic time constant (ms)10