58LITE
The task
P must receive 8 times each X value.
b is an SC-1, a lite core: it has only register A and 8 lines, with no B or XCH.
An SC-1 spends 1 energy an instruction, half of what a standard core like a spends.
The board
Key idea
The SC-1: register A only, 8 lines, 1 energy an instruction, no B or XCH; work belongs on the cheap core.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
An SC-1 is cheap: the same work costs half the energy on b that it costs on a.
Hint 2Show
ADD A doubles A, so three of them in a row multiply by 8.
Hint 3Show
Splitting the work between a and b runs faster, but it costs more energy.
Solution
Reveal the Full SolutionThe complete program for LITE. Open it only when you want the answer.
The reference program
The game's own solution. It passes every test and scores exactly par on every benchmark.
aSC-2 standard
IN P0
OUT P1bSC-1 lite
IN P0
ADD A
ADD A
ADD A
OUT P1- CYCLES
- 237
- at par
- ENERGY
- 1053
- at par
- NODES
- 2
- at par
- INSTRUCTIONS
- 7
- at par
Another way: Split
A second program that also passes. It beats par on CYCLES and gives some back on ENERGY.
A doubles once and b twice, so neither core holds up the other. Fewer cycles than par, but the doubling on a costs twice the energy.
aSC-2 standard
IN P0
ADD A
OUT P1bSC-1 lite
IN P0
ADD A
ADD A
OUT P1- CYCLES
- 199
- under par
- ENERGY
- 1170
- over par
- NODES
- 2
- at par
- INSTRUCTIONS
- 7
- at par
Another way: Work on a
A second program that also passes, by a different road, at a cost on ENERGY.
All the work on the standard core. It passes, at more energy.
aSC-2 standard
IN P0
ADD A
ADD A
ADD A
OUT P1bSC-1 lite
IN P0
OUT P1- CYCLES
- 237
- at par
- ENERGY
- 1404
- over par
- NODES
- 2
- at par
- INSTRUCTIONS
- 7
- at par