# Small Basic – Artificial Neuron

I wrote a program about simple artificial neuron (PQK191).  This neuron has two inputs x1, x2 and one output y.  And the output can be shown as:

y = f(x1*w1 + x2*w2 + b).

While, w1, w2 are weights, b is bias and f() is unit step function.

f(x) = 1 (x ≧ 0)
f(x) = 0 (x < 0)

Parameters b, w1, w2 are the properties of this neuron.  And with changing these parameters, this neuron will work like logical gates such as AND, OR, NAND and so on.

If (w1, w2, b) = (0.5, 0.5, -0.7) then this neuron works as AND gate.  If (w1, w2, b) = (0.5, 0.5, -0.3) then it works as OR gate.  If (w1, w2, b) = (-0.5, -0.5, -0.7) then it works as NAND gate.

Last year, AI Go player "Alpha Go" developed by DeepMind won professional Go player Lee Sedol. The AI has a lot of connected artificial neurons (neural network) and it is learning Go with the deep learning method.

Today's program shows just a basic unit of a deep learning AI.

1. Tryhest says:

nice article nonky))
i found some other params:(w1, w2, b)
[“and”]=”0.5 0.5 -0.7
[“nand”]=”-0.5 -0.5 0.7
[“or”]=”0.5 0.5 -0.3
[“nor”]=”-0.5 -0.5 0.3

all in text demo: DCK316

1. Hi Tryhest, your DCK316 is a simple program to help understanding artificial neuron. Thanks.

2. YLed says:

Fantastic Nonki!
I learned a lot by reading this blog.
Is the technique of the artificial neuron could be apply to a decision algorithm in a program to play chess?