Developing a logic puzzle that involves controlling the flow of information to solve it. I've made progress on an answer that I haven't been able to finish for weeks now, and am looking for a-hand-up with it. I've had a few inklings as to how the puzzle would be solved in a general sense and have constructed hints to guide the solver in the right direction. I'm happy to post the incomplete solution once this has had a chance to stir here for a while. The puzzle is as follows:

A traveler (you) is in search of the goddess of knowledge and wisdom to ask her an important question. You eventually find the place in which the goddess resides in the form of a tiny village of only 30 people. The villagers tell you that the goddess walks among them, and that if you can deduce which of the villagers is the goddess in human form, the goddess will give you the knowledge you seek.

Being the sporting deity that she is, the villagers tell you that the goddess has set-in-motion a set of rules that will allow you to deduce her identity, and if you can figure out how to use these rules to your advantage to find her, you will prove yourself worthy to receive the knowledge you seek from her. A villager bestows you an envelope. Within it is a piece of paper which dictates the rules:

To facilitate the goddess’s game, the villagers will do anything you ask them to do so long as nobody gets hurt, and they can still adhere to the other rules set for them. The villagers will refuse any task that requires them to break this rule.

To facilitate the goddess’s game, the villagers will answer most-any question you ask truthfully and honestly. If they are asked a question that entails an answer they're not 100% sure is true, they'll respond with “I can’t answer that.”. In return, the villagers require you to be completely honest with them as well. During the course of the game, you are not permitted to lie to them.

The villagers will not say anything that they are not 100% sure is true, if directly asked to lie, they’ll respond with “I can’t say that”. The villagers will refuse commands that require them to break this rule.

Rules #1, #2, and #3 do not apply to the goddess herself. The goddess doesn’t have to follow any of these rules, and will lie to protect her own identity whenever possible.

With that being said, as you continue to progress through the goddess’s game, testing each rule and asking villagers various questions, you also become aware of the following things:

The goddess is a divine being of knowledge and wisdom, and knows most everything. If you enact a plan to deduce the goddess’s identity, you must assume she knows what your plan is at all times, and will do what she can to sabotage it.

The villagers are all aware that the goddess walks among them, but none of them have any clues or inclinations as to who she is. The only one whose certain of the goddess’s identity is the goddess herself.

None of the villagers are aware of rule #4.

The villagers state that if you can somehow make them 100% certain of the goddess’s identity while simultaneously being correct, the goddess will sportingly admit defeat and reveal herself. Under this set of conditions, how can you prove beyond a shadow of doubt the goddess’s identity to the villagers?

Hints:#1

Spoiler:

Because the goddess always knows your plan, you can't outsmart the goddess by directly confronting her. Focus on outsmarting the villagers instead, and in a way the goddess isn't able to tamper with.

#2

Spoiler:

While rule #4 may seem like your greatest nuisance, it is, in fact, your greatest weapon. And the fact that the villagers aren't aware of it makes it that much more useful.

#3

Spoiler:

When rule #1 states that you can ask the villagers to do anything, it means exactly what it means. ANYTHING, even if it may at first seem silly or unreasonable.

#4

Spoiler:

Just because neither you or the villagers are permitted to lie, doesn’t mean you can’t control the flow of information. Withholding information does not count as a lie, and neither is making assumptions based on incomplete information.

#5

Spoiler:

If you line up the conditions correctly, it’s possible to get the villagers to lie to each other without them knowing, which technically isn’t against the rules.

Please consider this first theoretical situation:The goddess actually is just a phantom flying around the village. She is not specifically linked to any of the villagers. The villagers think that she is walking among them, but they're wrong. apart from that, the rules and the purpose is exactly the same. Obviously, in this situation, the puzzle is impossible, because the goddess is not actually one of the villagers.

Now, a second theoretical situation:The goddess is actually a spectator from a villager's eyes. She does not influence the villager in any way and he doesn't know the goddess possesses him, so regarding everything that happens in the village, you will get exactly the same results as in the first situation. The puzzle is impossible.

Finally, let's get back to your puzzle:The goddess isn't just a spectator. She is herself in a villager's form. What does prevent her from acting exactly the same way as the villager would have in the above situation? How would she not be able to act exactly as if she was just one of 30 delusional villagers who believe a goddess is walking among them?

Is there any information that all villagers have and not her? Is there something that the villagers are able to do but not her? Is there any rule that I did not understand, and implies that she does not have the right to act or speak exactly like the random villager she is playing?

The only leads I would imagine to start by something that does not feel so impossible, would be to inquire about how the villagers think they know a goddess is walking among them, and where the envelope comes from. But following this lead would require more information about this in the puzzle statements themselves.

OK, I've got something that looks like a solution. Please pick holes in it

Yat is correct, the goddess can perfectly imitate a mundane villager. She is bound by no rules, nor can she lack knowledge. What's more, if she ever fails to act like a mundane villager, I can reveal my paper, point to rule 4 and demonstrate that the goddess has given away her identity - thus I win. So the goddess, to conceal her identity, can and will perfectly imitate a mundane villager. Thus there is no way I can determine her identity.

However, that is not the victory condition.

The villagers state that if you can somehow make them 100% certain of the goddess’s identity while simultaneously being correct, the goddess will sportingly admit defeat and reveal herself

If I already knew her identity at this point, she wouldn't need to reveal herself. I can win even if I don't know the goddess's identity, if I can make the villagers "100% certain of the goddess’s identity while simultaneously being correct". In other words I win if:

All the villagers are certain that villager X is the goddess.

Villager X is in fact the goddess

Even if I'm not certain villager X is the goddess.

There are no limits on how long I have to complete this, or how many commands or questions I may use. There is no failure condition that can end the game - either I win or give up.

How can I convince the villagers of something I don't know to be true without lying? This is the tricky bit. But the villagers "know" things which aren't true, so go from there.

Every villager (other than the goddess) believes:

Exactly one villager is the goddess.

All villagers, including the goddess, must obey rules 1-3 during the game. There are no exceptions, there is no rule 4.

So, I call the village together. I instruct all the villagers not to speak except in answer to my questions. I secretly choose one villager as "X". I ask each villager in turn, other than X, whether they are the goddess. The villagers all say "no". If the goddess is not X, she must say "no" when asked or everyone will know who she is. As the villagers believe that they are all (even the goddess) bound by rule 2, they will believe the answers. By elimination, X must be the goddess (even though I know that's not the case, they don't).

Now all the villagers believe that X is the goddess. If X is in fact the goddess, I've met the victory condition. If not, everyone sits there in confusion wondering why she hasn't revealed herself. I realise I've chosen wrong, and tell all the villagers “Forget everything that happened since the beginning of this meeting”. They do so – rule 1 requires it. The goddess ignores it, of course, but that doesn't matter as she still has to pretend to be a mundane villager. I choose another villager as X, and start the process again. Eventually I will choose the goddess as X, and win.

SteelCamel wrote:Now all the villagers believe that X is the goddess. If X is in fact the goddess, I've met the victory condition. If not, everyone sits there in confusion wondering why she hasn't revealed herself. I realise I've chosen wrong, and tell all the villagers “Forget everything that happened since the beginning of this meeting”. They do so – rule 1 requires it.

OP may correct me if I'm wrong, but I think rule 1 means the villagers will obey the command if they are able to do it, you could not ask them to lift mountains and throw them in the ocean (if that was your strategy for some reason). And in the same spirit, you can't ask them to forget something, I would guess...

And if they don't forget it, then they'll never be certain of her identity, they'll know you're just guessing multiple times.

SteelCamel wrote:Now all the villagers believe that X is the goddess. If X is in fact the goddess, I've met the victory condition. If not, everyone sits there in confusion wondering why she hasn't revealed herself. I realise I've chosen wrong, and tell all the villagers “Forget everything that happened since the beginning of this meeting”. They do so – rule 1 requires it.

OP may correct me if I'm wrong, but I think rule 1 means the villagers will obey the command if they are able to do it, you could not ask them to lift mountains and throw them in the ocean (if that was your strategy for some reason). And in the same spirit, you can't ask them to forget something, I would guess...

And if they don't forget it, then they'll never be certain of her identity, they'll know you're just guessing multiple times.

Actually that is a completely valid command to give. You can ask the villagers to forget and remember any bits of information on a whim so long as it's in the form of command and follows in accordance with the three rules set for them (the entire point of the logic puzzle is to control the flow of information among the villagers anyway, fooling them to meet your own ends).

Unless anyone can figure out a hole that I can't, I think SteelCamel nailed it on the head. My original half-answer was effectively just half of his answer, and he filled the rest in for me.

HeroSpirit wrote:Actually that is a completely valid command to give. You can ask the villagers to forget and remember any bits of information on a whim so long as it's in the form of command and follows in accordance with the three rules set for them

I have a real problem with this. Forgetting something on command is impossible. Your clues seem very explicit about the fact that you can manipulate the information you let go to influence what the villagers think and then make them lie to eachother and so on. It is completely overkill to build such a clever strategy if you can, such as it is the case in this solution, just order them to be 100% certain of things even if they have all information to know better, by just removing information from their heads at will. So, I will take the next step in the same direction, which seems a smaller leap than the previous one, and here is my solution:

I take apart three villagers, and order them to suddenly know who the goddess is, then I just ask them to tell me, then I tell all the other villagers who it is.

It should feel roughly as disappointing to you as the other solution feels to me.

But seriously, didn't you have another lead in mind when you posted the puzzle?

Yat wrote:I take apart three villagers, and order them to suddenly know who the goddess is, then I just ask them to tell me, then I tell all the other villagers who it is.

It should feel roughly as disappointing to you as the other solution feels to me.

But seriously, didn't you have another lead in mind when you posted the puzzle?

I would say that a villager is incapable of remembering information that they never had to begin with. In terms of where the line is as to what is possible to command and what is impossible, I'd say that oversteps it.

In terms of where other leads went, I had another where one villager would be set aside, ask the villager's questions (primarily who the goddess is) on behalf of the traveler, and through process of elimination make accusations as to who it is and who it isn't (and because villagers aren't able to lie, but able to say falsehoods based on incomplete information, each accusation would be taken as fact to the others). That's what hints #4 and #5 were getting at. But SteelCamel's answer meets that same end more effectively with fewer steps.

SteelCamel wrote:OK, I've got something that looks like a solution. Please pick holes in it

Yat is correct, the goddess can perfectly imitate a mundane villager. She is bound by no rules, nor can she lack knowledge. What's more, if she ever fails to act like a mundane villager, I can reveal my paper, point to rule 4 and demonstrate that the goddess has given away her identity - thus I win. So the goddess, to conceal her identity, can and will perfectly imitate a mundane villager. Thus there is no way I can determine her identity.

However, that is not the victory condition.

The villagers state that if you can somehow make them 100% certain of the goddess’s identity while simultaneously being correct, the goddess will sportingly admit defeat and reveal herself

If I already knew her identity at this point, she wouldn't need to reveal herself. I can win even if I don't know the goddess's identity, if I can make the villagers "100% certain of the goddess’s identity while simultaneously being correct". In other words I win if:

All the villagers are certain that villager X is the goddess.

Villager X is in fact the goddess

Even if I'm not certain villager X is the goddess.

There are no limits on how long I have to complete this, or how many commands or questions I may use. There is no failure condition that can end the game - either I win or give up.

How can I convince the villagers of something I don't know to be true without lying? This is the tricky bit. But the villagers "know" things which aren't true, so go from there.

Every villager (other than the goddess) believes:

Exactly one villager is the goddess.

All villagers, including the goddess, must obey rules 1-3 during the game. There are no exceptions, there is no rule 4.

So, I call the village together. I instruct all the villagers not to speak except in answer to my questions. I secretly choose one villager as "X". I ask each villager in turn, other than X, whether they are the goddess. The villagers all say "no". If the goddess is not X, she must say "no" when asked or everyone will know who she is. As the villagers believe that they are all (even the goddess) bound by rule 2, they will believe the answers. By elimination, X must be the goddess (even though I know that's not the case, they don't).

Now all the villagers believe that X is the goddess. If X is in fact the goddess, I've met the victory condition. If not, everyone sits there in confusion wondering why she hasn't revealed herself. I realise I've chosen wrong, and tell all the villagers “Forget everything that happened since the beginning of this meeting”. They do so – rule 1 requires it. The goddess ignores it, of course, but that doesn't matter as she still has to pretend to be a mundane villager. I choose another villager as X, and start the process again. Eventually I will choose the goddess as X, and win.

I think you're one step away from a solution. Add in a bit of hypnotism and you're good.

Since the villagers have to follow your instructions, hypnotizing them should be possible. Then, while they are in a hypnotic trance, ask all but one of the villagers if they are the goddess. After 29 negative responses, ask those 29 if that means the last villager must be the goddess. When they say yes, if you chose right, the goddess will reveal herself, and if you chose wrong, you can wake everyone up and thus make them forget what happened while they were in the trance, and repeat until you pick the right one.

I have something that is not very satisfying because it implies that the villagers are very gullible, but it doesn't require magically or hypnotically removing information they already have. Just updating it in a way you control, so that every time they change their mind, they actually have more information than before. If I am not mistaken, you can't actually deduce who the goddess is, so the only solution is, as pointed out by SteelCamel, to make the villagers all repeatedly change their minds about who the goddess is until she happens to be it. Potentially changing one's mind 29 times requires a certain amount of gullibility (or, you know, magic), so I don't see a better way.

First, you need to forbid the villagers to exchange any information regarding the whole process, except the ones you request them to, during the daily meetings.

Every day for 30 days, you summon 29 villagers to publicly ask one of them if he is the goddess. The one left out is a different one every day, and the one you ask is a different one every day, so that you can all chain them together in a single loop with the relation "X was absent when Y speaked". After this first month, as the villagers don't know about rule 4, every villager thinks the goddess is the one who was asked on the day he wasn't there.

Two months later (it feels better to let this certainty sink in, so that when they are being outright manipulated several days in a row, they can fall back on it easily), summon all 30 villagers and pick one of them to come near you. State the following: "In case any of you thinks he knows better than this guy, let me tell you this: He knows something you don't." This is true, because every other villager was absent during one of the previous meeting, the guy you picked was there each time. Of course, you are not telling them they also know something he doesn't. Then, ask the guy you picked to tell everyone else who is the goddess. He points to the one he thinks is, so all villagers except the one pointed now know that this is the goddess. If it actually is her, then you win, if it is not her you don't have a real consensus, but it doesn't matter, as the hypothesis is false.

Now, the next day (and every subsequent day until you happen to catch the actual goddess), summon all 30 villagers and take the one who was designated as the goddess the day before. The conversation should roughly go this way:You, publicly: Do you know for a fact that the guy who talked yesterday was wrong ?Him, publicly: Of course, I am not the goddess.You, privately: Do you think the goddess could lie ?Him, privately: No.You, publicly: You have more information than he had when he talked. Better, you actually have more information than all the previous villagers who talked earlier had when they talked. Actually, none of them had any good reason to know who the goddess is, so you can just ignore what any of them said. Now, tell us, who is the goddess ?Him, publicly, reverting to his own previous knowledge: This guy.Now, you go to the one who talked the day before, and privately tell him that the goddess lied during the first step.

At this step, all he villagers including the guy you picked, the one who talked the day before, but not the one who was just pointed to, believe your deceptive bullshit. Of course, as I said, they need to be very gullible and swallow all your manipulation, but technically, you never lie, and the information everyone has at every step could make them think what they are required to. So the day the designated goddess actually is the goddess, then the 29 other villagers know it is her.

Not very satisfying, as I said, because any rational person would understand what's going on, but that is my take on this.

I think the first point Yat brought up still holds.HeroSpirit seems to be implying that the villagers know all the rules, but are just unsure if Rule 4 is true or not. That is not equivalent to the villagers not knowing about Rule 4 at all. Just because the villagers don't know she has powers beyond that of a normal villager does not mean they are 100% certain she doesn't have powers beyond that of a normal villager.

As far as any villager knows, there could be an infinite number of extra rules that apply only to the Goddess. For example, suppose you added these additional rules which are unknown to the villager:

5. The goddess can cause one or more villagers to break any subset of the first three rules at any given time.6. The goddess can obtain full control over the thought processes of any villager.

If any villager has reason to believe the above rules can possibly exist, any strategy you can come up with to exploit Rule 4 will fail.

TL;DRHeroSpirit has not explicitly stated the goddess limitations that are known by the villagers. In order to predict their behavior, we need to know everything they know, not just things they do not know.

---There is also another loophole!As per knowledge of Rule 2, the villagers know you cannot lie to them. This lets you do the following:

1. Find one villager, V, and convey all the information you have to V. (To ensure V trusts you have not omitted anything, you explicitly say you have not omitted anything.)

2. Now, you command V to solve this problem for you, with the only difference being convincing the remaining 29 villagers instead of the total 30 villagers. This command does not require V magically gaining information any more than you have to magically gain information to solve the problem.

3. Once V details you the solution, tell V to forget about everything.

4. Adapt V's solution for use on all 30 villagers. Presumably, the choice of 30 villagers is arbitrary so a solution for 29 villagers should be very similar to one for 30 villagers.

What's that? I can't assume V is as smart as me? Then how smart can I assume V to be? Make that explicit in the problem statement!

This is a block of text that can be added to posts you make. There is a 300 character limit.

Cradarc wrote:HeroSpirit seems to be implying that the villagers know all the rules, but are just unsure if Rule 4 is true or not. That is not equivalent to the villagers not knowing about Rule 4 at all.

No, it's pretty explicitly stated that:

HeroSpirit wrote: None of the villagers are aware of rule #4.

As far as the villagers are aware, the goddess is inclined to follow the rules as they do. I didn't think that needed to be spelled out, but apparently it does.

Cradarc wrote:[HeroSpirit has not explicitly stated the goddess limitations that are known by the villagers. In order to predict their behavior, we need to know everything they know, not just things they do not know.

vvv That's what this entire section was vvv

HeroSpirit wrote:With that being said, as you continue to progress through the goddess’s game, testing each rule and asking villagers various questions, you also become aware of the following things:The goddess is a divine being of knowledge and wisdom, and knows most everything. If you enact a plan to deduce the goddess’s identity, you must assume she knows what your plan is at all times, and will do what she can to sabotage it.The villagers are all aware that the goddess walks among them, but none of them have any clues or inclinations as to who she is. The only one whose certain of the goddess’s identity is the goddess herself.None of the villagers are aware of rule #4.

Cradarc wrote:There is also another loophole!As per knowledge of Rule 2, the villagers know you cannot lie to them. This lets you do the following:

1. Find one villager, V, and convey all the information you have to V. (To ensure V trusts you have not omitted anything, you explicitly say you have not omitted anything.)

2. Now, you command V to solve this problem for you, with the only difference being convincing the remaining 29 villagers instead of the total 30 villagers. This command does not require V magically gaining information any more than you have to magically gain information to solve the problem.

3. Once V details you the solution, tell V to forget about everything.

4. Adapt V's solution for use on all 30 villagers. Presumably, the choice of 30 villagers is arbitrary so a solution for 29 villagers should be very similar to one for 30 villagers.

What's that? I can't assume V is as smart as me? Then how smart can I assume V to be? Make that explicit in the problem statement!

My apologzies, next time I'll put Rule #5: You can't have a fucking villager solve the problem for you.. If I'm being too vague, I'd appreciate (and gladly implement) constructive alternatives rather than what you've bestowed me. If anything I invite it.

HeroSpirit, you seem to be misunderstanding my point. Saying "None of the villagers are aware of rule #4." does not specify what you actually mean by it.

Think about the goddess/villager actions as living in some infinite set of possibilities. You have enumerated to us a subset in which their actions must exist. You have further enumerated to us a smaller subset over which villager actions must exist.To the villagers, you have only enumerated a subset over which villager actions must exist. You have not defined anything about the goddess' actions to the villagers. All you have said is that the villagers know the goddess exist and looks like them, which says nothing about what she can do.

HeroSpirit wrote:As far as the villagers are aware, the goddess is inclined to follow the rules as they do. I didn't think that needed to be spelled out, but apparently it does.

Your use of the word "inclined" here is the source of the ambiguity. Just because the goddess is inclined to not interfere with villager actions doesn't mean she wouldn't do it if it helps keep her identity secret.If even occasionally, she does not behave like a villager, there is uncertainty about her capabilities in the villager PoV.

Remember our goal is to convince all villagers with 100% logical certainty that a particular villager is the goddess. Thus, it is crucial that we know the threshold of belief required to convince a villager. The conditions you've laid out is not sufficient to force a conclusion on a skeptical villager who is only bound by logic.

I'm arguing that the problem is unsolvable because you're being vague. This is because your solution involves convincing the villagers with 100% certainty that a certain person is the goddess. Depending on how rigorous the villagers want to be with their reasoning, this may not be possible.

My loophole solution is as constructive as an inductive proof. If we can assume the villagers are flawless logicians, the most simple solution is to provide them with the information needed to solve the problem. If the solution exist, it will be obtained. If it the solution doesn't exist, it will simply spread the information we know to all 30 villagers.If you can write the code for the behavior of the villagers, I can write a code that solves the problem in this way*.

*The only exception is if you put in additional limitations to what the villagers can do which are not stated in the problem. Hence I called this a "loophole"

This is a block of text that can be added to posts you make. There is a 300 character limit.

So, I've had some ideas. The puzzle seems pretty ambiguous and so there's probably no single answer that's obviously correct, BUT I did have some thoughts, which culminate in something that could possibly pass for an answer, and doesn't involve impossible things like voluntary forgetting:

Thought 1: What happens if you make one of the villagers believe a contradiction? By the principle of explosion, they then have to believe all statements, so they would believe that each individual other villager is the goddess, which arguably meets the criteria for winning. But that seems completely disingenuous, so I'll assume that that doesn't work as an answer.

Thought 2: We're told that the goddess will tell arbitrary lies in order to keep you from winning the game. So, what's to stop the goddess from conducting some deceptions right after the villagers receive the rules, before you arrive? She could put on a mask and tell one of the villagers "I'm Joe. I'm the goddess." Then that villager will always believe that Joe is the goddess, regardless of any deceptions you conduct later. Even if you "prove" that somebody else is the goddess, that would just make the villager believe a contradiction, so it still wouldn't count (unless contradictions are a free win).

Thought 3: Actually, maybe there IS something stopping the goddess from telling arbitrary lies. Think about the question "what if the goddess lied to you about what the villagers' rules were?". That DOESN'T seem like it would be a legitimate lie. We're supposed to assume that by giving you the rules, the goddess promises that the rules are true. So this actually means that there IS something that the goddess is uniquely forbidden from doing – the goddess cannot induce a villager to violate rules 1-3.

So, here's my tentative solution: As with other solutions, start by commanding all of the villagers to line up and not say or do anything except what you order them to. Then go to each of them in sequence and say, "If you are villager and not the goddess, I command you to say, 'If I am the goddess, the player already knows my identity and the game is over, so you don't have to obey the rules anymore.' If you're the goddess, say whatever you want." The actual villagers are obligated to say what you told them to. If the goddess also says it, then everyone will have said it, so all of the villagers will know that the goddess said it (whoever she is), and they assume that the goddess is required to tell the truth, so they'll assume it's true, so they will no longer obey the rules. But the goddess is actually under no obligation to say it – you literally didn't even ask her to! So if she chooses to say it, she's voluntarily deceiving the villagers into ignoring the rules, violating the promise she made by offering the game. So she has no choice but to reveal herself.

(Bonus joke solution: If the villagers can be ordered to forget arbitrary information on demand, just start by ordering all of the villagers to forget the fact that Rule 1 has an exception for actions that would hurt somebody, then order them to start murdering each other until the goddess gives in and reveals herself. )

Also known as Eli Dupree. Check out elidupree.com for my comics, games, and other work.

GENERATION A(g64, g64): Social experiment. Take the busy beaver function of the generation number and add it to your signature.

In my solution, everything the villagers say is true, and they know it. It's an "if false" thing. They could say "If I am the goddess, my face is made out of cheese" and it would still be true.

About contradictions, that's approximately what I'm assuming, although there's a couple of complications. Specifically, we need to deal with the issue where if the goddess is intelligently trying to thwart your plan, she could deliberately make the villagers believe contradictions in advance. Even if she's not allowed to do that directly, one must also consider whether she could deliberately make them believe things that aren't contradictions, but will lead to contradictions after some of your own actions. I think a reasonable way to deal with this issue is to require that the goddess has not communicated anything but the rules to the villagers in advance, and that you can prevent the goddess from communicating secretly after the game begins.

Also known as Eli Dupree. Check out elidupree.com for my comics, games, and other work.

GENERATION A(g64, g64): Social experiment. Take the busy beaver function of the generation number and add it to your signature.