The physical implementation is quite different, but I believe the processes are functionally equivalent. Coming out of the closet a bit, I believe that much of what we do when we are "thinking" is equivalent to trial and error learning. It's just that humans have the ability to prune their trials by imagining consequenses. Thus some of us are able to avoid running in front of cars without firsthand experience of the consequenses. On a more positive note, we are able to project the outcome of new ideas by imagining the consequenses, and through the projective tools available in math and science.
the source of new ideas, however is just as mysterious as the source of new genes. I personally believe that believe ideas emerge through a process functionally equivalent to evolution.
You might find Calvin, W. H. (1987). The brain as a Darwin machine. interesting.
I'm especially fond of Calvin's throwing theory