Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!dsinc!spool.mu.edu!howland.reston.ans.net!swrinde!cs.utexas.edu!usc!math.ohio-state.edu!uwm.edu!rutgers!utcsri!cdf.toronto.edu!eddie!g5kalam
From: Ka Lam <g5kalam@cdf.toronto.edu>
Subject: cprolog, random()?
X-Nntp-Posting-Host: eddie
Content-Type: TEXT/PLAIN; charset=US-ASCII
Message-ID: <Pine.GSO.3.95.960726102106.6330H-100000@eddie>
Sender: g5kalam@eddie
Organization: University of Toronto Computing Disciplines Facility
Mime-Version: 1.0
Date: Fri, 26 Jul 1996 14:24:43 GMT
Lines: 20

Hi,

	I am using cprolog on solaris 2.5.  I suppose to write a little
chess playing program in prolog which use some very stupid way to "think"
of the next move.  Sometimes, the stupid way "think" of 2 or 3 moves which
has the same "score", in prolog, it always pick the first one appear.  I
am wondering, are there any random() like stuff in cprolog for me to add a
little variation to the way the move is picked if given 2 or 3 moves has
the same "score".?

	In other words, I need a little random rules which give me a
random number (preferablely a real number between 0 to 1).

--
University of Toronto                  g5kalam@cdf.utoronto.ca
Software Engineering                   ae197@freenet.toronto.on.ca
Ka Lam                      Home Page: http://cdf.utoronto.ca/~g5kalam
   Administrator of Methodist (H.K.) Primary & College Mailing-List
    Vice President of UoT Computer Science Student Union, 1996/97

