← Back to context

Comment by saltlyfe

1 day ago

Your first example is not non-deterministic, it's probabilistic. Drawing a sample from a truly random distribution doesn't make the program non-deterministic.

Non-determinism comes from transitions which have no known distribution and might cause your program to take alternate execution paths without any predefined rule. That's clearly not true in your example.

I think you're splitting hairs here. Not sure what definition or context of determinism you are using, but in most scientific fields not only is probability the de-facto example of non-determinism, but in fact the words are often used interchangeably.

By definition, if your outcome is a random draw from a probability distribution (known or unknown), you cannot guarantee the outcome in a deterministic manner; you can only guarantee that in the limit, a large number of random draws will follow that distribution (known or unknown). But that's not what one would typically call determinism.