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
- There are five houses.
- The Introvert lives in the red house.
- The Extrovert owns the dog.
- Coffee is drunk in the green house.
- The Optimist drinks tea.
- The green house is immediately to the right of the ivory house.
- The Painting enthusiast owns snails.
- Reading happens in the yellow house.
- Milk is drunk in the middle house.
- The Pessimist lives in the first house.
- Gardening happens next to the house with the fox.
- Reading happens next to the house with the horse.
- The Cooking enthusiast drinks orange juice.
- The Realist enjoys Fishing.
- 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