© Valve Corporation. All rights reserved. All trademarks are property of their respective owners in the US and other countries.
Privacy Policy
| Legal
| Steam Subscriber Agreement
| Refunds

Human Resource Machine

Solution hints, no spoilers

By kermit

Gives hints for basic solutions, size challenges and speed challenges without giving you the acutal code. If you're looking to just copy and paste a complete solution, you'll find them in this repository[github.com].

Rate

Favorite

Favorited

Unfavorite

Year 2 - Busy Mail Room

Speed challenge: 25

You've probably solved the puzzle by using a sequence of input, output, jump to start. The jump instruction does not do any input/output work, but is useful to keep the process repeating. The jump adds 1 instruction per item that is 'extra' to the actual work required. What if you transported two items before jumping back to the beginning? The extra cost of the jump instruction would be reduced to 1 per two items.

Knowing that this puzzle's input is never longer than 12 items, can you go all the way and pass even below the challenge mark of 25?

The technique used here is called

Year 9 - Zero Preservation Initiative

Speed Challenge

Unrolling the loop helps here. Just repeat verbatim instead of jumping to beginning.
Year 10 - Octoplier Suite

Size Challenge: 9

If you're struggling to get down to 9 instructions total, the trick is to use the hint given in the game. Can you multiply by 8 using 3 add instructions only?Obviously, you can't just add the input 3 times. You need to generate intermediate results and add them. Doubling an item 3 times is the same as multiplying it by 8 you know.

Year 12 - Tetracontiplier

Size Challenge: 14

In this particular challenge it is worth remembering that in the Octoplier level, you found a quick way to createImplementing the idea efficiently also solves the speed challenge.

Year 14 - Maximization Room

Size Challenge

Realizing that
Year 16 - Absolute Positivity

Subtracting a number from itself twice always generates the original but with the sign inverted. The first subtraction lands you at 0, the second generates the opposite of the original.

**x - x - x = (x - x) - x = 0 - x = -x**

Year 19 - Countdown

Speed Challenge

Having three separate branches for inputs of 0, positive, negative is good enough to pass.
Year 20 - Multiplication Workshop

Speed Challenge

Early test for multiplication by 0 and remembering that
Year 22 - Fibonacci Visitor

Size Challenge

Initializing with 0,1 instead of 1,1 might help reducing instructions, assuming you follow a "add current with predecessor" and "swap predecessor with current" approach. Speed Challenge

Having two sections of code alternate on where they put the next sequence number cuts down instructions needed for swaps.
Year 28 - Three Sort

Size Challenge

Arrange your a, b, c in a row, swap if necessary, output the row in order.Speed Challenge

Handle each of the 6 possible outcomes directly.
Year 32 - Inventory Report

Year 35 - Duplicate Removal

Speed Challenge

Unrolling your loop sufficiently is good enough to pass.
Year 36 - Alphabetizer

Size Challenge

Copy both strings, compare, setup which to output, output. Can be done within the instruction limit.Speed Challenge

For best results, determine if the first or second string are going to be output while building the second one.
Year 38 - Digit Exploder

Speed Challenge

Build a harness that subtracts several 100s or 10s at once. Be efficient. How about trying 500, 200, then repeat 100, and then trying 50, 20, repeat 10.

Year 39 - Re-Coordinator

Dividing by width of the floor and keeping the remainder is all you need here.

Year 40 - Prime Factory

Size Challenge

You are testing for prime integer factors in ascending order. If you did not bother making sure that the factors tested were prime, what would happen?Speed Challenge

Several possibilities here, considering that the puzzle inputs are going to be max 20. Check the factors involved. Even a lookup table containing the smallest factor of a given number is feasible. It gives a speed result of ~ 249 instructions.

Year 41 - Sorting Floor

Size Challenge

Simplest ideas have the least instructions. Ideas like Selection Sort[en.wikipedia.org].Speed Challenge

The lack of subroutines, a stack, and lack of memory on the floor make using most efficient sorting algorithms impractical.Unrolling loops and some special handling of the last two unsorted items is enough to pass.

AFor 3 <

n< 25, all that is required to test primality is ifnis not divisible by 2 or 3.Handling the boundary condition (n < 10) right after the inbox command can reduce execution time and save hassles when outboxing the separate digits.

The input values are never less than 5, so you may safely first output the sequence (1, 1, 2, 3, 5) before entering your main loop.

Which is why I PMed him instead of posting pretty much the solution, which is also why he hasn't returned since 20 Jan.

Try to determine the smallest number so far, before you INBOX a new number.

I managed to require 7x the amount of command blocks and 5x the steps for beating the challenges. Now I'm stuck thinking of a different method to determine to smallest number in a string.

Currently I'm saving all numbers to memory, -bumping them and +bumping a counter. Once any number hits zero, the counter equals the number and is the required output. (The last string takes forever with the bigger numbers, so I figured this approach has to seem completely ridiculous..)