180 likes | 230 Views
MA/CS 375. Fall 2002 Lecture 37. Chase Project. Ok – you mastered the route planning project. In math terminology you created a function minimizer which managed to deal and escape from local minima. Project – Part 2. Now we are going to get competitive
E N D
MA/CS 375 Fall 2002 Lecture 37
Chase Project • Ok – you mastered the route planning project. • In math terminology you created a function minimizer which managed to deal and escape from local minima.
Project – Part 2 • Now we are going to get competitive • You are free to team up with whoever you want (i.e. find three people you have worked best with). • You are free to swap algorithms from Part 1 with other groups. The only acceptable currency is Part 1 code.
Project Goal • Write two algorithms: • chase a moving pixel • escape a moving pixel
Mazes • Given an image, create the binary image as in Part 1
The Pixies • Good Pixie is on the run from Evil Pixie. • Evil Pixie wants to catch Good Pixie. • Both Pixies can move one pixel at a time in the N, E, S and W directions. • The Pixies can not travel within 4 pixels of the obstacles. • Each Pixie knows where the other Pixie is after every move.
Pixie The Pixies can move in any of 4 directions
Pursuit Algorithm • You controlEvil Pixie • Find the best N, E, S or W pixel for EP to occupy which moves EP closer to GP. • EP can not move closer than four pixels from an obstacle.
Escape Algorithm • You controlGood Pixie • Find the best N, E, S or W pixel for GP to occupy which moves GP further away from EP. • GP can not move closer than four pixels from an obstacle.
Run away !! Gonna get you !!
Strategies • Create and implement a set of strategies. • Identify the way you think the other Pixie will travel and adjust your route planning accordingly. • Use the route planning algorithms from Part 1 to cope with the obstacles.
Run away !! GP EP Gonna get you !!
Competition • On 11/25/02 be ready to compete. • We will run a tournament. • Each match up will consist of two rounds, one with your team as EP and one as GP. • Teams will be disqualified if their code takes too long (time limits to be determined).
Function Interface (Escape) • Create a function GPmove with syntax: [newGPX,newGPY] = GPmove(oldGPX, oldGPY, oldEPX, oldEPY, maze) where maze is the binary image denoting 0 for path and 1 for obstacle. newGPX, newGPY, oldGPX, oldGPY, oldEPX, oldEPY are all scalars.
Function Interface (Pursuit) • Create a function EPmove with syntax: [newEPX,newEPY] = EPmove(oldGPX, oldGPY, oldEPX, oldEPY, maze) where maze is the binary image denoting 0 for path and 1 for obstacle. newGPX, newGPY, oldGPX, oldGPY, oldEPX, oldEPY are all scalars.
Do Some Research • http://www.dean.usma.edu/math/pubs/mmm99/DDS2.HTM • http://www-hydra.stanford.edu/~bnayfeh/mazealgo.html • http://www.gamedev.net/reference/design/features/prac_ai_2/page3.asp • Seek out pursuit and escape algorithms and be creative. • Go on the internet…. find something to give you an edge.
Test + Report • Test your algorithms (at least one on a very complicated image) !!. • Create ONE group report in the usual format. • Name all group members on the front page.
Extra Credit • Create a third function which moves multiple Evil Pixies to work as a team.