Want to learn and master Prolog?

Join Exercism’s Prolog Track for access to 104 exercises with automatic analysis of your code and personal mentoring, all 100% free.

Explore exercises

About Prolog

Key Features of Prolog



SWI-Prolog offers a comprehensive set of built-in predicates, covering many established standards.


A single language element, called a clause, is the basis of all prolog relations and programs.


Prolog focuses on what holds true about solutions, rather than how it is implemented.


Prolog is based on the rules of logic, with execution being a form of logical resolution.


Prolog programs are also valid prolog terms, programs can interact with other prolog programs.


Implementations exist for Unix/Linux, Windows, MacOS platforms with targets to WebAssembly (WASM).

Get mentored the Prolog way

Every language has its own way of doing things. Prolog is no different. Our mentors will help you learn to think like a Prolog developer and how to write idiomatic code in Prolog. Once you've solved an exercise, submit it to our volunteer team, and they'll give you hints, ideas, and feedback on how to make it feel more like what you'd normally see in Prolog - they'll help you discover the things you don't know that you don't know.

Learn more about mentoring

Community-sourced Prolog exercises

The Prolog track on Exercism has 104 exercises to help you write better code. Discover new exercises as you progress and get engrossed in learning new concepts and improving the way you currently write.

See all Prolog exercises

Get started with the Prolog track

The best part, it’s 100% free for everyone.