Path: utzoo!utgpu!attcan!uunet!mcvax!ukc!etive!lfcs!jha From: jha@lfcs.ed.ac.uk (Jamie Andrews) Newsgroups: comp.lang.prolog Subject: Re: Probabilistic 'or'? Message-ID: <628@etive.ed.ac.uk> Date: 8 Aug 88 15:49:50 GMT References: <613@etive.ed.ac.uk> <257@quintus.UUCP> Sender: news@etive.ed.ac.uk Reply-To: jha@lfcs.ed.ac.uk (Jamie Andrews) Organization: Laboratory for the Foundations of Computer Science, Edinburgh U Lines: 42 I liked Richard's idea of rand_pred(...) :- random_permutation([1,2,3,4,5,6,7], perm), mem(clause_no, perm), rand_pred(clause_no, ...). rand_pred(1, ...) :- ... ... rand_pred(7, ...) :- ... ...but I still think this is a little messy, and not as natural as having random clause selection. Besides, random_permutation either generates 7! calls to every clause (if it returns all permutations on backtrack) or else it adds some more incompleteness to the system (if it returns only one). In article <257@quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: >Um, "a random instance" doesn't mean a lot. What DISTRIBUTION do you >want? Are mazes with 500,000 cells to be as likely as ones with 5? This is essentially what I meant by wanting a weighting on the probability of picking a clause. >Having thought about it a bit, I believe that it would raise far worse >logical problems to try to build randomness into the language; pseudo-random >number generators can after all be specified with pure predicates--they're >just ordinary arithmetic functions. What I meant was: we get the system to select clauses randomly (but without repeating the selection of a clause), instead of always selecting them in sequence. This does not affect the soundness of the system. Also, we would still have the same degree of incompleteness, in the sense that if the system happens to pick a clause which leads to an infinite loop, it's sunk, just as if the first clause happens to lead to an infinite loop. --Jamie. jha@lfcs.ed.ac.uk "I want the answers quickly, but I don't have no energy"