Newsgroups: comp.ai
Path: cantaloupe.srv.cs.cmu.edu!nntp.club.cc.cmu.edu!godot.cc.duq.edu!hudson.lm.com!newsfeed.pitt.edu!gatech!swrinde!cs.utexas.edu!news.sprintlink.net!EU.net!uknet!newsfeed.ed.ac.uk!dcs.ed.ac.uk!newshost.dcs.ed.ac.uk!mxm
From: Mike Moran <mxm@dcs.ed.ac.uk>
Subject: Re: CLIPS random number generator
In-Reply-To: Will Dwinnell's message of Thu, 2 Mar 95 19:21:59 -0500
Message-ID: <MXM.95Mar3160518@dcs.ed.ac.uk>
Sender: cnews@dcs.ed.ac.uk (UseNet News Admin)
Organization: Department of Computer Science, Edinburgh University
References: <3j4v92$c5n@newstand.syr.edu> <BE141q-.predictor@delphi.com>
Date: Fri, 3 Mar 1995 16:05:18 GMT
Lines: 40




Will Dwinnell writes:
In article <BE141q-.predictor@delphi.com> Will Dwinnell <predictor@delphi.com> writes:


predictor> Slug <jayhui@hydra.syr.edu> writes:
>> Could somebody kindly tell me what I'm doing wrong.. it's gotta be
>> something dumb on my part, but I can't seem to find out why...
 
 
predictor> I don't know CLIPS, but this...
 
 
>> (dice (+ 1 (mod (random) 5)) (+ 1 (mod (random) 5)))) ...)
 
predictor> looks like you might be mixing integer (mod) and decimal (random)
predictor> representations.  What sort of numbers are supposed to come off of
predictor> random?  Often, languages give a random function which delivers
predictor> decimal values between 0.0 and 1.0.  Your system may be truncating or
predictor> the "random" to the integer 0.  Just a thought...
 
predictor> Will Dwinnell
predictor> predictor@delphi.com
predictor> 610-917-0594
predictor> Commercial Intelligence Inc.

	I've just started using CLIPS locally, and, from what i can remember,
if CLIPS (the C-code which runs CLIPS, not user CLIPS programs) is
compiled with (or without, i can't remember) a certain command line
switch, then (random) will always return zero. It's mentioned
*somewhere* in the manual (i don't know; as it was a friend who had
this same problem, not me), so maybe you should recompile (or ask
somebody else to) CLIPS?

				Thanks,

					Mike

