Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!ucsd!ucbvax!hplabs!hpcc01!hpbbn!hpbbi4!stefan From: stefan@hpbbi4.BBN.HP.COM (#Stefan Bachert) Newsgroups: comp.lang.prolog Subject: Re: Having trouble with disjunction Message-ID: <470016@hpbbi4.BBN.HP.COM> Date: 15 Aug 90 14:03:44 GMT References: <90226.091749F0O@psuvm.psu.edu> Organization: Hewlett-Packard GmbH Lines: 20 / hpbbi4:comp.lang.prolog / F0O@psuvm.psu.edu / 3:17 pm Aug 14, 1990 / Watch the precedence. I added brackets to show you what you told your prolog. gofirst(Player) :- ( random(RandNum), RandNum < 0.5, Player = computer ); ( RandNum >= 0.5, Player = opponent). I think you intended the following gofirst(Player) :- random(RandNum), (RandNum < 0.5, Player = computer ; RandNum >= 0.5, Player = opponent). Stefan