home *** CD-ROM | disk | FTP | other *** search
-
- %%%%%%%%%%%% training data for exclusive or %%%%%%%%%%%%%%%%%%%%%%%%%
-
- number_data_items( 4 ).
-
- % Inputs to net:
- % data neuron value
- % item number
- input( 0 , 1, 0 ).
- input( 0 , 2, 0 ).
- input( 1 , 1, 1 ).
- input( 1 , 2, 1 ).
- input( 2 , 1, 1 ).
- input( 2 , 2, 0 ).
- input( 3 , 1, 0 ).
- input( 3 , 2, 1 ).
-
- % Desired Outputs from net :
- % data neuron value
- % item number
- output( 0 , 9, 0 ).
- output( 1 , 9, 0 ).
- output( 2 , 9, 1 ).
- output( 3 , 9, 1 ).
-
- %%%%%%%%%%%% network for exclusive or %%%%%%%%%%%%%%
-
- %%%%%%%%% neuron defintions %%%%%%%%%%%%%%%%
- % neuron neuron
- % type number description
- neuron( input , 1 , $A$ ).
- neuron( input , 2 , $B$ ).
- neuron( not(1) , 3 , $-A$ ).
- neuron( not(2) , 4 , $-B$ ).
- neuron( and , 5 , $A and B$ ).
- neuron( and , 6 , $A and -B$ ).
- neuron( and , 7 , $-A and B$ ).
- neuron( and , 8 , $-A and -B$ ).
- neuron( or , 9 , $A exc B$ ).
-
-
- %%%%%%%%% edge defintions %%%%%%%%%%%%%%%%
- % state type of sendng receiving
- % type receiving neuron neuron start initial
- % neuron number number time weight
- state( edge, and, 1 , 5, 0, 1).
- state( edge, and, 2 , 5, 0, 1).
- state( edge, and, 3 , 5, 0, 0).
- state( edge, and, 4 , 5, 0, 0).
-
- state( edge, and, 1 , 6, 0, 1).
- state( edge, and, 2 , 6, 0, 0).
- state( edge, and, 3 , 6, 0, 0).
- state( edge, and, 4 , 6, 0, 1).
-
- state( edge, and, 1 , 7, 0, 0).
- state( edge, and, 2 , 7, 0, 1).
- state( edge, and, 3 , 7, 0, 1).
- state( edge, and, 4 , 7, 0, 0).
-
- state( edge, and, 1 , 8, 0, 0).
- state( edge, and, 2 , 8, 0, 0).
- state( edge, and, 3 , 8, 0, 1).
- state( edge, and, 4 , 8, 0, 1).
-
- state( edge, or , 5 , 9, 0, 1).
- state( edge, or , 6 , 9, 0, 1).
- state( edge, or , 7 , 9, 0, 1).
- state( edge, or , 8 , 9, 0, 1).
-