I think @zzq got a key piece of this – how to convert any question A into a question A’ where hearing “arf” to question A’ means the answer to question A is yes and hearing “ruf” means the answer to question A is no. You don’t know what “arf” and “ruf” mean but you know the answer to the question you care about.

Except that doesn’t work with Random. So, since it’s been a week, I’m giving my solution (including my own explanation of the piece @zzq already explained, as well as repeating the bit about the Double Negative Indirection trick so this is self-contained). Here it is:

[UPDATE: I’m removing the spoiler tags because it messes up some of the formatting. Look away!]

We’ll start with what I call the Double Negative Indirection (DNI) trick. The standard name in the literature is *the embedded question lemma*. (And, by the way, this problem is known as The Hardest Logic Puzzle Ever so… I guess I should’ve started with some easier ones!) The DNI trick works if you know that the creature you’re talking to either always lies or always tells the truth. You just ask them “what would you say if I asked you proposition P?” Truth-tellers obviously tell you whether P is true and liars lie to you about what they *would* say, which means they also tell you the truth. Cuz they lie about their lying! Pretty guileless for an inveterate liar but we’ll let that slide.

But that doesn’t work with Random. If Random is truthful then it’ll peek into the random number generator of the hypothetical world where you ask it the embedded question and might truthfully tell you that it’ll lie in that case. Or vice versa. Point is, we lose the “either truthing about truthing or lying about lying, yielding the truth either way” property.

Here’s how we can fix that:

“If I asked you again and again until your state matched your current state, would you, at that point, agree that snibgiblets are slippery?” (Let’s say the answer to the embedded question – snibgiblets being slippery – is “arf”. Not that we know what “arf” means, but we’ll come back to that.)

- For truthers and liars, the “until your state matched” doesn’t change anything – we’re in the usual situation of truthers saying “arf” cuz that’s the answer and liars lying about their lying and saying “arf” too.
- A random truther would say “arf” because “arf”, being the truth, is truly what it’d say eventually, next time it was in a truthful state.
- For a random liar, next time it’s in its lying state again it’d falsely say “
*ruf*”. But it’s a liar right now and will lie about that lying and say the opposite of “ruf”, i.e., “arf”!

So we’re almost there and just need to pull in @zzq’s solution to the arf-vs-ruf problem! Here it is:

“If I asked you again and again until your state matched your current state, would you, at that point, agree that THE ANSWER TO WHETHER *SNIBGIBLETS ARE SLIPPERY* IS ARF?”

By the argument above, we’re always hearing the truth about the all-caps part. So consider the 4 possible worlds:

- Snibgiblets are slippery and arf means yes => the answer is yes and we hear “arf” (i.e., yes).
- Snibgiblets are slippery and arf means no => the answer is no and we hear “arf” (i.e., no).
- Snibgiblets are grippy and arf means yes => the answer is no and we hear “ruf” (i.e., no).
- Snibgiblets are grippy and arf means no => the answer is yes and we hear “ruf” (i.e., yes).

Voila. We still don’t know what “arf” and “ruf” mean but we can treat “arf” as yes because that’s what we hear if and only if the answer to the super-embedded question, the slipperiness of snibgiblets in this case, is yes.

So that was the interesting part and we can kinda brute-force it from here and use our 3 questions to do like a binary search through the 6 possible permutations of the 3 dogs. (Or gods – I changed it to dogs to make this less googlable.)

- TLR: Truth-teller, Liar, Random
- TRL: Truth-teller, Random, Liar
- LTR: Liar, Truth-teller, Random
- LRT: Liar, Random, Truth-teller
- RTL: Random, Truth-teller, Liar
- RLT: Random, Liar, Truth-teller

So the first question can be:

If I asked you again and again until your state matched your current state, would you, at that point, agree that the answer to whether *you three are lined up in one of the first three orderings in this list* is arf?

That question eliminates half the list and you can just repeat with the remaining list at most 2 more times!