[Community Puzzle] Haunted Manor

The in.nextLine(); in line 28 seams to be to much …

The 7x7 validator has a room that is not visible from any of the outside views. That may be what is biting you?

  • danBhentschel

No it’s not, I tested it with a 3x3 custom test.

Though maybe if this specific room is near the top-left corner (or worse, if there are several such rooms), it could make my code slower than needed. I’ll look into it and try to add some heuristics.

Hello, thanks for pointing this out, it will be corrected shortly.

Also, thanks to everybody who is taking an interest in this puzzle of mine :grin:
I had no idea I’d introduced a new concept in my 7x7 validator :frowning: maybe I should add a testcase.
I can help you solve it if you PM me no problem.

Julien

Ok, I don’t know if you changed the validator (there’s no history for community puzzles), but now it passes.

For those interested, what I changed is that I made my code precompute the list of empty rooms instead of looping over the grid and just skipping mirror rooms. It must have given a minor-but-sufficient speed-up.

Thanks for the help guys!

FYI, for anyone who finds themselves in this discussion, I have added a new test case to this puzzle to hopefully help people through Validator #4. See Community puzzle challenge #1 - Haunted Manor.

  • danBhentschel

I tried to solve it by brute-force as well and found out that if I change the order in which I try to brute-forse then a different vallidatar fails (77, another 77 or both). So is it possible that hidden room should be filled with specific order?

If your brute force solution starts with the solution, you’re lucky.

My solution pass the 77 and another 77 without problem but not the 44 and the 55.
I don’t want to make bruteforce.
Anyone as an idea?

Could anyone explain the example given in the puzzle?

0 4 2
3
0 0 0
3 3 2
0 1 3
2 1 3

Why the second line “332” was not “442”? By the mirrors at the top I should be able to see “ZGGZ” in the first two windows from the bottom.
Thanks

Ghosts aren’t visible directly, so you can’t see the one before the mirror. You see Z.GZ from the bottom (where . is an empty room as you can’t see the ghost in it)

Oh I got it. Now it is very clear. Thanks Robo
I did not have enough experience with ghost and monsters to comprehend it immediately :open_mouth:
Need trying it on paper seriously before coding.

Or try this:

https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/undead.html

  • danBhentschel
1 Like

Wow! Handy puzzle to play at anywhere. Thanks One

And here’s links to the specific test cases from the puzzle:

3x3 manor
4x4 manor
5x5 manor
7x7 manor
another 7x7 manor
Not much of a manor - Not supported

  • danBhentschel

He also proposes the Bridges puzzle.

Casually reviving this thread to say I had a blast with this puzzle. It’s a lot harder than what I thought initially, but that’s part of the fun :slight_smile:

1 Like

Great puzzle!
But there is one problem with the description.
What is actually given is the number of times we see monsters, not how many monsters we see.
In a situation
/\
\Z

I was tring to solve the puzzle based on the fact that we see one monster.
/\
\Z 1

But the creators give data that we see the monster twice.
/\
\Z 2

Significant difference. :slight_smile:

7x7 manors are cases with this problem.
First 7x7 manor have
/ V \
GGG
\ V Z \
0 3 3 4
Zombie counted two times.

Nice puzzle but it’s so frustrating being denied by a validator (the 4th) while passing all the tests.
I’ve read the threads about it and I still can’t figure out what’s wrong…