Hacker News new | ask | show | jobs
by logicallee 4075 days ago
I don't know, can code like this reason about knowledge-about-knowledge in general?

For example, can a version of the code be used to solve the 'hardest puzzle' -

https://xkcd.com/blue_eyes.html

(solution: https://xkcd.com/solution.html) ?

3 comments

It can.

If you know someone else doesn't know, that just gives you more knowledge you yourself can use.

For the "hardest puzzle", on each day everyone learns that no one was able to figure out the solution the day before. Because of this, a person knows that for a possible number of blue-eyed people to be valid, a person who sees one less blue eyed person than that, must have been unable to figure it out on the previous day.

An Arc/Common Lisp solution I just wrote up: https://gist.github.com/malisper/80625bcda75c66780f81

I don't have Lisp, can you link to a pastebin e.g. at https://ideone.com/ that runs it?
I find the problems with puzzles like these is not the rules, but the ridiculously contrived situations. Why do these entities that function like inert logic gates have to be human? It means that the question has to have silly rule placed on silly rule in order to keep the contrived situation afloat. It means I end up thinking of ways for the mute, inert people to free themselves from the island (who is feeding them? Are there trees to build a raft? etc), rather than 'play by the rules'.
Sentient immortal mute beings of pure logic that do not possess the capability of traversing the ocean are people too!

I get your point. Still, it's hard to define the puzzle in terms of not-people. Maybe you could call them intelligent robots -- people might find it easier to picture mute robots with hats.

Not to be confused with the "Hardest Logic Puzzle Ever," about identifying a truth telling god, a lying god, and a random oracle, none of whom even speak your language.

http://en.wikipedia.org/wiki/The_Hardest_Logic_Puzzle_Ever