View full-text article in PMC Biomimetics (Basel). 2025 Jun 7;10(6):381. doi: 10.3390/biomimetics10060381 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 1 Spiking Neural Network (SNN) update algorithm 1:function SNN(V, Z, W, Iext, γ, θ, N) 2: for i=1 to N do 3: sum = 0 4: for j=1 to N do 5: sum=sum+W[i,j]·Z[i] 6: end for 7: V[i]=γ·V[i]·(1−Z[i])+sum+Iext[i] 8: if V[i]≥θ then 9: Z[i]=1 10: else 11: Z[i]=0 12: end if 13: end for 14: return V, Z 15:end function