CP 468 Wilfrid Laurier University Maze Program in Python Project

AI CP468 AssignmentsWrite a program in PROLOG (you can use another language, however if you use Prolog you will get 1% bonus)
to solve the following maze problem.
Here is part of the file that you will consult:
mazeSize(5, 9).
barrier(1, 8).
barrier(2, 2).
which represents the following maze:
barrier(2, 4).
1
2 3 4
5
6
7
barrier(2, 5).
1
barrier(3, 4).
End1
2
1
1
1
barrier(3, 7).
barrier(3, 9).
3 begin
1
1
barrier(4, 4).
4
1
1
barrier(4, 7).
5
1
barrier(4, 9).
barrier(5, 2).
8
1
9
1
1
End2
Your task is to write a predicate solve (From, To, Path) which, given locations From and To, finds a Path going
from From to To. From and To are given as two element lists, and Path should be a list of two-element lists.
The first element of Path should be From, and the last element should be To. Moves can be made horizontally
or vertically, but not diagonally.
For example, solve([3,1], [2,6], [[3,1], [3,2], [3,3], [2,3], [1,3], [1,4], [1,5], [1,6], [2,6]]). This means; To move
from [3,1] to [2,6] a solution as a list is [[3,1], [3,2], [3,3], [2,3], [1,3], [1,4], [1,5], [1,6], [2,6]]).
There are many solutions, you do not have to come with the optimal solution.
Run your program for [3,1] to [2,6] and for [3,1] to [5,9] and include them in your report (take a screen shot).
1

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER