Skip to content

Implementation of a solution to the Towers of Hanoi puzzle in Prolog.

Notifications You must be signed in to change notification settings

akispapapanagiotou/towers-of-hanoi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Towers of Hanoi

This code implements a solution to the Towers of Hanoi puzzle using Prolog. The Towers of Hanoi is a classic problem that involves moving a stack of disks of different sizes from one peg to another, following certain rules:

  • Only one disk can be moved at a time.
  • Each move consists of taking the upper disk from one of the pegs and placing it on top of another peg or on an empty peg.
  • No disk may be placed on top of a smaller disk.

Overall, this code provides a simple implementation of the Towers of Hanoi problem in Prolog. However, it only allows moves to be made one at a time and does not provide a way to automate the solution.

Built with:

  • Prolog
  • SWI-Prolog

Releases

No releases published

Packages

No packages published

Languages