Replies: 1 comment 4 replies
-
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, I've been going through the examples one by one in the repo to try and wrap my head around the concepts. I had an idea for a simple model and thought implementing it might help me understand things better. And...it ended up being more complicated than I expected 😬 The idea was to take a basic random walk, but have it pick a random color on each step.
My first try was:
This does nothing whatsoever. Presumably it just rewrites BB with BB on every step, so the output never changes. What I really need is the wildcard to include every color except for black.
One of the examples had a "Union" element, which seemed to fit this use case:
But this throws an error:
Rainbow > output code ? at line 3 is not found in codes ERROR
. It looks like the unions are only supported on the left side of rules.I decided then that I would try enumerating all the colors into separate rules, and stumbled into something much more interesting than my original plan:
Since each color can only build off of one other color, it ends up with a cyclical pattern that is reminiscent of tie-dye shirts.
I think I could get closer to my original goal by enumerating every possible color swap, e.g. RB can turn into BR, BO, BY and so on. But I have to think there's a better way. Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions