From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/94284 Path: news.gmane.org!not-for-mail From: Norbert Melzer Newsgroups: gmane.comp.tex.context Subject: Re: Consistent random number generation Date: Wed, 06 Apr 2016 11:24:53 +0000 Message-ID: References: <20160405190116.770d86ce@cea.fr> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6269815374077474945==" X-Trace: ger.gmane.org 1459941979 3818 80.91.229.3 (6 Apr 2016 11:26:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Apr 2016 11:26:19 +0000 (UTC) To: mailing list for ConTeXt users , Aditya Mahajan Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 06 13:26:08 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1anlb5-00006Y-Pg for gctc-ntg-context-518@m.gmane.org; Wed, 06 Apr 2016 13:26:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id F0BAF9EFE; Wed, 6 Apr 2016 13:25:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aBz4ljh5mJNO; Wed, 6 Apr 2016 13:25:19 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 5FB989F0B; Wed, 6 Apr 2016 13:25:19 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 993A19EFF for ; Wed, 6 Apr 2016 13:25:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6-lUNbfcG7Py for ; Wed, 6 Apr 2016 13:25:14 +0200 (CEST) Original-Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id C5F559EFE for ; Wed, 6 Apr 2016 13:25:04 +0200 (CEST) Original-Received: by mail-wm0-f50.google.com with SMTP id u206so41011477wme.1 for ; Wed, 06 Apr 2016 04:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ifqENJWCPNdr8diEh4TNDFOhsGwuuxby4yKMGSGQZiw=; b=jzRyMRC7h5C7HybKXreV4tOJnXSpDCKpXn4cZPZQciD2tVAzfy3+v9taTIz0+Ar0vS Nv/gpo0HTcf+ixmnA92wDrzycTICHC54v3SmnW56j7PyOqdgqXK8Hut1KheX2YB9cPPR rsyTbRIJ9XPOGJgxzUlZiTIdbdiCq3C4exyRNrMUi2ByYp1yJ3zvWs9GRT0jKUv6iuBh 4At+YRISp9P0DKKWskbT0x2uBN5fz4mD7bn69GRVIOQBjJfsckLtWcdHt354Q61ZEk42 KB688lWA+NDx5qzizOkzCTPD+v97fWR5un7bi+hcGuP30HN+DItxsDPolcAPzcuFD+UK ToZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ifqENJWCPNdr8diEh4TNDFOhsGwuuxby4yKMGSGQZiw=; b=Fbfu1SJv0UVpnjHXKXSsh05Oc9NMZZbmX5/XwmuhpWVKyUCCC3Ro/AUWWbeNAPaOtL uoF+6IsNS0A19DUtZfkogIyQrQYZzPsdNtTqqqt7Tvwb1PqrC6QcDfekePCLSkvjI8Zg UJwtY9abnrC0wTuT6TlQ2hEKctQqb+9eRd2PWN75qaHbh2cMM8bJHKfrEBvd7vbey2cu 1Nc4GQJHdBWXOJLdZpWO45VmkXC/Rs6GEW6Fj/oIuUkdWj5Vm4B/8d0lFDAjsViZDo3J J4QlPn1iSxgBRdaGFHjr7usTEttH/J2DXe05yhDbg3uTezQOSBeE/aR+DT806vk+WObg 5oWA== X-Gm-Message-State: AD7BkJKzutI5dachb3T6Uux8eEVSko22l+xg5Z6VfIjlMNnv9DNsbs9KzVw0/o+iXmzGd/YmFkP0cVzq7EnLUA== X-Received: by 10.28.217.82 with SMTP id q79mr23502933wmg.29.1459941902927; Wed, 06 Apr 2016 04:25:02 -0700 (PDT) In-Reply-To: <20160405190116.770d86ce@cea.fr> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:94284 Archived-At: --===============6269815374077474945== Content-Type: multipart/alternative; boundary=001a11467ce0847fc5052fcf36eb --001a11467ce0847fc5052fcf36eb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable In programming usually a (non-crypto-safe) RNG returns the same sequence everytime it is started with the same seed. Therefore, you often seed with the current time if you do not want to have reproducable sequences and use a specific seed when you want reproducable results across certain runs. There are meany causes to want to have this deterministic =E2=80=9Crandomne= s=E2=80=9D: * As mentioned in this thread: reproducable results across different systems, OSs and architectures * Certain kinds of games do transfer/save a base seed instead of the randomly generated level to save bandwith/diskspace There are more examples, but in the end, they all rely on reproducing the sequence over multiple architectures to recreate something exactly the same way it was before. Alan BRASLAU schrieb am Mi., 6. Apr. 2016 um 03:01 Uhr: > On Tue, 5 Apr 2016 17:43:53 -0400 > Aditya Mahajan wrote: > > > Is it possible to generate consistent random numbers across multiple > > operating systems. > > Then they are not random! > > Why not save your chosen "random" paths to files? > > Alan > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ --001a11467ce0847fc5052fcf36eb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
In programming usually a (non-crypto-safe) RNG returns the= same sequence everytime it is started with the same seed. Therefore, you o= ften seed with the current time if you do not want to have reproducable seq= uences and use a specific seed when you want reproducable results across ce= rtain runs.

There are meany causes to want to have this = deterministic =E2=80=9Crandomnes=E2=80=9D:

* As me= ntioned in this thread: reproducable results across different systems, OSs = and architectures
* Certain kinds of games do transfer/save a bas= e seed instead of the randomly generated level to save bandwith/diskspace

There are more examples, but in the end, they all r= ely on reproducing the sequence over multiple architectures to recreate som= ething exactly the same way it was before.



Alan BRASLAU <<= a href=3D"mailto:alan.braslau@cea.fr">alan.braslau@cea.fr> schrieb a= m Mi., 6. Apr. 2016 um 03:01=C2=A0Uhr:
On Tue, 5 Apr 2016 17:43:53 -0400
Aditya Mahajan <a= dityam@umich.edu> wrote:

> Is it possible to generate consistent random numbers across multiple > operating systems.

Then they are not random!

Why not save your chosen "random" paths to files?

Alan
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/con= textrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--001a11467ce0847fc5052fcf36eb-- --===============6269815374077474945== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============6269815374077474945==--