🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #3545

Probabilistic 'or'?

#3545
From: Jamie Andrews
Date: Thu, 04 Aug 1988 10:32
25 lines
1551 bytes
     Does anyone know of a Prolog or other LP system with a
probabilistic 'or' or probabilistic clause selection?  What I mean by
this is a clause selection rule or disjunct selection rule which
randomly selects which branch to follow and which to put in the
backtrack stack.  A weighting on the branches would be useful, too.

     I guess I'm mainly interested in this for game program purposes.
The only thing it would accomplish is a random permutation of the
solutions to a query, but this would be very useful for (say) a maze
generation program; there may be thousands of possible mazes, but
you might just want some random one out of those, without having to
generate all of them.  With the probablistic 'or', you could just
specify what something has to be to be a maze, and let the system
give you a random instance.

     I guess it would be easy enough to write a predicate with
clause/1 and some system random call, but this would make the code
more messy, and (if we care about such things today) would raise
logical problems.

thanks
--Jamie.
  jha@lfcs.ed.ac.uk
"I wanted to be with you alone, and talk about the weather"
Technical Details
Message-ID: <613@etive.ed.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!mcvax!ukc!etive!lfcs!jha

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!mcvax!ukc!etive!lfcs!jha
From: jha@lfcs.ed.ac.uk (Jamie Andrews)
Newsgroups: comp.lang.prolog
Subject: Probabilistic 'or'?
Message-ID: <613@etive.ed.ac.uk>
Date: 4 Aug 88 10:32:07 GMT
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: 25