ales-tsurko / athenaCL

An unofficial fork of athenaCL algorithmic composition system
https://athenacl.alestsurko.by
GNU General Public License v2.0
15 stars 3 forks source link

global seed for AthenaCL #3

Closed tjingboem closed 3 years ago

tjingboem commented 3 years ago

i would like to make a feature request for a command for a global seed in AthenaCL. I don't know how much work it might be.

As it is now, on every run all random generated values depend on system time. It is virtually impossible to keep the generated score as it presents itself, as each time the generated result is a bit different. Using the same parameters, sometimes the result is great, the next time it is okay-ish...

Being able to set a global seed (so 1 seed value for all randomness in AthenaCL) would definitely help to control and 'freeze' the random values so the same texture can be repeated exactly.

tjingboem commented 3 years ago

i am not a programmer, but i tried to get a seed into Athena- did not succeed.

The only place where i think random numbers are generated is athenaCL/athenaCL/libATH/omde/rand.py

I tried to set a seed value in line 54, like: random.seed(3)

but then AthenaCL does not work any more

tjingboem commented 3 years ago

some progress has been made, i now have the seed in all of the Random modules but the RandomGauss module. Also a seed exists in the Temperament NoiseLight, NoiseMedium and NoiseHeavy. Also i added NoiseUser, where user should set the amount of random. The RandomChoice, RandomWalk and the RandomPermutate in the Selectionstring now have a seed.

All seeds are at the moment fixed values; i don't know yet how to program it so that the seed option becomes available to the user. I am thinking about a Global Seed, one value for all AthenaCL. But perhaps it could be part of the Texture and could be edit with TIe? That would mean a seed for every Texture...

Anyway, this is prove that it is possible.

to be continued...

ales-tsurko commented 3 years ago

I close it due to #6 Thanks!