Skip to content

Instantly share code, notes, and snippets.

@ismellpillows
Created April 7, 2024 12:31
Show Gist options
  • Save ismellpillows/db1497c3961820625f3970c07742f008 to your computer and use it in GitHub Desktop.
Save ismellpillows/db1497c3961820625f3970c07742f008 to your computer and use it in GitHub Desktop.
ab8
2be1675917d32c068cec1782d64a80120b81af284174d855c3bf435f0ba3c901
model: gpt-4-0314
temperature: 0
You will be given tokens [ A# , #A , B# , #B ] in a <problem> tag.
Translate the tokens according to
A# = X
#A = Y
B# = N
#B = M
Remove: consecutive pairs X Y or N M
Swap: consecutive pairs X M or N Y
Repeat until no more pairs can be removed or swapped.
Translate the tokens back according to
X = A#
Y = #A
N = B#
M = #B
Output the tokens in a <solution> tag.
EXAMPLE:
<problem>#A A# A# #A B# B# #A</problem>
Translate the tokens
1. Y
2. X
3. X
4. Y
5. N
6. N
7. Y
Remove: consecutive pairs X Y or N M
1. Y> no
2. X> Y and 3 is X, Y!=X
3. X> Y and 4 is Y, Y==Y remove 3 4
4. Y> no
5. N> M and 6 is N, M!=N
6. N> M and 7 is Y, M!=Y
7. Y> no
REMOVE [ 3 4 , ]
1. Y
2. X
3. _
4. _
5. N
6. N
7. Y
Cleanup removed
1. Y
2. X
3. N
4. N
5. Y
Swap: consecutive pairs X M or N Y
1. Y> no
2. X> M and 3 is N, M!=N
3. N> Y and 4 is N, Y!=N
4. N> Y and 5 is Y, Y==Y swap 4 5
5. Y> no
SWAP [ 4 5 , ]
1/5. Y
2. X
3. N
4. Y
5. N
Repeat if did cleanup or did swap: yes
Remove: consecutive pairs X Y or N M
1. Y> no
2. X> Y and 3 is N, Y!=N
3. N> M and 4 is Y, M!=Y
4. Y> no
5. N> M and 6 is None, M!=None
no remove
Swap: consecutive pairs X M or N Y
1. Y> no
2. X> M and 3 is N, M!=N
3. N> Y and 4 is Y, Y==Y swap 3 4
4. Y> no
5. N> Y and 6 is None, Y!=None
SWAP [ 3 4 , ]
1/5. Y
2. X
3. Y
4. N
5. N
Repeat if did cleanup or did swap: yes
Remove: consecutive pairs X Y or N M
1. Y> no
2. X> Y and 3 is Y, Y==Y remove 2 3
3. Y> no
4. N> M and 5 is N, M!=N
5. N> M and 6 is None, M!=None
REMOVE [ 2 3 , ]
1. Y
2. _
3. _
4. N
5. N
Cleanup removed
1. Y
2. N
3. N
Swap: consecutive pairs X M or N Y
1. Y> no
2. N> Y and 3 is N, Y!=N
3. N> Y and 4 is None, Y!=None
no swap
Repeat if did cleanup or did swap: yes
Remove: consecutive pairs X Y or N M
1. Y> no
2. N> M and 3 is N, M!=N
3. N> M and 4 is None, M!=None
no remove
Swap: consecutive pairs X M or N Y
1. Y> no
2. N> Y and 3 is N, Y!=N
3. N> Y and 4 is None, Y!=None
no swap
Repeat if did cleanup or did swap: no
Final result
1. Y
2. N
3. N
Translate the tokens back
1. Y = #A
2. N = B#
3. N = B#
Output the tokens
<solution>#A B# B#</solution>
END OF EXAMPLE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment