I've recently came by a book called In Gods We Trust: The Evolutionary Landscapes of Religion by Scott Atran. What's interesting about this book is the choice of the metaphor for thinking about the evolution of religion in particular and culture in general, as a mountain-valley landscape formed by different mountain ridges.each mountain ridge in this landscape has distinct contour, with various peaks whose heights reflects time. one ridge encompasses emotional faculties, another includes social interactions.
Human experience that exists anywhere along this evolutionary landscape converges on more or less the same life paths. as humans randomly interact and walk through this evolutionary landscape, they naturally tend to converge toward certain cultural paths. all cultural paths include religious paths as well.
This analogy is similar to the concept of Fitness Landscape. A fitness landscape is a way of visualizing a problem in optimization or adaptation. There are peaks and valleys, peaks are solutions and the highest peak is the best solution. How to get there? The movement of adaptation can be seen as always moving uphill, since at any time a more adapted condition is preferable to a less adapted one. Depending on the features of the landscape, a particular fitness walk may lead to local optima from which there are no paths leading higher.
More on the concept of "fitness" and "fitness landscape" in this post