include usage advice about probabilistic predicates

This commit is contained in:
Markus Triska
2020-04-27 17:32:06 +02:00
parent f8717359d7
commit 7a2981e21c

View File

@@ -1,5 +1,11 @@
:- module(random, [maybe/0, random/1, random_integer/3, set_random/1]). :- module(random, [maybe/0, random/1, random_integer/3, set_random/1]).
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
To retain desirable declarative properties, predicates that internally
use random numbers should be equipped with an argument that specifies
the random seed. This makes everything completely reproducible.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
% succeeds with probability 0.5. % succeeds with probability 0.5.
maybe :- '$maybe'. maybe :- '$maybe'.