Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Solver for the Potion Riddle

A Prolog program to solve Snape's potion puzzle from the first Harry Potter book.

I used the SWI-Prolog environment during the implementation.

Usage

  1. Ensure SWI-Prolog is installed. SWI-Prolog is a package on most major Linux distributions.
  2. Run swipl -f main.pl
  3. Get the solution
?- solution(X).
X = [poison, wine, ahead, poison, poison, wine, back] .

Notes

As solving the riddle relies on seeing the bottles, and the book doesn't disclose enough information, this solver relies on the drawing included in the Pottermore game.

Illustration from Pottermore/StackExchange

About

Solver for Snape's potion riddle in Prolog

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages