Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more algorithms for CHAOS #1

Merged
merged 2 commits into from Oct 26, 2017
Merged

add more algorithms for CHAOS #1

merged 2 commits into from Oct 26, 2017

Conversation

@catfact
Copy link

@catfact catfact commented Oct 26, 2017

you can merge this if you want, but haven't really done serious testing of the numerical output.

(that said, the algos themselves are simple and i've used them many times - output looks 'pretty close' so i wouldn't suspect anything is too far off.)

multiple algorithms to the CHAOS operator
as discussed on lines https://llllllll.co/t/teletype-chaos/9785/35

so far i have only tested in the TT simulator. i would like to do a more thorough check that numerical behavior is basically as expected.

i took the liberty of arbitrarily scaling the parameter input to [0, 10000], since this will have different meanings for different algos. state/output is still in [-10000, 10000]; some algos may have only unipolar output depending on input.

celullar automata algo is a special case, since the state and parameters are both relatively small integers by nature. they are left unscaled.

TODO

  • maybe add an LCG mode, and whatever else seems interesting.
  • cellular automata output scaling is kind of weird: states are stored as bitfields in a uint8; it should really return the sum of bits, not the value itself.
  • i am also not sure that the 'neighbor code' interpretation first the de facto standard defined by Wolfram. so e.g. 'rule 110' might not give what you expect.

chaos_scale_values should be called on operator init (i'm not sure where that happens) and whenever the algorithm is changed.

@burnsauce
Copy link
Owner

@burnsauce burnsauce commented Oct 26, 2017

This code looks great!

I look forward to merging it as my first pull request!

@catfact
Copy link
Author

@catfact catfact commented Oct 26, 2017

[ed] went ahead and added logic for 1d binary cell-aut. output looks reasonable, though it's a sort of weird and arbitrary interpretation: the cell states are bits in an 8b value; might be better to just return the sum of bits.

Copy link
Owner

@burnsauce burnsauce left a comment

Code looks good and runs fine. I'll start the work on CHAOS.ALG to integrate all this great new code!

@burnsauce burnsauce merged commit 10141f6 into burnsauce:chaos Oct 26, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants