Giter Site home page Giter Site logo

high resolution clock for seed about bamm HOT 2 CLOSED

drabosky avatar drabosky commented on September 6, 2024
high resolution clock for seed

from bamm.

Comments (2)

redcurry avatar redcurry commented on September 6, 2024

When doing batch simulations, I set the seed to $RANDOM, which in bash produces a different random number every time it is called. So even if 1,000 simulations all start at the same time, they will have different random seeds. It's not a perfect solution because $RANDOM produces numbers from 0 to ~65,000, so the probability that you'll have two simulations start with the same seed is not very small. But for most practical purposes, it works.

bamm -c divcontrol.txt --seed $RANDOM

from bamm.

drabosky avatar drabosky commented on September 6, 2024

Ah, I didn't know that. I thought it was just using time(0) in set.seed() giving per-second resolution. I am finishing a BAMM simulator and learned about chronos, which seems useful in this context.

On Dec 4, 2014, at 9:24 AM, Carlos Anderson wrote:

When doing batch simulations, I set the seed to $RANDOM, which in bash produces a different random number every time it is called. So even if 1,000 simulations all start at the same time, they will have different random seeds. It's not a perfect solution because $RANDOM produces numbers from 0 to ~65,000, so the probability that you'll have two simulations start with the same seed is not very small. But for most practical purposes, it works.


Reply to this email directly or view it on GitHub.

from bamm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.