Project 3: Use A* Path Planning to find shortest path
Collaboration Policy - Read carefully you must work on this project individually, you may discuss this assignment with other students in the class and ask and provide help in useful ways, preferable over our email list so we can all benefit from your great ideas. You may consult (but not copy) any outside resources you including books, papers, web sites and people. If you use resources other than the class materials, indicate / cite what you used along with your answer.
Assignment Day : | Thursday April 03, 2017 |
Due Date & Demo
|
Before Class April 18, 2017 Demonstrate on laptop in class, you must attend class, if you feel there may be a conflict, you will need to schedule your demo at an earlier date (i.e., Wednesday). |
Objectives & Requirement
The purpose of this assignment is to highlight use of a path planning that is often uses in game environments. In this particular assignment you will generate an animation of Patrick Lester's tutorial on A* star for beginners.
The tutorial depicts a 2D gridded environment with a starting position (green), and an ending position (in red). The goal is to find a shortest path from A to B. You assignment is to create an animation showing the progress the algorithm.
In your animation you should add to the user interfac and enhance the visuals of the A* algorithm. A goal should be present a clean, and easy to understand (and use) visual depicting how A* works.
At the start, your animation should display a default map, a grid, source and target. You should provide primites to start the animation of the computions of A*. Change teh map, move the target, and the goal positons. You should show the progress of the algorithm as it explores neighboring tiles from the sourc towards the goal by animating incrementally the change of the values of F, G and H. The tiles should show the direction to its parent just like we will did in class (on the board).
The final display should show the tiles with all the values of the functions in A*, and the final path highlighted or drawn (see the image depicting the end environment further below). You should also indicate with a number, the number of the 'shortest' path found by A* (note if you use Manhattan distance, you may not have found the shortest path).
Here is an example begin environment (except it is missing some tiles, see the end environment for the missing tiles (you may choose a different color theme if you like).
Here is an example end environment that also depicts the 'shortest' path highlighted in yellow using the manhattan distance.
Minimal requirements are (75 pts worth):
- You may use one of four Game Platforms listed below:
- HTML5/Canvas
- Unity
- ImpactJS (preferred)
- (Not Python).
- Animation of the tutorial below by Patrick Lester
- Starting Environment, you may use a text file, or a dialog to create your your inital environment. An initial environment conists of start position, end position (goal), and obstacles.
- File: Your animating should be able read in different text files describing obstacles and traversible space, obstacles should be denoted by 'o' and traversible terrain should be denoted by 'e' for empty (tiles). Example text file of the above environment. You may enable your animation to read in a text file via a dialog or you can specify the file on the command line.
eeeeeeee
eeeeoeee
eeeeoeee
eeeeoeee
eeeeeeee
eeeeeeee - Dialog: You should be able to create different size environments, or grid dimensions, and interactively place the start and end (goal) positions, and draw the obstacles.
- File: Your animating should be able read in different text files describing obstacles and traversible space, obstacles should be denoted by 'o' and traversible terrain should be denoted by 'e' for empty (tiles). Example text file of the above environment. You may enable your animation to read in a text file via a dialog or you can specify the file on the command line.
- Include a button (or dial) to speed up or slow the animation so you can see how the functions in A star are computed (and the order values in a grid cell are computed). At the slowest speed the user should be able to simpley step through the animation.
- In your final frame of the animation you should draw the final path and you should also depict the length of the path with a number (number of steps).
- Look at grade criteria for addional details on grading.
- Make your implementation game like, or even a game that includes A*. Artistically create tiles, and sprites.
- Expectations: It is expected that you make good programming design decisions. Your code should also be well documented.
- Goal: make your project look good, make it easy to use, and make your animation easy to understand.
Minimum Size: You sould at least make sure you can support a 200 cell, gridded environment, or smaller. Of-course better if you can support a larger environmnet.
Below are ideas on embellishments to improve your grade to an A. Getting from a 75 to a 100 is based on effort. In your Grading.txt file you may argue how you achieved an 100 (or above!). Example embellishements:- Compare A* with D* (with visuals) up to 15 pts
- Compare against a rapidly exploring random tree (RRT) (wikipedia) (youtube) up to 25 pts
- Compare against Dijkstra's algorithm up to 5 pts
- Experiment with different Heuristic Functions (5 pts each, up to 15 pts with visuals.
- Embelish the interface (graded on effort).
- Provide for a large environment with an interesting terrain (above the minimum support of 500 cells):
- e.g., 150 x 100, note that in this case font size may restrict displaying F, G, and H value, so stop displaying them when they become unreadable.
- Provide for different shaped tiles? e.g. octagons.
- MAX :115 points but sadly we will need to top off the max score at 110 pts.
Submission:
(for the below you may change the extension .txt if not plain text e.g., .doc, .pdf)
GRADING.txt: A description on how you met the grading rubric (see below table). You may copy paste these from REPORT.txt.
Example maps : at least 3 example map files should be included. One should be the map from the tutorial. THe map should not include source and destination.
REPORT.txt (or .pdf or .doc) should include minimally:
A description of what you did, how it works, screenshots and discussion on results.
README.txt should includelist of files required to run your game, and how to get your code up and running (e.g., HTML5 file, CSS file - if separate, and image files needed).
Grading Rubrics
Out of 100 points, get 75 from basics, and you can pick your own embellishments.
Basic Threshold 75 pts. | |
Total: | 75 |
Begin Default Map (3 defaults) | 2 |
Final Values F(x), H(x), and G(x) | 6 |
Final Path Drawn | 2 |
Final Length & #Steps Displayed | 2 |
Efficency Smooth Anim | 2 |
Contral Speed of Animation | 2 |
At Least Size of 500 cells support (size configurable) | 4 |
Configurable Environmental Obstacles placement | 4 |
Goal (x,y) Configurable placement | 3 |
Start (x, y) Configurable placement | 3 |
Provide a Stepped Speed | 4 |
Report w/ screen shots or Video | 6 |
Quality Craftmanship | 6 |
Grading.txt | 4 |
3 Tests for Correctness | 3 |
Readme.txt | 2 |
Demo (MH) + Q/A + youtube video (quality) | 10 |
Game like look (you'll need to craft Sprites & Tiles) | 10 |
Not present at demo - will be an automatic 10% deduction.
Not youtube video- will be an automatic 10% deduction.
Possible Embellishments | |
Unreal | 25 |
Comp to D* | 25 |
Comp to RRT | 25 |
Comp to Dijkstra | 5 |
Comp to Best First | 5 |
Diff ( Heuristic(each 5) (up to 15) | 15 |
Large Environ ment more than1K cells | 10 |
Different Shaped Tiles (e.g., Octagons) | 10 |
Other (based on level of effort) you can propose something | ? |