S17TALKBACK
The task
Two cores, their pieces swapped. Swaps stay inside a core.
P must receive each value from X doubled. Only the other core doubles it.
The board
Key idea
Par is 3 swaps. Core c0 needs 1 instruction swap and 1 operand swap; core c1 needs 1 instruction swap. Every one of them trades two tiles that hold each other's places, so each swap mends two.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
c0 sends the value up its two way pin P1, then reads the reply on P1.
Hint 2Show
ADD A adds A to itself.
Hint 3Show
c1 answers on the same pin it read from.
Solution
Reveal the Full SolutionThe complete program for TALKBACK. Open it only when you want the answer.
The board as dealt
This is the arrangement the game deals. Framed tiles are the ones out of place.
c0SC-2 standard
IN P0
IN P1
OUT P2
OUT P1c1SC-2 standard
OUT P0
ADD A
IN P03 swaps back
Make these swaps in order. Lines are numbered from 1 in each core.
- In core
c0, swap the operandP2on line 3 withP1on line 4. - In core
c0, swap the instructionINon line 2 withOUTon line 3. - In core
c1, swap the instructionOUTon line 1 withINon line 3.
The finished program
Every tile back in place: the reference solution, which scores exactly par on every benchmark.
c0SC-2 standard
IN P0
OUT P1
IN P1
OUT P2c1SC-2 standard
IN P0
ADD A
OUT P0- CYCLES
- 313
- at par
- ENERGY
- 1638
- at par
- NODES
- 2
- at par
- INSTRUCTIONS
- 7
- at par
- SWAPS
- 3
- at par