Gradual feature learning

I’ve doing some simple experiments with gradual feature learning neural nets:
The code is in FreeBasic + threads. I guess it is not so easy to read. However the way it is written you can almost verbatim translate it into C (if you like, if you want to, I would expect zero people to do that!)