WORCESTER POLYTECHNIC INSTITUTE
CS4341 ❏ Artificial Intelligence
Version: Tue Apr 9 22:49:36 EDT 2013
PROJECT 2 - A Star with a Blinding Flash
This project is due on Fri 12 April 2013
This project demonstrates two applications of AI techniques using the landscape domain. The first is to use the A* search for sorting trucks. The second application is to use the Min-Conflicts heuristic.
Part 1: Truck Sorting
It is important for the vehicles in a convoy carrying building materials to be in the right order. If they arrive in the right order they can be unpacked in the right order, so that materials needed first can be piled up nearer to where they are to be used for construction. Unfortunately, the vehicles actually arrive in a random order, as they come from different suppliers.
As they arrive, trucks are given a number that indicates their correct position in the convoy, and are parked in the next available space in a fenced in compound. Parking space is very limited and security is important.
Assuming that there are only 8 trucks, after they all arrive they might look something like this:
while we actually want them in order so that the convoy can easily pull away from the parking area. i.e., it should look like this:
You need to determine how the trucks are to be moved inside the compound to put them in order. Trucks can only move into the open space. Moving a truck moves the open space to where the truck was. Trucks only move up and down, or left and right: i.e., no diagonal movements. They can't move outside the compound. Two trucks can't occupy the same space.
Using the A* algorithm, and some appropriate heuristic underestimate that can be used to help determine the quality of different possible truck moves, find the plan with the smallest number of moves that puts the trucks into the desired order.
Part 2: CCV Parking
Confusion causing vehicles (CCVs) give off a blinding flash with a lot of smoke and then disappear when they see another CCV. CCVs can see in straight lines in all eight movement directions. If one CCV can see another CCV we call it a "conflict", and run away quickly.
As you can imagine, parking them in a small space is a problem: after all, you want to save the confusion for others. We want to minimize the amount of space used.
Using eight CCVs, and the Min-Conflicts Heuristic, design a parking arrangement so that they can be parked in an 8 by 8 parking space in one corner of the landscape.
Don't worry about how they'll get to their designated position: they'll be dropped (very carefully) into position by a helicopter.
Start with an initial, random, complete assignment of one CCV to each "row" of the parking space. At any point in the problem-solving, if there are no conflicts, then report a solution. If there are conflicts then randomly pick a conflicted CCV, and move it in its row to a position that minimizes its conflicts. If more than one position is the minimum then select randomly. Zero conflicts is better than 1 conflict, 1 conflict is better than 2 conflicts, etc.
Repeat the process until a solution is found or until some maximum number of tries has been reached. Report the solution.
Develop your program for the NxN case, and use a constant to specialize it to work in the 8x8 case. Clearly other sizes would be useful for testing.
To fully show the capabilities of your two algorithms include several test runs with different initial situations. For two of the key runs in part 1, and two in part 2, a clear, self-explanatory "demonstration" must be provided, not just the initial input and the answer.
Projects must be completed by the start of class on the due date.
You must submit:
How to submit: