%% %% riverpuzzle.pl (hw #9, problem 3) %% %% Author: %% %% Comments: %% % some "nice" prolog settings... see assignment 8's % description for the details on what these do % -- but it's not crucial to know the details of these Prolog internals :- set_prolog_flag( prompt_alternatives_on, groundness ). :- set_prolog_flag(toplevel_print_options, [quoted(true), portray(true), attributes(portray), max_depth(999), priority(699)]). %% A good place to start is with the %% towers-of-hanoi example code covered in class %% (and provided from the website) %% This problem can take advantage of % % assert and retract % % After solving, you will need to use retractall( marked(_) ) % -- or its equivalent -- in order to "clean the slate" for % using this to solve subsequent instances of the problem... % Here, we declare marked to be a 1-argument dynamic predicate: :- dynamic marked/1.