Added basic neural networking code.

This is still buggy and doesn't really work. But it's a start. I'll
keep at it for a while.