Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cschubiner/452e4cea2ab55844c77b635a73495ad0 to your computer and use it in GitHub Desktop.
Save cschubiner/452e4cea2ab55844c77b635a73495ad0 to your computer and use it in GitHub Desktop.
VictorTaelin prompt challenge
Here is a system with 4 tokens: `A#`, `%A`, `B#` and `%B`.
One program to solve with this system is the following sequence of tokens:
B# A# B# %A B#
To *compute* a program, we must rewrite neighbor tokens, using the rules:
A# %A ... becomes ... nothing
A# %B ... becomes ... %B A#
B# %A ... becomes ... %A B#
B# %B ... becomes ... nothing
A# B# is NOT a valid rule (valid rules have both % and # signs)
In other words, whenever two neighbor tokens have `#` adjacent to %, then they must be rewritten according to the corresponding rule.
For example, the
first example shown here is computed as:
B# A# %B %A B# -> B# %B A# %A B# -> A# %A B# -> B#
The steps were:
1. We replaced `A# %B` with `%B A#`.
2. We replaced `B# %B` with nothing.
3. We replaced `A# %A` with nothing.
The final result was just `B#`.
Now, consider the following program:
A# B# B# %A B# %A %B
Before each step, brainstorm 2 different (valid!) options for what would looks like a better future path for max-condensing down the sequence -- and then immediately after the step, double check if you followed the rule exactly by looking at whether the # signs are directly adjacent a % sign or not. If you didn't, then retry
Here's the format to process each step:
a) <proposed replacement rule 1>: <condensement score out of 10>. <is rule valid check>
b) <proposed replacement rule 2>: <condensement score out of 10>. <is rule valid check>
c) <logic for choosing a vs b>
d) <result after applying the favorite of a vs b)
e) <a simple Yes/No on whether there are any more rules that could be applied>
Try to flip around symbols so that # and % can be adjacent with the same letter! For example, B# A# %B should be flipped to B# %B A# so that we can then cancel out the B# %B! Give higher condensement scores to moves that make such flips
Finally, submit your FINAL ANSWER by replacing all % signs with # signs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment