summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-07-17 17:34:25 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-07-18 01:05:58 -0700
commit209b11f99c801141b79802cd6c23a2b568286f75 (patch)
treeb8d03651c118bdbdcceb3ca1deca4696952d8afe /README
parentb699465ca96070557feb9e69b898ddb0d4dca2dc (diff)
til_args: add --seed= explicit PRNG seeding support
This enables reproducible yet pseudo-randomized visuals, at least for the fully procedural modules. The modules that are more simulation-y like sparkler and swarm will still have runtime variations since they are dependent on how much the simulation can run and there's been a lot of sloppiness surrounding delta-t correctness and such. But still, in a general sense, you'll find more or less similar results even when doing randomized things like module=rtv,channels=compose using the same seed value. For the moment it only accepts a hexadecimal value, the leading 0x is optional. e.g. these are all valid: --seed=0xdeadbeef --seed=0xdEAdBeFf --seed=0x (produces 0) --seed=0xff --seed=deadbeef --seed=ff --seed= (produces 0) --seed=0 (produces 0) when you exceed the natural word size of an unsigned int on your host architecture, an overflow error will be returned. there are remaining issues to be fixed surrounding PRNG reproducibility, in that things like til_module_randomize_setup() doesn't currently accept a seed value. However it doesn't even use rand_r() currently, but when it invokes desc->random() the module's random() implementation should be able to use rand_r() and needs to be fed the seed. So that all still needs wiring up to propagate the root seed down everywhere it may be relevant.
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions
© All Rights Reserved