🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #1088

Disjunction solution

#1088
From: F0O
Date: Thu, 16 Aug 1990 14:44
22 lines
1288 bytes
     I'd first like to say thanks to all that replied to my question.

     My solution to the disjunction problem was like Theo Norvell's.
     He had:

            gofirst(Player) :-
                random(RandNum), gofirst_aux(Player,RandNum).

            gofirst_aux(Player,RandNum) :-
                RandNum < 0.5, Player = computer ;
                RandNum >= 0.5, Player = opponent.

     I tried using parenthesis to get around having to write the above
clauses, and found PDC prolog will not allow you to put parenthesis around
clauses.  You can put them around arithmetic expressions though. I couldn't
believe they wouldn't allow you to do that!
     PDC has a Compuserve address, where you can log suggestions and
questions.  I will definitely ask them to put this feature in their next
version.  I hope they listen...

                                                     [Tim]
Technical Details
Message-ID: <90228.104418F0O@psuvm.psu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!psuvax1!psuvm!f0o
References: <90226.091749F0O@psuvm.psu.edu> <470016@hpbbi4.BBN.HP.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!psuvax1!psuvm!f0o
From: F0O@psuvm.psu.edu
Newsgroups: comp.lang.prolog
Subject: Disjunction solution
Message-ID: <90228.104418F0O@psuvm.psu.edu>
Date: 16 Aug 90 14:44:18 GMT
References: <90226.091749F0O@psuvm.psu.edu> <470016@hpbbi4.BBN.HP.COM>
Organization: Penn State University
Lines: 22