Problem statement:
Unfortunately, your time has come. You have just passed away, and you find yourself standing face to face with God. Since you were a decent person in your life, God decides to give you a choice. He presents you with two options.
Option 1: Your consciousness is destroyed forever. You won't be able to sense anything. You simply do not exist anymore.
Option 2: You roll a fair $$$1\,000$$$-sided die. On $$$999$$$ of the sides, the word heaven is written. On the remaining side, the word hell is written. If the die lands on heaven, you experience eternal bliss and euphoria. If the die lands on hell, you experience eternal torment.
Which option do you choose?
Option 2 because I get a 1/1000 probability to live the way I do forever..
Be careful. You were once a spirit blessed with the opportunity to try life out for a short while. Make the most out of your gift.
Run Dijkstra's on the graph of options in such a way that the destination is heaven.
Complexity is : $$$\mathcal{O}(V^2)$$$ , since $$$V$$$ is small enough
that way you've more chance to heaven
Maybe, the eternal bliss and euphoria is equal to the eternal torment, I thought.