Puzzle 002

A five-house logic puzzle (personalities & hobbies) — the clues, the answer, and a debug view of how the backend solves it.

The puzzle

  1. There are five houses.
  2. The Introvert lives in the red house.
  3. The Extrovert owns the dog.
  4. Coffee is drunk in the green house.
  5. The Optimist drinks tea.
  6. The green house is immediately to the right of the ivory house.
  7. The Painting enthusiast owns snails.
  8. Reading happens in the yellow house.
  9. Milk is drunk in the middle house.
  10. The Pessimist lives in the first house.
  11. Gardening happens next to the house with the fox.
  12. Reading happens next to the house with the horse.
  13. The Cooking enthusiast drinks orange juice.
  14. The Realist enjoys Fishing.
  15. The Pessimist lives next to the blue house.

Who drinks water? Who owns the zebra?

The answer

House 1 2 3 4 5
Personality Pessimist Optimist Introvert Extrovert Realist
Color Yellow Blue Red Ivory Green
Drink Water Tea Milk Orange juice Coffee
Hobby Reading Gardening Painting Cooking Fishing
Pet Fox Horse Snails Dog Zebra

The Pessimist drinks water. The Realist owns the zebra.

Advanced — debug (how the BE solves it)

Column legend — each column A1…E5 is one property; its value is the house sequence (1–5) that property occupies.

A Personality A1 Introvert · A2 Extrovert · A3 Optimist · A4 Pessimist · A5 Realist
B Color B1 Red · B2 Green · B3 Ivory · B4 Yellow · B5 Blue
C Drink C1 Coffee · C2 Tea · C3 Milk · C4 Orange juice · C5 Water
D Hobby D1 Painting · D2 Reading · D3 Gardening · D4 Cooking · D5 Fishing
E Pet E1 Dog · E2 Snails · E3 Fox · E4 Horse · E5 Zebra

These predicates are posted to the secured BE, which solves the puzzle and returns the count + sample arrangements (lab-v2 style).

Request — predicates sent to the BE

Response — JSON