Posted October 17, 2015
Hello,
I was able so solve the first 23 rooms and find optimal solutions which reach the given goals (size, speed). Room 22 was the first room where I was able to beat the given values. I created a faster program and a smaller one. At room 23 I found a solution which is faster and smaller than required.
Does anyone find better solutions than requested for the rooms 1-21?
pavo
Here are my solutions. I removed the notes and comments, but could post the full programs if anyone is interested. I'd like to hear other solutions, ideas, ...
R22 fast (max 156 steps, 135 steps used):
-- HUMAN RESOURCE MACHINE PROGRAM --
BUMPUP 9
a:
INBOX
COPYTO 3
COPYFROM 9
COPYTO 0
COPYTO 1
OUTBOX
COPYFROM 9
OUTBOX
b:
COPYFROM 1
COPYTO 6
ADD 0
COPYTO 1
COPYFROM 3
SUB 1
JUMPN a
COPYFROM 1
OUTBOX
COPYFROM 6
COPYTO 0
JUMP b
R22 small (max 19 commands, 18 commands used):
-- HUMAN RESOURCE MACHINE PROGRAM --
a:
INBOX
COPYTO 3
COPYFROM 9
COPYTO 0
COPYTO 1
BUMPUP 1
b:
COPYTO 6
OUTBOX
COPYFROM 1
ADD 0
COPYTO 1
COPYFROM 6
COPYTO 0
COPYFROM 3
SUB 1
JUMPN a
COPYFROM 1
JUMP b
R23 fast & small (max 75 steps, 73 steps used; max 13 cmds, 12 cmds used):
-- HUMAN RESOURCE MACHINE PROGRAM --
a:
INBOX
JUMP c
b:
ADD 0
c:
COPYTO 0
d:
INBOX
JUMPZ e
SUB 0
JUMPN b
JUMP d
e:
COPYFROM 0
OUTBOX
JUMP a
-- END --
I was able so solve the first 23 rooms and find optimal solutions which reach the given goals (size, speed). Room 22 was the first room where I was able to beat the given values. I created a faster program and a smaller one. At room 23 I found a solution which is faster and smaller than required.
Does anyone find better solutions than requested for the rooms 1-21?
pavo
Here are my solutions. I removed the notes and comments, but could post the full programs if anyone is interested. I'd like to hear other solutions, ideas, ...
R22 fast (max 156 steps, 135 steps used):
-- HUMAN RESOURCE MACHINE PROGRAM --
BUMPUP 9
a:
INBOX
COPYTO 3
COPYFROM 9
COPYTO 0
COPYTO 1
OUTBOX
COPYFROM 9
OUTBOX
b:
COPYFROM 1
COPYTO 6
ADD 0
COPYTO 1
COPYFROM 3
SUB 1
JUMPN a
COPYFROM 1
OUTBOX
COPYFROM 6
COPYTO 0
JUMP b
R22 small (max 19 commands, 18 commands used):
-- HUMAN RESOURCE MACHINE PROGRAM --
a:
INBOX
COPYTO 3
COPYFROM 9
COPYTO 0
COPYTO 1
BUMPUP 1
b:
COPYTO 6
OUTBOX
COPYFROM 1
ADD 0
COPYTO 1
COPYFROM 6
COPYTO 0
COPYFROM 3
SUB 1
JUMPN a
COPYFROM 1
JUMP b
R23 fast & small (max 75 steps, 73 steps used; max 13 cmds, 12 cmds used):
-- HUMAN RESOURCE MACHINE PROGRAM --
a:
INBOX
JUMP c
b:
ADD 0
c:
COPYTO 0
d:
INBOX
JUMPZ e
SUB 0
JUMPN b
JUMP d
e:
COPYFROM 0
OUTBOX
JUMP a
-- END --
Post edited October 17, 2015 by pavo.gog