# Assignment One: Prolog

The evil lord CQbOL has returned from centuries of sleep, and darkness has descended over the land. His army of 10,000 minions are donning their armor and sharpening their blades. Fortunately, it's already 2014, and swords have been obsolete for more than 1000 years. Your group of hard-boiled mercenaries with a shady past have been tasked with handling this self-proclaimed lord of darkness using advanced modern technology. You have already found out the floor plan. Your job is to guide the infiltration team by finding a path to the dungeon lord's throne room. So far, everything is going according to plan. ...

Goals:
• Find a path from the beginning of the maze to the end
• Display the list of rooms on the path
• Display the length of the path (number of rooms)
Maze:
• The maze will be given as a 2 dimensional array of 1s and 0s.
• A 0 represent a walkable room, while a 1 is a wall.
• Your code should take a predicate in the form of a list of lists:
```        maze([[0, 0, 0, 0],
[0, 1, 1, 0],
[0, 1, 0, 0],
[0, 1, 0, 1],
[0, 0, 0, 0]]).```
This will encode the given maze. (The actual array will be different).
• Your code should work for any given start and end room in the maze.
• It should take specifications of rooms as (x,y) coordinates.
• You should have a predicate
`	mazepath(X1,Y1,X2,Y2,Maze,Path) `
that instantiates Path to a path from (X1,Y1) to (X2,Y2) in Maze.
• Even given an unsolvable maze, your code should still terminate; however you don't need to display anything in that case.
To Hand In:
• Well documented Prolog code;
• a description of how the code works, including the maze representation and your pathfinding algorithm;
• a brief statement of what you learned.