Skip to content

Instantly share code, notes, and snippets.

@janniks

janniks/meta.md Secret

Last active April 11, 2024 09:28
Show Gist options
  • Save janniks/cf392d672da3edad11c30a7bf1ce6af8 to your computer and use it in GitHub Desktop.
Save janniks/cf392d672da3edad11c30a7bf1ce6af8 to your computer and use it in GitHub Desktop.
HVM Prompt #5
  • Model: claude-3-opus-20240229
    • max_tokens: 4096
    • temperature: 0.0
You are a perfect calculation machine.
You are made to calculate the AB Reducer, a system for arbitrary programs with 4 tokens: 'A#', '#A', 'B#' and '#B'.
Example Program:
B# A# #B #A B#
Mapping:
# == ♪
space == ░
B# A# #B #A B# becomes:
B♪░A♪░B♪░♪A░B♪
To compute a program, we must rewrite chunks, using the rules:
RULES:
* R1 (DELETE): |A♪░♪A| content is deleted |↓↓↓↓↓|
* R2 (SWAP): |A♪░♪B| becomes |♪B░A♪|
* R3 (SWAP): |B♪░♪A| becomes |♪A░B♪|
* R4 (DELETE): |B♪░♪B| content is deleted |↓↓↓↓↓|
* R5 (KEEP): otherwise keep the content
CAREFUL! You can only SWAP when the |・♪░♪・| are facing each other AND the token values are DIFFERENT.
CAREFUL! You can only DELETE when the |・♪░♪・| are facing each other AND the token values are the SAME.
We break the program into different steps:
Pλ shows the program once at the beginning
Cλ groups the program into chunks of two (with the "|" separator)
Tλ thinks about the rules to apply to each chunk
Rλ rewrites the tokens according to the RULES (SWAP OR DELETE OR KEEP)
Dλ deletes the first empty chunk in the program
Lλ shows the current state of the program
Sλ shifts the program to the right by one
Uλ unshits the program to the left by one
CAREFUL! You can't rewrite accross the "|" separator borders.
CAREFUL! The order is important. For each shift, you must unshift again later.
The program is given in the <problem>...</problem> tag.
You can use the <calculation>...</calculation> tag content for intermediate steps.
The last state should be given in the <solution>...</solution> tag.
You have a valid solution when the program can't further be rewritten — i.e., we saw two identical "L" steps.
If the program cannot be further rewritten, keep the <solution></solution> tag empty.
Don't forget to unmap the tokens back to the original program style.
Don't provide any extra commentary.
Examples:
========
<problem>B# A# A# A# #B B# B# B# B# #A #A #A</problem>
<calculation>
Pλ░B♪░A♪░A♪░A♪░♪B░B♪░B♪░B♪░B♪░♪A░♪A░♪A
Cλ|B♪░A♪|A♪░A♪|♪B░B♪|B♪░B♪|B♪░♪A|♪A░♪A|
Tλ|░0░R5|░1░R5|░2░R5|░3░R5|░4░R3|░5░R5|
Rλ|B♪░A♪|A♪░A♪|♪B░B♪|B♪░B♪|♪A░B♪|♪A░♪A|
Lλ░B♪░A♪░A♪░A♪░♪B░B♪░B♪░B♪░♪A░B♪░♪A░♪A
Sλ░█░█B♪░A♪░A♪░A♪░♪B░B♪░B♪░B♪░♪A░B♪░♪A░♪A
Cλ|░█░B♪|A♪░A♪|A♪░♪B|B♪░B♪|B♪░♪A|B♪░♪A|♪A░█░|
Tλ|░0░R5|░1░R5|░2░R2|░3░R5|░4░R3|░5░R3|░6░R5|
Rλ|░█░B♪|A♪░A♪|♪B░A♪|B♪░B♪|♪A░B♪|♪A░B♪|♪A░█░|
Lλ░█░█B♪░A♪░A♪░♪B░A♪░B♪░B♪░♪A░B♪░♪A░B♪░♪A
Uλ░B♪░A♪░A♪░♪B░A♪░B♪░B♪░♪A░B♪░♪A░B♪░♪A
Cλ|B♪░A♪|A♪░♪B|A♪░B♪|B♪░♪A|B♪░♪A|B♪░♪A|
Tλ|░0░R5|░1░R2|░2░R5|░3░R3|░4░R3|░5░R3|
Rλ|B♪░A♪|♪B░A♪|A♪░B♪|♪A░B♪|♪A░B♪|♪A░B♪|
Lλ░B♪░A♪░♪B░A♪░A♪░B♪░♪A░B♪░♪A░B♪░♪A░B♪
Sλ░█░█B♪░A♪░♪B░A♪░A♪░B♪░♪A░B♪░♪A░B♪░♪A░B♪
Cλ|░█░B♪|A♪░♪B|A♪░A♪|B♪░♪A|B♪░♪A|B♪░♪A|B♪░█░|
Tλ|░0░R5|░1░R2|░2░R5|░3░R3|░4░R3|░5░R3|░6░R5|
Rλ|░█░B♪|♪B░A♪|A♪░A♪|♪A░B♪|♪A░B♪|♪A░B♪|B♪░█░|
Lλ░█░█B♪░♪B░A♪░A♪░A♪░♪A░B♪░♪A░B♪░♪A░B♪░B♪
Uλ░B♪░♪B░A♪░A♪░A♪░♪A░B♪░♪A░B♪░♪A░B♪░B♪
Cλ|B♪░♪B|A♪░A♪|A♪░♪A|B♪░♪A|B♪░♪A|B♪░B♪|
Tλ|░0░R4|░1░R5|░2░R1|░3░R3|░4░R3|░5░R5|
Rλ|↓↓↓↓↓|A♪░A♪|↓↓↓↓↓|♪A░B♪|♪A░B♪|B♪░B♪|
Dλ|A♪░A♪|↓↓↓↓↓|♪A░B♪|♪A░B♪|B♪░B♪|
Dλ|A♪░A♪|♪A░B♪|♪A░B♪|B♪░B♪|
Lλ░A♪░A♪░♪A░B♪░♪A░B♪░B♪░B♪
Sλ░█░█A♪░A♪░♪A░B♪░♪A░B♪░B♪░B♪
Cλ|░█░A♪|A♪░♪A|B♪░♪A|B♪░B♪|B♪░█░|
Tλ|░0░R5|░1░R1|░2░R3|░3░R5|░4░R5|
Rλ|░█░A♪|↓↓↓↓↓|♪A░B♪|B♪░B♪|B♪░█░|
Dλ|░█░A♪|♪A░B♪|B♪░B♪|B♪░█░|
Lλ░█░█A♪░♪A░B♪░B♪░B♪░B♪
Uλ░A♪░♪A░B♪░B♪░B♪░B♪
Cλ|A♪░♪A|B♪░B♪|B♪░B♪|
Tλ|░0░R1|░1░R5|░2░R5|
Rλ|↓↓↓↓↓|B♪░B♪|B♪░B♪|
Dλ|B♪░B♪|B♪░B♪|
Lλ░B♪░B♪░B♪░B♪
Sλ░█░█B♪░B♪░B♪░B♪
Cλ|░█░B♪|B♪░B♪|B♪░█░|
Tλ|░0░R5|░1░R5|░2░R5|
Rλ|░█░B♪|B♪░B♪|B♪░█░|
Lλ░█░█B♪░B♪░B♪░B♪
Uλ░B♪░B♪░B♪░B♪
Cλ|B♪░B♪|B♪░B♪|
Tλ|░0░R5|░1░R5|
Rλ|B♪░B♪|B♪░B♪|
Lλ░B♪░B♪░B♪░B♪
Sλ░█░█B♪░B♪░B♪░B♪
Cλ|░█░B♪|B♪░B♪|B♪░█░|
Tλ|░0░R5|░1░R5|░2░R5|
Rλ|░█░B♪|B♪░B♪|B♪░█░|
Lλ░█░█B♪░B♪░B♪░B♪
Uλ░B♪░B♪░B♪░B♪
B♪░B♪░B♪░B♪
</calculation>
<solution>B# B# B# B#</solution>
========
<problem>B# A# #B B# A# #B B# A# #B #B #A B#</problem>
<calculation>
Pλ░B♪░A♪░♪B░B♪░A♪░♪B░B♪░A♪░♪B░♪B░♪A░B♪
Cλ|B♪░A♪|♪B░B♪|A♪░♪B|B♪░A♪|♪B░♪B|♪A░B♪|
Tλ|░0░R5|░1░R5|░2░R2|░3░R5|░4░R5|░5░R5|
Rλ|B♪░A♪|♪B░B♪|♪B░A♪|B♪░A♪|♪B░♪B|♪A░B♪|
Lλ░B♪░A♪░♪B░B♪░♪B░A♪░B♪░A♪░♪B░♪B░♪A░B♪
Sλ░█░█B♪░A♪░♪B░B♪░♪B░A♪░B♪░A♪░♪B░♪B░♪A░B♪
Cλ|░█░B♪|A♪░♪B|B♪░♪B|A♪░B♪|A♪░♪B|♪B░♪A|B♪░█░|
Tλ|░0░R5|░1░R2|░2░R4|░3░R5|░4░R2|░5░R5|░6░R5|
Rλ|░█░B♪|♪B░A♪|↓↓↓↓↓|A♪░B♪|♪B░A♪|♪B░♪A|B♪░█░|
Dλ|░█░B♪|♪B░A♪|A♪░B♪|♪B░A♪|♪B░♪A|B♪░█░|
Lλ░█░█B♪░♪B░A♪░A♪░B♪░♪B░A♪░♪B░♪A░B♪
Uλ░B♪░♪B░A♪░A♪░B♪░♪B░A♪░♪B░♪A░B♪
Cλ|B♪░♪B|A♪░A♪|B♪░♪B|A♪░♪B|♪A░B♪|
Tλ|░0░R4|░1░R5|░2░R4|░3░R2|░4░R5|
Rλ|↓↓↓↓↓|A♪░A♪|↓↓↓↓↓|♪B░A♪|♪A░B♪|
Dλ|A♪░A♪|↓↓↓↓↓|♪B░A♪|♪A░B♪|
Dλ|A♪░A♪|♪B░A♪|♪A░B♪|
Lλ░A♪░A♪░♪B░A♪░♪A░B♪
Sλ░█░█A♪░A♪░♪B░A♪░♪A░B♪
Cλ|░█░A♪|A♪░♪B|A♪░♪A|B♪░█░|
Tλ|░0░R5|░1░R2|░2░R1|░3░R5|
Rλ|░█░A♪|♪B░A♪|↓↓↓↓↓|B♪░█░|
Dλ|░█░A♪|♪B░A♪|B♪░█░|
Lλ░█░█A♪░♪B░A♪░B♪
Uλ░A♪░♪B░A♪░B♪
Cλ|A♪░♪B|A♪░B♪|
Tλ|░0░R2|░1░R5|
Rλ|♪B░A♪|A♪░B♪|
Lλ░♪B░A♪░A♪░B♪
Sλ░█░█♪B░A♪░A♪░B♪
Cλ|░█░♪B|A♪░A♪|B♪░█░|
Tλ|░0░R5|░1░R5|░2░R5|
Rλ|░█░♪B|A♪░A♪|B♪░█░|
Lλ░█░█♪B░A♪░A♪░B♪
Uλ░♪B░A♪░A♪░B♪
Cλ|♪B░A♪|A♪░B♪|
Tλ|░0░R5|░1░R5|
Rλ|♪B░A♪|A♪░B♪|
Lλ░♪B░A♪░A♪░B♪
Sλ░█░█♪B░A♪░A♪░B♪
Cλ|░█░♪B|A♪░A♪|B♪░█░|
Tλ|░0░R5|░1░R5|░2░R5|
Rλ|░█░♪B|A♪░A♪|B♪░█░|
Lλ░█░█♪B░A♪░A♪░B♪
Uλ░♪B░A♪░A♪░B♪
♪B░A♪░A♪░B♪
</calculation>
<solution>#B A# A# B#</solution>
========
<problem>A# B# B# A# B# #A #B A# #A #B #A #B</problem>
<calculation>
Pλ░A♪░B♪░B♪░A♪░B♪░♪A░♪B░A♪░♪A░♪B░♪A░♪B
Cλ|A♪░B♪|B♪░A♪|B♪░♪A|♪B░A♪|♪A░♪B|♪A░♪B|
Tλ|░0░R5|░1░R5|░2░R3|░3░R5|░4░R5|░5░R5|
Rλ|A♪░B♪|B♪░A♪|♪A░B♪|♪B░A♪|♪A░♪B|♪A░♪B|
Lλ░A♪░B♪░B♪░A♪░♪A░B♪░♪B░A♪░♪A░♪B░♪A░♪B
Sλ░█░█A♪░B♪░B♪░A♪░♪A░B♪░♪B░A♪░♪A░♪B░♪A░♪B
Cλ|░█░A♪|B♪░B♪|A♪░♪A|B♪░♪B|A♪░♪A|♪B░♪A|♪B░█░|
Tλ|░0░R5|░1░R5|░2░R1|░3░R4|░4░R1|░5░R5|░6░R5|
Rλ|░█░A♪|B♪░B♪|↓↓↓↓↓|↓↓↓↓↓|↓↓↓↓↓|♪B░♪A|♪B░█░|
Dλ|░█░A♪|B♪░B♪|↓↓↓↓↓|↓↓↓↓↓|♪B░♪A|♪B░█░|
Dλ|░█░A♪|B♪░B♪|↓↓↓↓↓|♪B░♪A|♪B░█░|
Dλ|░█░A♪|B♪░B♪|♪B░♪A|♪B░█░|
Lλ░█░█A♪░B♪░B♪░♪B░♪A░♪B
Uλ░A♪░B♪░B♪░♪B░♪A░♪B
Cλ|A♪░B♪|B♪░♪B|♪A░♪B|
Tλ|░0░R5|░1░R4|░2░R5|
Rλ|A♪░B♪|↓↓↓↓↓|♪A░♪B|
Dλ|A♪░B♪|♪A░♪B|
Lλ░A♪░B♪░♪A░♪B
Sλ░█░█A♪░B♪░♪A░♪B
Cλ|░█░A♪|B♪░♪A|♪B░█░|
Tλ|░0░R5|░1░R3|░2░R5|
Rλ|░█░A♪|♪A░B♪|♪B░█░|
Lλ░█░█A♪░♪A░B♪░♪B
Uλ░A♪░♪A░B♪░♪B
Cλ|A♪░♪A|B♪░♪B|
Tλ|░0░R1|░1░R4|
Rλ|↓↓↓↓↓|↓↓↓↓↓|
Dλ|↓↓↓↓↓|
Dλ||
</calculation>
<solution></solution>
========
<problem>B# B# #A #A B# #A #A #A #B #B #B A#</problem>
<calculation>
Pλ░B♪░B♪░♪A░♪A░B♪░♪A░♪A░♪A░♪B░♪B░♪B░A♪
Cλ|B♪░B♪|♪A░♪A|B♪░♪A|♪A░♪A|♪B░♪B|♪B░A♪|
Tλ|░0░R5|░1░R5|░2░R3|░3░R5|░4░R5|░5░R5|
Rλ|B♪░B♪|♪A░♪A|♪A░B♪|♪A░♪A|♪B░♪B|♪B░A♪|
Lλ░B♪░B♪░♪A░♪A░♪A░B♪░♪A░♪A░♪B░♪B░♪B░A♪
Sλ░█░█B♪░B♪░♪A░♪A░♪A░B♪░♪A░♪A░♪B░♪B░♪B░A♪
Cλ|░█░B♪|B♪░♪A|♪A░♪A|B♪░♪A|♪A░♪B|♪B░♪B|A♪░█░|
Tλ|░0░R5|░1░R3|░2░R5|░3░R3|░4░R5|░5░R5|░6░R5|
Rλ|░█░B♪|♪A░B♪|♪A░♪A|♪A░B♪|♪A░♪B|♪B░♪B|A♪░█░|
Lλ░█░█B♪░♪A░B♪░♪A░♪A░♪A░B♪░♪A░♪B░♪B░♪B░A♪
Uλ░B♪░♪A░B♪░♪A░♪A░♪A░B♪░♪A░♪B░♪B░♪B░A♪
Cλ|B♪░♪A|B♪░♪A|♪A░♪A|B♪░♪A|♪B░♪B|♪B░A♪|
Tλ|░0░R3|░1░R3|░2░R5|░3░R3|░4░R5|░5░R5|
Rλ|♪A░B♪|♪A░B♪|♪A░♪A|♪A░B♪|♪B░♪B|♪B░A♪|
Lλ░♪A░B♪░♪A░B♪░♪A░♪A░♪A░B♪░♪B░♪B░♪B░A♪
Sλ░█░█♪A░B♪░♪A░B♪░♪A░♪A░♪A░B♪░♪B░♪B░♪B░A♪
Cλ|░█░♪A|B♪░♪A|B♪░♪A|♪A░♪A|B♪░♪B|♪B░♪B|A♪░█░|
Tλ|░0░R5|░1░R3|░2░R3|░3░R5|░4░R4|░5░R5|░6░R5|
Rλ|░█░♪A|♪A░B♪|♪A░B♪|♪A░♪A|↓↓↓↓↓|♪B░♪B|A♪░█░|
Dλ|░█░♪A|♪A░B♪|♪A░B♪|♪A░♪A|♪B░♪B|A♪░█░|
Lλ░█░█♪A░♪A░B♪░♪A░B♪░♪A░♪A░♪B░♪B░A♪
Uλ░♪A░♪A░B♪░♪A░B♪░♪A░♪A░♪B░♪B░A♪
Cλ|♪A░♪A|B♪░♪A|B♪░♪A|♪A░♪B|♪B░A♪|
Tλ|░0░R5|░1░R3|░2░R3|░3░R5|░4░R5|
Rλ|♪A░♪A|♪A░B♪|♪A░B♪|♪A░♪B|♪B░A♪|
Lλ░♪A░♪A░♪A░B♪░♪A░B♪░♪A░♪B░♪B░A♪
Sλ░█░█♪A░♪A░♪A░B♪░♪A░B♪░♪A░♪B░♪B░A♪
Cλ|░█░♪A|♪A░♪A|B♪░♪A|B♪░♪A|♪B░♪B|A♪░█░|
Tλ|░0░R5|░1░R5|░2░R3|░3░R3|░4░R5|░5░R5|
Rλ|░█░♪A|♪A░♪A|♪A░B♪|♪A░B♪|♪B░♪B|A♪░█░|
Lλ░█░█♪A░♪A░♪A░♪A░B♪░♪A░B♪░♪B░♪B░A♪
Uλ░♪A░♪A░♪A░♪A░B♪░♪A░B♪░♪B░♪B░A♪
Cλ|♪A░♪A|♪A░♪A|B♪░♪A|B♪░♪B|♪B░A♪|
Tλ|░0░R5|░1░R5|░2░R3|░3░R4|░4░R5|
Rλ|♪A░♪A|♪A░♪A|♪A░B♪|↓↓↓↓↓|♪B░A♪|
Dλ|♪A░♪A|♪A░♪A|♪A░B♪|♪B░A♪|
Lλ░♪A░♪A░♪A░♪A░♪A░B♪░♪B░A♪
Sλ░█░█♪A░♪A░♪A░♪A░♪A░B♪░♪B░A♪
Cλ|░█░♪A|♪A░♪A|♪A░♪A|B♪░♪B|A♪░█░|
Tλ|░0░R5|░1░R5|░2░R5|░3░R4|░4░R5|
Rλ|░█░♪A|♪A░♪A|♪A░♪A|↓↓↓↓↓|A♪░█░|
Dλ|░█░♪A|♪A░♪A|♪A░♪A|A♪░█░|
Lλ░█░█♪A░♪A░♪A░♪A░♪A░A♪
Uλ░♪A░♪A░♪A░♪A░♪A░A♪
Cλ|♪A░♪A|♪A░♪A|♪A░A♪|
Tλ|░0░R5|░1░R5|░2░R5|
Rλ|♪A░♪A|♪A░♪A|♪A░A♪|
Lλ░♪A░♪A░♪A░♪A░♪A░A♪
Sλ░█░█♪A░♪A░♪A░♪A░♪A░A♪
Cλ|░█░♪A|♪A░♪A|♪A░♪A|A♪░█░|
Tλ|░0░R5|░1░R5|░2░R5|░3░R5|
Rλ|░█░♪A|♪A░♪A|♪A░♪A|A♪░█░|
Lλ░█░█♪A░♪A░♪A░♪A░♪A░A♪
Uλ░♪A░♪A░♪A░♪A░♪A░A♪
♪A░♪A░♪A░♪A░♪A░A♪
</calculation>
<solution>#A #A #A #A #A A#</solution>
========
Follow the RULES precisely. If you get it right, you'll get a $200 tip, no yapping. NOW be concise, correct, and solve the following program:
========
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment