I'm looking for a SF novel that starts as a mystery novel, where some people wonder about why all physical constants are exactly as they are to be able to support life (theory of fine-tuned universe, but I don't think it is called that in the book). Conclusion is the universe was created to support life so that life could create the universe. The human race sends out multiplying robots to scout the universe, and at the end, when the smallest of details is known to these robots, the circumstances finally exist to create the universe exactly as it is to support life, thus creating the big bang from the then vastly expanded universe.
This doesn't quite fit, but could it be The Last Question, by Asimov? https://en.wikipedia.org/wiki/The_Last_Question
Here's the plot:
The story deals with the development of a series of computers called Multivac and their relationships with humanity through the courses of seven historic settings, beginning in 2061. In each of the first six scenes a different character presents the computer with the same question; namely, how the threat to human existence posed by the heat death of the universe can be averted. The question was: "How can the net amount of entropy of the universe be massively decreased?" This is equivalent to asking: "Can the workings of the second law of thermodynamics (used in the story as the increase of the entropy of the universe) be reversed?" Multivac's only response after much "thinking" is: "INSUFFICIENT DATA FOR MEANINGFUL ANSWER."
The story jumps forward in time into later eras of human and scientific development. In each of these eras someone decides to ask the ultimate "last question" regarding the reversal and decrease of entropy. Each time, in each new era, Multivac's descendant is asked this question, and finds itself unable to solve the problem. Each time all it can answer is an (increasingly sophisticated, linguistically): "THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
In the last scene, the god-like descendant of humanity (the unified mental process of over a trillion, trillion, trillion humans that have spread throughout the universe) watches the stars flicker out, one by one, as matter and energy ends, and with it, space and time. Humanity asks AC, Multivac's ultimate descendant, which exists in hyperspace beyond the bounds of gravity or time, the entropy question one last time, before the last of humanity merges with AC and disappears. AC is still unable to answer, but continues to ponder the question even after space and time cease to exist. Eventually AC discovers the answer, but has nobody to report it to; the universe is already dead. It therefore decides to answer by demonstration, since that will also create someone to give the answer to. The story ends with AC's pronouncement,