# Life like a count

I propose to discuss a philosophical topic. What if we imagine our life as measured directed acyclic graph? The visualization of the graph is shown in the figure:

R – birth and growing up to the age when the first conscious choice is possible. At this stage, there is a certain starting balance of happiness, which is determined by genetics and environmental conditions.

t – the period of life or the stage when the choice occurs (second, minutes, hour, day, etc.). The number of stages is M.

SW – a situation of conscious choice. From each SW leaves at least two edges (if there are fewer edges, then there is no choice). Each transition edge has a negative or positive estimate for the amount of happiness we get in the transition. Quantity SW may vary at each stageX1, X2,… XM).

WITH – death or a state when a conscious choice is no longer possible and will not be possible. Here the balance of happiness is reset to zero. Go to WITH possible from any SW or even R, although these edges are not drawn.

If all stages of life were known in advance (but this is not so), then it would be possible to calculate the path that provides maximum happiness using the algorithm Bellman-Ford. Of course, provided that the number of vertices and edges of the graph does not tend to infinity, then it is obvious that the time for determining such a path using this algorithm will be infinitely large. In reality, we still choose from some finite number of options that are most optimal for us at each of the life stages.

Because we do not know in advance all stages of life and their estimates, we can use greedy strategy (we choose where we get more happiness or lose less). At the same time, we certainly do not know the price of the transition, but we predict it from our current state (edge), because we will be able to accurately determine the price of the transition when we have already made a choice (we ended up at the next vertex). Those. at the time of the decision, we have a list of all options for the current choice (next edges) and a prediction what it will give us. The actual decrease or increase in happiness may not coincide with the forecast. Provided that the forecast is correct, the greedy strategy can guarantee more happiness at the current stage than any other. But at the next stage, this may turn out to be the worst choice. will cut off the path to the states from which it is possible to achieve even more happiness. This is a shortcoming of the greedy strategy, but any other strategy that tries to take into account several next stages will be more risky (because the forecast several stages ahead is less reliable than one stage).

I suppose that such a graph model can describe the life of any person. Of course, if you reject determinism. What do you think?