From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a10fc2d4d530dd05 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder.erje.net!news2.arglkargh.de!news.tornevall.net!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Random number generation Date: Tue, 13 Jul 2010 16:02:49 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: NNTP-Posting-Host: 3f8fddafae58e59c76416f64abe3bdcc Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: 10a858dad4f79d874452b371e7e900e4 X-Complaints-To: abuse@tornevall.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100527 Thunderbird/3.0.5 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: X-UserIDNumber: 1738 X-Validate-Post: http://news.tornevall.net/validate.php?trace=10a858dad4f79d874452b371e7e900e4 X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: g2news1.google.com comp.lang.ada:12404 Date: 2010-07-13T16:02:49-07:00 List-Id: On 07/13/2010 01:33 PM, John B. Matthews wrote: > > The shuffling algorithm needs work; this might be an alternative: > > The problem with this (for Ada) is the need to instantiate Discrete_Random for a different range each time (although you could use PragmARC.Universal_Random.Random_Int). If it's for a game with a human, then the biased version of using the full range each time is good enough > As an aside, Mine Detector V6.0 builds on Mac OS X 10.5.8 with GtkAda > 2.14.1 and GNAT 4.3.4. Wait, I took a picture: > > Cool. I wouldn't check any boxes with only 100 mines. -- Jeff Carter "When Roman engineers built a bridge, they had to stand under it while the first legion marched across. If programmers today worked under similar ground rules, they might well find themselves getting much more interested in Ada!" Robert Dewar 62