Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!emory!hubcap!grimlok From: grimlok@hubcap.clemson.edu (Mike Percy) Newsgroups: comp.theory Subject: Re: Help! Message-ID: <11822@hubcap.clemson.edu> Date: 25 Nov 90 22:32:00 GMT References: <11801@hubcap.clemson.edu> <11185@pt.cs.cmu.edu> Organization: Clemson University, Clemson, SC Lines: 30 Thanks for the help everyone. I suppose I should have just kept with my real problem. In my simulation, I want to select a random move. My move generator is a deterministic search for legal moves, but there is no way of telling how many legal moves there are until we've seen them all. I don't want to store them up, nor do I want to run through the search more than once. In essence: Start search. If current move better than previous best, keep this move. If current move equal in value to the previous best, randomly keep one of the two moves. When search is over, I want to have a random move selected from the best moves. Simply keeping first, last, or ith is no good as it tends to direct the search, missing paths that might lead to better solutions. A couple of people suggested 1/i, which is what I thought of originally, but dismissed (idiot) as being to easy, and my induction proof kept going wacky -- must have been at it too long. Thanks to all who offered help. "I don't know about your brain, but mine is really...bossy." Mike Percy grimlok@hubcap.clemson.edu ISD, Clemson University mspercy@clemson.BITNET (803)656-3780 mspercy@clemson.clemson.edu