1. provide 4 classes, each doing a simple operation, like adding 2 floats, dividing 2 floats etc. 2. now give the nn 3 floats as input, the first 2 numbers are the 2 floats that should be processed by the nn, and the third number defines which operstion should be done. in my case, 0 means to add the first 2 floats, 1 means to calculate the difference etc. 3. repeat step 2 a lot of times and rate the output. 4. let the nn evolve by calling evolve(); 5. repeat steps 2-4 a lot of times 6. watch the output being wrong at the beginning and getting more and more accurate 7. be happy if it works. |
# provide 4 classes, each doing a simple operation, like adding 2 floats, dividing 2 floats etc. # now give the nn 3 floats as input, the first 2 numbers are the 2 floats that should be processed by the nn, and the third number defines which operstion should be done. in my case, 0 means to add the first 2 floats, 1 means to calculate the difference etc. # repeat step 2 a lot of times and rate the output. # let the nn evolve by calling evolve(); # repeat steps 2-4 a lot of times # watch the output being wrong at the beginning and getting more and more accurate # be happy if it works. |
the test is :