We have data streams and nodes to do arithmetic on them. This becomes an algebra and leads to a language to build brains.
A node is a function of two data stream variables input and one data steam variable output. Internally the nodes all have the variables I for input, R for other input and O for output.
The code is computer like with differences. ; delimits comments. The main difference is that all nodes/ equations are active at the same time. There are no sequential controls here.
O = I - R ; is a CNode (tm)
O = I + R ; is a PNode (tm)
O = I o R ; is an ONode (tm) O = max(I,R) is arithmetic or
O = I a R ; is an ANode (tm) O = min(I,R) is arithmetic and
(O = I * R ; is MPY) if needed and O = I div R is integer divide.
These nodes all make HalTrees of any size and can match any neuron.
There are obvious conditional nodes.
O = I is R ; O = I if I = R else O = 0. There are {is, gt, lt}
O = I waseq R ; If I=R then m=I and O = I else O = m
{waseq, wasgt, waslt}
There are more nodes, such as conditional switches, but, like Boolean algebra, everything can be done with the first four.
; Let SL and SR be sensors and ML and MR be motors such that:
; If ML > MR turn right.
; the code is for seeking whatever the sensor sense.
MR = SL - SR
ML = n(MR) ;n is a negate function
;end of code
The truth table for this is:
SL SR ML MR comments
0 0 0 0 stop
0 1 -1 1 turn left
1 0 1 -1 turn right
1 1 0 0 stop
This is all for now. If you like I will send you Hal Algebra for free. Just ask.
Harold
A node is a function of two data stream variables input and one data steam variable output. Internally the nodes all have the variables I for input, R for other input and O for output.
The code is computer like with differences. ; delimits comments. The main difference is that all nodes/ equations are active at the same time. There are no sequential controls here.
O = I - R ; is a CNode (tm)
O = I + R ; is a PNode (tm)
O = I o R ; is an ONode (tm) O = max(I,R) is arithmetic or
O = I a R ; is an ANode (tm) O = min(I,R) is arithmetic and
(O = I * R ; is MPY) if needed and O = I div R is integer divide.
These nodes all make HalTrees of any size and can match any neuron.
There are obvious conditional nodes.
O = I is R ; O = I if I = R else O = 0. There are {is, gt, lt}
O = I waseq R ; If I=R then m=I and O = I else O = m
{waseq, wasgt, waslt}
There are more nodes, such as conditional switches, but, like Boolean algebra, everything can be done with the first four.
; Let SL and SR be sensors and ML and MR be motors such that:
; If ML > MR turn right.
; the code is for seeking whatever the sensor sense.
MR = SL - SR
ML = n(MR) ;n is a negate function
;end of code
The truth table for this is:
SL SR ML MR comments
0 0 0 0 stop
0 1 -1 1 turn left
1 0 1 -1 turn right
1 1 0 0 stop
This is all for now. If you like I will send you Hal Algebra for free. Just ask.
Harold