Every day, your brain completes millions of complicated functions without you even being aware of them, and it learns as it goes.
Teaching a machine to do the same thing is extremely complicated, but it has gotten a little easier thanks to the work of University of California, Merced, Professor...