Skip to main content
added 208 characters in body
Source Link

So note there are multiple potentialThe 36 108 solution matches that of the answers in the Question sources. But indeed the tree-search code above was able to find additional solutions, not just onementioned in the sources. I was able to manually check 54 90 and 32 112 solution to confirm their validity.

So note there are multiple potential answers, not just one.

The 36 108 solution matches that of the answers in the Question sources. But indeed the tree-search code above was able to find additional solutions, not mentioned in the sources. I was able to manually check 54 90 and 32 112 solution to confirm their validity.

deleted 42 characters in body
Source Link
bobble
  • 10.6k
  • 4
  • 34
  • 86

Looking for feedback/validation!!!

I wrote an exhaustive search script with the following pythonPython code:

Exhaustive search of candidate (A,B,C) pairs are passed to a validator solve function, which returns all potential valid hats assuming n rounds have elapsed, and all previous rounds have produced I don't know"I don't know" answers.

Looking for feedback/validation!!!

I wrote an exhaustive search script with the following python code:

Exhaustive search of candidate (A,B,C) pairs are passed to a validator solve function, which returns all potential valid hats assuming n rounds have elapsed, and all previous rounds have produced I don't know answers.

I wrote an exhaustive search script with the following Python code:

Exhaustive search of candidate (A,B,C) pairs are passed to a validator solve function, which returns all potential valid hats assuming n rounds have elapsed, and all previous rounds have produced "I don't know" answers.

added 921 characters in body
Source Link

The spirit

Every round, the current guesser needs to decide between two potential candidate-answers for themselves: a + b or |a - b|. If only one of the candidates is valid (i.e, positive integer), then the player can answer immediately with the only remaining candidate.

Otherwise, the current guesser must recall all prior rounds, and simulate the conclusions drawn by the previous players on their turns (including themselves from 3 rounds ago!!!). This is akin to a tree search, where a leaf node is pruned if a prior round would have deemed that candidate impossible. In turn, the player would then deduce that that entire half of the search tree is invalid, and must conclude that the other candidate is the valid one. If no leaf-pruning is possible across all rounds, then the player cannot determine their number and must pass.

The code

The code assumes we are on round 6 for person C.

Exhaustive search of candidate (aA,bB,cC) pairs are passed to a validator solve function, which returns all potential valid hats assuming n rounds have elapsed, and all previous rounds have produced I don't know answers.

Exhaustive search of candidate (a,b,c) pairs are passed to a validator solve function, which returns all potential valid hats assuming n rounds have elapsed, and all previous rounds have produced I don't know answers.

The spirit

Every round, the current guesser needs to decide between two potential candidate-answers for themselves: a + b or |a - b|. If only one of the candidates is valid (i.e, positive integer), then the player can answer immediately with the only remaining candidate.

Otherwise, the current guesser must recall all prior rounds, and simulate the conclusions drawn by the previous players on their turns (including themselves from 3 rounds ago!!!). This is akin to a tree search, where a leaf node is pruned if a prior round would have deemed that candidate impossible. In turn, the player would then deduce that that entire half of the search tree is invalid, and must conclude that the other candidate is the valid one. If no leaf-pruning is possible across all rounds, then the player cannot determine their number and must pass.

The code

The code assumes we are on round 6 for person C.

Exhaustive search of candidate (A,B,C) pairs are passed to a validator solve function, which returns all potential valid hats assuming n rounds have elapsed, and all previous rounds have produced I don't know answers.

added 64 characters in body
Source Link
Loading
Source Link
Loading