recently I saw a friend, who codes in C++, play around with a software that has the ability to learn. I asked him what it and he said something very uncllear about neural networks. When I got home I researched about neural networks, and found out a lot about them. I took it as a chanlenge and decided to write my own version for Computercraft.
I have been writing it for around two days and also used the possibility to enhance my OOP skills. The code can be found at the NeuralNet GitHub repositiory or you can donload it from pastebin:
pastebin get GHHCma5U NeuralNet
At some point, the program will ask you to chose between a file input and typed input. Please don't choose the file input option since I was not able to upload the training file to pastebin due to heavy load. However if you insist on getting it, you can find it here. Paste it in your computer under this directory: "NeuralNet/Training Files/XOR".
User input structure:
1st: It's in binary.
2nd: A user input for 2 input nodes would look like this : 101(XOR) function where the first two digits are the actual input and the last one the expected result. So the rule is: a number of 1 and 0 corresponding to the number of input notes + a number of 1 and 0 corresponding to the output nodes and giving the expected result.
I hope you enjoy it.
Give me feedback, or else how will I be able to improve it!
~Creator
PS: Training from the file can be extremely long. If you are ready to wait around 5 mins (on my PC from 2009) you are free to do it.
There are no screenshots since it is a command line script. It returns some debugging values as well as the rael output.