Most personality quizzes on the web behave like slot machines. You click through thirty vague prompts, watch a fake progress bar spin for two seconds, and get handed a dramatic archetype with no explanation of how your answers turned into that label. Behind the curtain, there is usually an ad-tech payload, a backend database logging your responses, and a scoring table nobody bothered to audit.
When I built the browser-only Moral Alignment Test at Vicefolk, I wanted the opposite architecture: no accounts, no database, no server-side scoring, and math plain enough to inspect in DevTools in thirty seconds.
Balanced Items and Plain Linear Math
The classic nine-cell alignment chart rests on two independent dimensions: Order (Lawful to Chaotic) and Morality (Good to Evil). To keep the test short enough to finish in a coffee break while still separating noise from signal, I settled on 24 statements rated on a standard 1-to-5 Likert scale:
- 12 Order items: 6 Lawful-keyed and 6 Chaotic-keyed.
- 12 Moral items: 6 Good-keyed and 6 Evil-keyed.
Splitting each axis evenly across positive and reverse-keyed statements does real work. People naturally lean toward agreeing with well-phrased sentences—a habit survey designers call acquiescence bias. If all 12 Order prompts celebrate structure, an agreeable reader gets pushed toward Lawful even if they only hold mild opinions. Pairing 6 Lawful statements with 6 Chaotic statements forces the score back toward center unless the respondent holds a consistent stance.
Each reverse-keyed item is flipped using 6 - rawValue, giving every axis an integer sum between 12 and 60, with a neutral midpoint of 36. From there, the conversion to a readable coordinate is deterministic linear math:
const axis = Math.round(((sum - 36) / 24) * 100); No curve-fitting, no hidden multipliers, no opaque weighting. A sum of 12 maps to -100, 36 maps to 0, and 60 maps to +100.
To divide the -100 to +100 plane into the familiar 3×3 grid, each axis uses ±30 cut lines. Scores at or above +30 land in Lawful or Good; scores at or below -30 land in Chaotic or Evil; everything in between lands in Neutral. Setting the cuts at ±30 instead of ±33 leaves the center band wide enough that genuinely mixed respondents land in Neutral without turning the outer eight boxes into tiny edge cases.
Honest Borderline Coordinate Disclosure
Hard cutoffs create a subtle dishonesty in almost every bucketed quiz. Suppose one person scores +29 on Order and another scores +31. On a 24-question Likert test, that two-point gap is smaller than the difference a single tired click makes—yet a naive UI hands them completely separate identities and pretends the wall between them is made of concrete.
To counter that false precision, the results view checks how close each coordinate sits to a ±30 threshold. Whenever either axis lands within ±8 points of a cut line—meaning between 22 and 38, or between -38 and -22—the interface flags a Borderline Coordinate and explicitly surfaces the adjacent alignment alongside the primary result. If your Order score is +24 and your Moral score is +46, you see Neutral Good first, paired with a clear note that you sit right on the doorstep of Lawful Good.
Zero-Database Friend Overlays With a Checksummed Hash
The most requested feature for a quiz like this is comparing results with a friend. The standard route is storing results in Postgres or Redis, generating a short ID, and serving a comparison URL—which immediately introduces privacy policies, database upkeep, and retention headaches for what is basically two integers.
Instead, the entire friend overlay lives inside location.hash using the format #compare=order.moral.chk. Because browsers never send URL fragments to the server, your friend's coordinates never touch a backend log. When you open their link and finish your own run, the client parses the hash and plots both dots on the same 3×3 SVG grid.
Originally, the hash was just #compare=order.moral. Then a Reddit commenter pointed out a practical bug: certain messaging apps and mobile share sheets occasionally clip trailing characters off URL hashes, turning #compare=24.46 into #compare=24.4 and silently plotting the wrong dot. Adding a single trailing Base36 checksum character fixed the problem without bloating the URL.
Here is the core scoring and hash validation module (full MIT reference spec + test vectors on GitHub: moral-alignment-scoring-spec):
export function scoreAxis(answers, directions) { const sum = answers.reduce((acc, raw, i) => { const val = directions[i] === 1 ? raw : 6 - raw; return acc + val; }, 0); return Math.round(((sum - 36) / 24) * 100); } function computeChecksum(order, moral) { const o = order + 100; const m = moral + 100; return ((o * 13 + m * 7 + 19) % 36).toString(36); } export function encodeCompareHash(order, moral) { return `#compare=${order}.${moral}.${computeChecksum(order, moral)}`; } export function decodeCompareHash(hashString) { const match = /^#compare=(-?\d+)\.(-?\d+)\.([0-9a-z])$/i.exec(hashString.trim()); if (!match) return null; const order = Number(match[1]); const moral = Number(match[2]); const chk = match[3].toLowerCase(); if (order < -100 || order > 100 || moral < -100 || moral > 100) return null; if (computeChecksum(order, moral) !== chk) return null; return { order, moral }; } If a chat client lops off the final character or corrupts a digit, decodeCompareHash returns null and the page falls back cleanly to a solo run instead of plotting fabricated coordinates.
Keeping the Scope Honest
One engineering boundary matters just as much as the code: being candid about what a tool is. This test is built strictly for self-reflection and entertainment—not clinical psychology or validated psychometric diagnosis. Simple linear math cannot diagnose a human being, and pretending otherwise would break the whole point of transparent design.
For readers who like pairing an external coordinate map with a more inward-looking prompt set, the Moral Alignment Test sits alongside the 21-question 7 Deadly Sins Test over on Vicefolk. Both run on the same philosophy: small footprints, zero logins, readable math, and no mystery box pretending to know you better than you know yourself.
