3 ms·
> Prolog is for indeterministically… One side note here. Yes you can do indeterministic search but it’s not a property in Prolog. In fact, Prolog execution is
by xlii 2y ago
> Prolog is for indeterministically…
One side note here. Yes you can do indeterministic search but it’s not a property in Prolog. In fact, Prolog execution is completely deterministic without use of randomization.
But I guess that in some domains (e.g. optimization) people would rather shuffle numbers than do a boring 1…1000000000 loops.
- bux93 2y agoThe search order is neither indeterministic, nor deterministic; it is undefined. Some implementations do depth-first search, others go random. If your code is logically correct, it doesn't matter in the end - except if you use the cut-operator which essentially says 'don't look any further, just go with the first match', which will behave (in)deterministically based on the implementation.