A simple neural network in C to predict the operation of XOR.
  • C 99.4%
  • Shell 0.6%
Find a file
2026-06-13 09:23:32 +10:00
.gitignore Initial commit 2026-06-12 13:55:21 +10:00
build.sh Initial commit 2026-06-12 13:55:21 +10:00
main.c Rename loop indexes 2026-06-13 09:23:32 +10:00
ReadMe.md Initial commit 2026-06-12 13:55:21 +10:00

Neural Network

A simple neural network in C to predict the operation of XOR.

Build

./build.sh

Run

./nn

Output

Example output:

Training completed over 20000 epochs.
Input 1 | Input 2 | Predicted | Expected
----------------------------------------
    0.0 |     0.0 |   0.01306 |      0.0
    1.0 |     0.0 |   0.98851 |      1.0
    0.0 |     1.0 |   0.98903 |      1.0
    1.0 |     1.0 |   0.01168 |      0.0