Wanted to pass some time on a flight, prepare for an upcoming AI class, and keep my c++ sharp, so I decided to try my hand at implementing a simple XOR gate using a neural network.
Based on @miloharper's fantastic tutorial on Medium.
This project presented some fun challenges with "translation" from Python. I found that working in c++ required a greater understanding of the matrices and mathematics powering the neural net, because of the language's static, explicitly declared types.
Next steps:
- Implement the next post in the series, a tutorial for a layered neural net.
- Refactor my code ..* There are a lot of syntactically similar functions in the "train" member function, so it might be worth it to write a replacement function and pass the original functions in as parameters.