Training for Truth Table 1: (0, 0, 0, 0)
The network learned the truth table correctly after 1 iterations.
Testing the trained network:
Input: [0 0], Target: 0, Output: 0
Input: [0 1], Target: 0, Output: 0
Input: [1 0], Target: 0, Output: 0
Input: [1 1], Target: 0, Output: 0
Initial Weights (Input -> Hidden):
[[0.53337239 0.19766255]
[0.18377121 0.0049292 ]]
Initial Weights (Hidden -> Output):
[0.34651997 0.79652266]
Final Weights (Input -> Hidden):
[[0.53337239 0.19766255]
[0.18377121 0.0049292 ]]
Final Weights (Hidden -> Output):
[0.34651997 0.79652266]
-----------------------------------------------------------
Training for Truth Table 2: (0, 0, 0, 1)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 0, Output: 0
Input: [0 1], Target: 0, Output: 0
Input: [1 0], Target: 0, Output: 0
Input: [1 1], Target: 1, Output: 0
Initial Weights (Input -> Hidden):
[[0.9394361 0.00259522]
[0.5438311 0.95889809]]
Initial Weights (Hidden -> Output):
[0.79110817 0.60984493]
Final Weights (Input -> Hidden):
[[0.9394361 0.20259522]
[0.5438311 1.05889809]]
Final Weights (Hidden -> Output):
[0.79110817 0.70984493]
-----------------------------------------------------------
Training for Truth Table 3: (0, 0, 1, 0)
The network learned the truth table correctly after 2 iterations.
Testing the trained network:
Input: [0 0], Target: 0, Output: 0
Input: [0 1], Target: 0, Output: 0
Input: [1 0], Target: 1, Output: 1
Input: [1 1], Target: 0, Output: 0
Initial Weights (Input -> Hidden):
[[0.84660471 0.91258842]
[0.25411337 0.35572475]]
Initial Weights (Hidden -> Output):
[0.47333493 0.27844345]
Final Weights (Input -> Hidden):
[[0.94660471 1.01258842]
[0.25411337 0.35572475]]
Final Weights (Hidden -> Output):
[0.57333493 0.37844345]
-----------------------------------------------------------
Training for Truth Table 4: (0, 0, 1, 1)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 0, Output: 0
Input: [0 1], Target: 0, Output: 0
Input: [1 0], Target: 1, Output: 1
Input: [1 1], Target: 1, Output: 0
Initial Weights (Input -> Hidden):
[[0.94951032 0.04381053]
[0.78466125 0.65932941]]
Initial Weights (Hidden -> Output):
[0.97632696 0.16880446]
Final Weights (Input -> Hidden):
[[0.94951032 0.04381053]
[0.78466125 0.65932941]]
Final Weights (Hidden -> Output):
[0.97632696 0.16880446]
-----------------------------------------------------------
Training for Truth Table 5: (0, 1, 0, 0)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 0, Output: 0
Input: [0 1], Target: 1, Output: 0
Input: [1 0], Target: 0, Output: 0
Input: [1 1], Target: 0, Output: 0
Initial Weights (Input -> Hidden):
[[0.72870973 0.57744179]
[0.18792842 0.25623007]]
Initial Weights (Hidden -> Output):
[0.17060548 0.95259139]
Final Weights (Input -> Hidden):
[[0.62870973 0.47744179]
[0.08792842 0.15623007]]
Final Weights (Hidden -> Output):
[0.07060548 0.85259139]
-----------------------------------------------------------
Training for Truth Table 6: (0, 1, 0, 1)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 0, Output: 0
Input: [0 1], Target: 1, Output: 0
Input: [1 0], Target: 0, Output: 0
Input: [1 1], Target: 1, Output: 1
Initial Weights (Input -> Hidden):
[[0.02712117 0.46479367]
[0.48772063 0.63494348]]
Initial Weights (Hidden -> Output):
[0.74173405 0.9224191 ]
Final Weights (Input -> Hidden):
[[0.02712117 0.46479367]
[0.48772063 0.63494348]]
Final Weights (Hidden -> Output):
[0.74173405 0.9224191 ]
-----------------------------------------------------------
Training for Truth Table 7: (0, 1, 1, 0)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 0, Output: 0
Input: [0 1], Target: 1, Output: 0
Input: [1 0], Target: 1, Output: 0
Input: [1 1], Target: 0, Output: 0
Initial Weights (Input -> Hidden):
[[0.14380847 0.54878651]
[0.47093973 0.59235292]]
Initial Weights (Hidden -> Output):
[0.15596722 0.84988594]
Final Weights (Input -> Hidden):
[[0.14380847 0.44878651]
[0.47093973 0.49235292]]
Final Weights (Hidden -> Output):
[0.15596722 0.74988594]
-----------------------------------------------------------
Training for Truth Table 8: (0, 1, 1, 1)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 0, Output: 0
Input: [0 1], Target: 1, Output: 0
Input: [1 0], Target: 1, Output: 0
Input: [1 1], Target: 1, Output: 0
Initial Weights (Input -> Hidden):
[[0.32685979 0.0444049 ]
[0.98755163 0.84283821]]
Initial Weights (Hidden -> Output):
[0.62318282 0.9962772 ]
Final Weights (Input -> Hidden):
[[0.32685979 0.1444049 ]
[1.28755163 1.24283821]]
Final Weights (Hidden -> Output):
[0.92318282 1.3962772 ]
-----------------------------------------------------------
Training for Truth Table 9: (1, 0, 0, 0)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 1, Output: 0
Input: [0 1], Target: 0, Output: 0
Input: [1 0], Target: 0, Output: 0
Input: [1 1], Target: 0, Output: 0
Initial Weights (Input -> Hidden):
[[0.30587349 0.61635109]
[0.72196745 0.3441004 ]]
Initial Weights (Hidden -> Output):
[0.81931943 0.37056072]
Final Weights (Input -> Hidden):
[[0.20587349 0.51635109]
[0.62196745 0.2441004 ]]
Final Weights (Hidden -> Output):
[0.71931943 0.27056072]
-----------------------------------------------------------
Training for Truth Table 10: (1, 0, 0, 1)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 1, Output: 0
Input: [0 1], Target: 0, Output: 0
Input: [1 0], Target: 0, Output: 0
Input: [1 1], Target: 1, Output: 0
Initial Weights (Input -> Hidden):
[[0.9792277 0.29655232]
[0.78141684 0.87444476]]
Initial Weights (Hidden -> Output):
[0.1636738 0.414314 ]
Final Weights (Input -> Hidden):
[[0.9792277 0.39655232]
[0.78141684 0.97444476]]
Final Weights (Hidden -> Output):
[0.1636738 0.514314 ]
-----------------------------------------------------------
Training for Truth Table 11: (1, 0, 1, 0)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 1, Output: 0
Input: [0 1], Target: 0, Output: 0
Input: [1 0], Target: 1, Output: 0
Input: [1 1], Target: 0, Output: 0
Initial Weights (Input -> Hidden):
[[0.57556625 0.19780532]
[0.61585713 0.57510579]]
Initial Weights (Hidden -> Output):
[0.87851638 0.05614224]
Final Weights (Input -> Hidden):
[[0.47556625 0.19780532]
[0.51585713 0.57510579]]
Final Weights (Hidden -> Output):
[0.77851638 0.05614224]
-----------------------------------------------------------
Training for Truth Table 12: (1, 0, 1, 1)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 1, Output: 0
Input: [0 1], Target: 0, Output: 0
Input: [1 0], Target: 1, Output: 1
Input: [1 1], Target: 1, Output: 1
Initial Weights (Input -> Hidden):
[[0.54237599 0.71597308]
[0.33645771 0.42573742]]
Initial Weights (Hidden -> Output):
[0.84321805 0.78660935]
Final Weights (Input -> Hidden):
[[0.64237599 0.81597308]
[0.43645771 0.52573742]]
Final Weights (Hidden -> Output):
[0.94321805 0.88660935]
-----------------------------------------------------------
Training for Truth Table 13: (1, 1, 0, 0)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 1, Output: 0
Input: [0 1], Target: 1, Output: 0
Input: [1 0], Target: 0, Output: 0
Input: [1 1], Target: 0, Output: 0
Initial Weights (Input -> Hidden):
[[0.88628634 0.32485996]
[0.06377701 0.54976519]]
Initial Weights (Hidden -> Output):
[0.36397368 0.50184017]
Final Weights (Input -> Hidden):
[[ 0.78628634 0.22485996]
[-0.03622299 0.44976519]]
Final Weights (Hidden -> Output):
[0.26397368 0.40184017]
-----------------------------------------------------------
Training for Truth Table 14: (1, 1, 0, 1)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 1, Output: 0
Input: [0 1], Target: 1, Output: 0
Input: [1 0], Target: 0, Output: 0
Input: [1 1], Target: 1, Output: 0
Initial Weights (Input -> Hidden):
[[0.4428625 0.15583271]
[0.25532406 0.67217989]]
Initial Weights (Hidden -> Output):
[0.19247774 0.03735062]
Final Weights (Input -> Hidden):
[[0.4428625 0.35583271]
[0.25532406 1.27217989]]
Final Weights (Hidden -> Output):
[0.19247774 0.63735062]
-----------------------------------------------------------
Training for Truth Table 15: (1, 1, 1, 0)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 1, Output: 0
Input: [0 1], Target: 1, Output: 1
Input: [1 0], Target: 1, Output: 1
Input: [1 1], Target: 0, Output: 0
Initial Weights (Input -> Hidden):
[[0.10547552 0.97784461]
[0.21363979 0.86768973]]
Initial Weights (Hidden -> Output):
[0.01397043 0.91203758]
Final Weights (Input -> Hidden):
[[0.10547552 0.97784461]
[0.21363979 0.86768973]]
Final Weights (Hidden -> Output):
[0.01397043 0.91203758]
-----------------------------------------------------------
Training for Truth Table 16: (1, 1, 1, 1)
The network failed to learn the truth table after 1000 iterations.
Testing the trained network:
Input: [0 0], Target: 1, Output: 0
Input: [0 1], Target: 1, Output: 1
Input: [1 0], Target: 1, Output: 0
Input: [1 1], Target: 1, Output: 0
Initial Weights (Input -> Hidden):
[[0.18041178 0.32327852]
[0.32236654 0.88078795]]
Initial Weights (Hidden -> Output):
[0.70491173 0.72469569]
Final Weights (Input -> Hidden):
[[0.18041178 0.32327852]
[0.32236654 0.98078795]]
Final Weights (Hidden -> Output):
[0.70491173 0.82469569]
-----------------------------------------------------------