Skip to main content
← Back to blog

How to Master Hash

TLDR: Hash hides a transformation rule and you deduce it by feeding the function test inputs and watching what comes out. You get up to ten tests per round; fewer tests used means a higher score. The winning strategy is hypothesis-driven testing - design inputs that discriminate between competing hypotheses rather than throwing random strings at the function.

What Hash Is

A hidden function transforms your inputs into outputs. You cannot see the code. You can only observe behavior. Feed it a string, watch what comes back, and infer the rule from the pattern.

Three difficulty tiers control how complex the rule can be. Easy uses linear shifts - a Caesar cipher that advances every letter by the same amount, or simple mirroring, or doubling. Medium uses conditional rules - “vowels advance to the next vowel, consonants stay unchanged” or “uppercase letters reverse, lowercase letters do not.” Hard uses positional or arithmetic rules - the transformation depends on a character’s position in the string, or on mathematical operations over alphabet positions.

Every round is keyed by a seed, so the same puzzle can be replayed or shared. Score depends on how few tests you use. The game rewards efficiency, not luck.

Tier summary: Easy - uniform rules applied identically to every character. Medium - conditional rules that branch on character type (vowel vs. consonant, uppercase vs. lowercase). Hard - positional rules where the transformation depends on the character’s index, or arithmetic rules where it depends on counts or sums across the whole input.

HashOpen game →
Loading…

The Core Method: Hypothesis-Driven Testing

The naive strategy is to throw random strings at the function and hunt for patterns. This uses tests inefficiently and often leaves you with ambiguous information.

The efficient strategy is the same one scientists and programmers use: form a specific hypothesis, design a test that would distinguish that hypothesis from alternatives, observe the result, and update your model.

Before each test, know what answer you expect if your current hypothesis is correct - and what a different output would tell you. After the test, check: did the output match the prediction? If yes, confidence in the hypothesis increases. If no, which hypotheses survive the new data?

Tip: Start every round with a baseline test. Input “AAAA” or “ABCD” before forming strong hypotheses. “AAAA” tells you whether all characters transform the same way. “ABCD” tells you whether the transformation is position-dependent (if A becomes B, B becomes C, that is a uniform shift; if A becomes B, B becomes D, C becomes F, the increment is growing).

Six Testing Tactics

Tactic 1 - Test for uniformity. Input “AAAA”. If the output is “BBBB” or “ZZZZ” or some repeated character, the rule probably applies identically to every character. If the output is mixed - like “BCDE” - the rule is position-dependent.

Tactic 2 - Test character type sensitivity. Input “AEIOU” (vowels only) and “BCDFG” (consonants only) as separate tests. If they transform differently, the rule is conditional on character type. If they transform the same way, type does not matter.

Tactic 3 - Test case sensitivity. Input “AAAaaa”. If uppercase and lowercase transform differently, case is part of the rule. If they transform identically, it is not.

Tactic 4 - Test position dependency. Input “ABCDE”. If the output is a simple uniform shift (each letter advances by the same amount), the rule is global. If different positions produce different transformations, the rule is positional.

Tactic 5 - Pin down the parameter. Once you have identified the rule type (uniform shift, type-conditional, positional), use remaining tests to find the exact parameter. For a uniform shift, test “A” - if it becomes “N,” the shift is +13 (a ROT-13). You now know the rule.

Tactic 6 - Test edge cases. What happens at Z? Does it wrap to A, or does something unexpected occur? Input “ZZZ” once you have a leading hypothesis that involves letter shifting. Edge cases often reveal whether the rule uses modular arithmetic or has hard limits.

Binary Search for Shift Value. If you have established a uniform shift and need to find the amount: test “A”. The output letter tells you the shift directly - if “A” becomes “D,” the shift is +3. No need to test B, C, or any other letter. One test pins the parameter completely.

Isolate One Variable at a Time. If you test “AEIOUAEIOU” you have simultaneously varied both character type and input length. You cannot tell which variable caused any difference in output. Change only one thing per test. This discipline is the difference between two-test solves and seven-test solves.

Strategy by Difficulty Tier

On Easy: Start with “AAAA”. If the output is “BBBB,” the shift is +1 - test “CCCC” to confirm, then guess. If the output is “AAAA” mirrored, you have found the rule in one test. Two well-chosen tests should give you high confidence on Easy.

On Medium: After ruling out uniformity (or confirming it), test vowels vs. consonants separately, then uppercase vs. lowercase. Medium functions typically have one or two conditional branches. Once you have identified which character types branch differently, one more test to confirm the exact transformation on each branch is usually enough.

On Hard: Begin with “ABCDEFGH” to expose position-dependency. If positions transform differently, map the pattern: does each position add its own index (position 0 adds 0, position 1 adds 1, position 2 adds 2)? Or is there a fixed alternating rule (even positions +1, odd positions -1)? Use tests with controlled inputs - “AAAA” compared to “AAAB” - to isolate the positional effect from the character-value effect.

Tip: Keep a mental running log of every test and output. After each test, write a one-line summary: “AAAA yields BBBB - suggests uniform +1 shift.” Hypotheses become clearer when you see the full history rather than just the most recent test.

HashOpen game →
Loading…

Common Mistakes

Watch out - random testing: Testing “QWERTY” or “HELLO” as an opening move gives you information, but not efficiently. You cannot interpret the output without a clear hypothesis. Every test should answer a specific question: “Does character type matter?” “Is the shift uniform?” Design the input to answer the question, not to produce interesting-looking output.

Watch out - committing too early: If your first test suggests a simple +1 shift, do not guess immediately. Medium and Hard functions often look simple on the first test but have hidden conditionals. Test one more time with a different character type to confirm before guessing. Two confirming tests are almost always enough; guessing after one is usually premature.

Over-testing once confident. After three well-designed tests, you may have narrowed the rule space to a single hypothesis. Guessing now is more efficient than burning remaining tests to achieve absolute certainty. If you are 90% confident after three tests, guess. The score benefit of using fewer tests is real.

Testing without knowing what result you expect. If you cannot predict what a test will produce under your current hypothesis, the test is not well-designed. Redesign it until you can say: “If hypothesis A is correct, I expect X; if hypothesis B is correct, I expect Y.”

Adaptive Hypothesis Refinement. After each test, write down your updated list of plausible hypotheses and eliminate those that the output rules out. Design the next test to discriminate between the remaining candidates. This iterative narrowing - form hypothesis, test, eliminate, repeat - is the method that achieves Easy in 2-3 tests and Hard in 6-7.

Practice Routine

Start with Easy to build the testing mindset. Aim to crack each puzzle in 3 tests or fewer. After each round, ask: “Could I have gotten the same information in fewer tests? What would the ideal first test have been?” This reflection is more valuable than playing an extra round.

Move to Medium when you consistently crack Easy in 3 tests. Medium introduces conditional logic. Your goal is to isolate character types cleanly in one or two targeted tests, then confirm the branch behavior. Five to six tests is a good target.

Tackle Hard when Medium feels structured. Hard requires thinking about positions and arithmetic. Map the positional pattern explicitly on paper if needed. Seven to eight tests is reasonable; six is excellent.

Share seeds with others and compare strategies. “I solved it in four tests - how did you do it in three?” This is the fastest way to learn new discriminating test designs you had not considered.

Tip: After every round, ask yourself one question: “What was the single test that gave me the most information?” Identifying it reinforces the habit of designing high-information experiments. Over time, you will naturally front-load those high-value tests and push your test count down.

Efficiency target: Easy in 2-3 tests, Medium in 5-6, Hard in 7-8. Consistently hitting these numbers means the hypothesis-driven mindset is working. Score is inversely tied to test count, so these efficiency targets are also the path to high scores.

Why This Skill Transfers

Hash trains the same epistemic habit that makes programmers effective at debugging, scientists effective at designing experiments, and product teams effective at user research. You cannot see the system directly - you can only observe its outputs and infer its structure. The discipline of designing discriminating tests rather than random ones, and of updating hypotheses after each observation rather than anchoring on the first result, is exactly the skill that transfers.

The ten-test budget mirrors real-world constraints: resources are finite, so efficiency matters. The seed system mirrors reproducibility: a good experiment is one another person can replicate. Play Hash not just to score well, but to build the habit of asking “what test would distinguish between my hypotheses?” before you act.

MemPi
Play on your next flight · works offline
Add PlayMemorize to your home screen
In Safari, tap Share , then choose “Add to Home Screen”.