When a colleague of mine stated that "emotions are life's simulated annealing" I found that idea very interesting. In order to explain why let me describe briefly the optimization algorithm known as "simulated annealing".
In many computer applications the essential calculation is minimization of a function, that is, finding the lowest point on a graph like this:
When trying to minimize a function the most rational thing seems to be go downhill from a random point until reaching the bottom. The problem with this approach is that you are likely to reach a local minimum, not the global one. The solution would seem optimal, but it's not likely to be optimal.
In order to avoid getting stuck in a local minimum a "simulated annealing" algorithm was developed that combines the rational downhill descent with irrational jumps away from the apparently optimal solution. The black arrows in the image below represent rational moves downhill, and the red arrow represent an irrational jump uphill:
It turns out that one often gets the best result by starting out with relatively frequent irrational jumps and then slowly reduces the frequency of irrational jumps in favor of rational descent. Start from chaos alternating with reason, then slowly reduce chaos and increase reason, and that would lead you to a better result than reason alone.
What my colleague probably meant is that human behavior seems to be akin to simulated annealing, that our emotions are akin to the irrational jumps away from the goal, and that these irrationalities somehow enhance our ability to reach the optimal goal. And just as in simulated annealing, we start in life by applying irrational emotions more frequently than rational thought, but as we grow up we slowly reduce irrational behavior and start applying reason more frequently.
Thus a couple of questions:
1) Does the above analogy have a merit?
2) Assuming the affirmative answer to the above, is that possible that human emotions have developed alongside with reason as an aid for reaching globally optimal results?