%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % Initial State Final State % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 11 % 12 12 % 11 9 % 6 3 % 3 4 % 5 10 2 % 4 7 7 6 % 2 8 5 1 % 9 1 8 10 % ======================= ====================== % 13 14 15 16 17 13 14 15 16 17 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% initially(9,13,0). initially(2,9,0). initially(4,2,0). initially(5,4,0). initially(1,16,0). initially(8,1,0). initially(7,8,0). initially(10,7,0). initially(3,10,0). initially(6,3,0). initially(11,6,0). initially(12,11,0). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Query: % % T :: 1..30, cputime(X), % aclp_solve(planning([on(8, 15, T),on(5, 8, T), on(7, 5, T), % on(10, 17, T), on(1, 10, T), on(6, 1, T), % on(2, 6, T), % on(4, 2, T), on(3, 4,T),on(9,3,T),on(12,9,T), % on(11,12,T)])), % cputime(Y), CPUTIME is Y - X. % % % % Answer (for Total Positions = 17): % ---------------------------------- % % T (Total Moves)= 20 % % Solution = [move(11, 12, 20), not_moved(11, 20, 20), move(11, 7, 18), % move(12, 9, 19), not_moved(12, 19, 20), move(9, 3, 17), not_moved(9, 17, 20), % move(3, 4, 16), not_moved(3, 16, 20), move(4, 2, 15), not_moved(4, 15, 20), % move(4, 3, 13), move(2, 6, 14), not_moved(2, 14, 20), move(3, 7, 11), % move(6, 1, 12), not_moved(6, 12, 20), move(1, 10, 10), not_moved(1, 10, 20), % not_moved(10, 5, 20), move(7, 5, 9), not_moved(7, 9, 20), move(5, 8, 8), % not_moved(5, 8, 20), move(12, 14, 1), move(11, 12, 2), move(6, 11, 3), % move(3, 6, 4), move(10, 17, 5), move(7, 3, 6), move(8, 15, 7), % not_moved(8, 7, 20)] % % CPUTIME = 69.28 (secs) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % Initial State Final State % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 11 % 12 12 % 11 9 % 6 3 % 3 4 % 5 10 2 % 4 7 7 6 % 2 8 5 1 % 9 1 8 10 % =================== ====================== % 13 14 15 16 13 14 15 16 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % initially(9,13,0). % initially(2,9,0). % initially(4,2,0). % initially(5,4,0). % % initially(1,14,0). % initially(8,1,0). % initially(7,8,0). % initially(10,7,0). % initially(3,10,0). % initially(6,3,0). % initially(11,6,0). % initially(12,11,0). % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Query 1 : % % T :: 1..30, cputime(X), % aclp_solve(planning([on(10, 16, T), on(1, 10, T), % on(6, 1, T), on(2, 6, T), % on(4, 2, T), on(3, 4,T),on(9,3,T),on(12,9,T),on(11,12,T), % on(8, 15, T),on(5, 8, T), on(7, 5, T)])), % cputime(Y), CPUTIME is Y - X. % % % % Answer (for Total Positions = 16): % ---------------------------------- % T (Total moves) = 24 % % Solution = [move(7, 5, 24), not_moved(7, 24, 24), move(5, 8, 23), % not_moved(5, 23, 24), move(7, 11, 21), move(8, 15, 22), not_moved(8, 22, 24), % move(11, 12, 20), not_moved(11, 20, 24), move(11, 7, 18), move(12, 9, 19), % not_moved(12, 19, 24), move(9, 3, 17), not_moved(9, 17, 24), move(8, 5, 14), % move(7, 8, 15), move(3, 4, 16), not_moved(3, 16, 24), move(4, 2, 13), % not_moved(4, 13, 24), move(5, 14, 10), move(4, 5, 11), move(2, 6, 12), % not_moved(2, 12, 24), move(6, 1, 9), not_moved(6, 9, 24), move(7, 3, 6), % move(8, 7, 7), move(1, 10, 8), not_moved(1, 8, 24), move(12, 15, 1), % move(11, 12, 2), move(6, 5, 3), move(3, 11, 4), move(10, 16, 5), % not_moved(10, 5, 24)] % % CPUTIME = 186.3 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Query 2 : % % T :: 1..30, cputime(X), % aclp_solve(planning([on(8, 15, T),on(5, 8, T), on(7, 5, T), % on(10, 16, T), on(1, 10, T), on(6, 1, T), on(2, 6, T), % on(4, 2, T), on(3, 4,T),on(9,3,T),on(12,9,T),on(11,12,T)])), % cputime(Y), CPUTIME is Y - X. % % % % Answer (for Total Positions = 16): % ---------------------------------- % T (Total moves) = 27 % % Solution = [move(11, 12, 27), not_moved(11, 27, 27), move(11, 7, 25), % move(12, 9, 26), not_moved(12, 26, 27), move(9, 3, 24), not_moved(9, 24, 27), % move(12, 14, 21), move(11, 12, 22), move(3, 4, 23), not_moved(3, 23, 27), % move(4, 2, 20), not_moved(4, 20, 27), move(4, 12, 18), move(2, 6, 19), % not_moved(2, 19, 27), move(6, 1, 17), not_moved(6, 17, 27), move(1, 10, 16), % not_moved(1, 16, 27), move(10, 1, 10), move(3, 7, 11), move(6, 4, 12), % move(11, 3, 13), move(12, 11, 14), move(10, 16, 15), not_moved(10, 15, 27), % move(7, 5, 9), not_moved(7, 9, 27), move(5, 8, 8), not_moved(5, 8, 27), % move(12, 16, 1), move(11, 12, 2), move(6, 11, 3), move(3, 6, 4), % move(10, 3, 5), move(7, 10, 6), move(8, 15, 7), not_moved(8, 7, 27)]" % % CPUTIME = 195.92 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%