proj2c.dist - CS51 Project 2c: Dead or Alive Due: Friday,...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS51 Project 2c: Dead or Alive Due: Friday, April 24th 2009 at 4:59 PM Total Points: 51 (including 10 style points) 1 Assignment Overview In this portion of the assignment, you will develop strategies for a simple game. In the game, there are two types of agents: there are missile agents that try to catch the other agents in the game and fleeing agents that are attempting to reach a safe spot on the graph while avoiding the missile targeting it. 2 Introduction to the World Again we have given you some code to initialize an engine with the game rules for this week. If you run proj2c.scm after downloading it you should see a graph appear with several agents. When you hit step , several more agents will appear. Some of these agents are missiles (the faster agents), and are labelled with the id of the agent they are targeting. The other agents are the fleeing agents, and they must attempt to reach the safe zone in the graph, represented by the yellow node. The game is over when all of the fleeing agents have either been destroyed (hit by the particular missile targeting them) or have reached a safe spot. The game will also end if more than 20 time steps have passed. When the game ends, the game begins anew with newly chosen nodes for the safe-spot and the missile spawning point. Note that, at the start of a game it is possible for missile agents or the safe zone to appear on top of a node already occupied by a fleeing agent. In this case, you may see fewer agents on the board. Your job will be to implement the code for both the missiles and the fleeing agents. We will do this using a dynamic programming algorithm. 1 4 APPLYING MEMOIZATION TO OUR GAME CS51 Project 2c: Dead or Alive 3 Game Theory Redux: Memoization Recall from class that we talked about dynamic programming in the context of fitting multiple lines to a set of points. As mentioned in lecture, Dijkstras algorithm is another example of a dynamic programming algorithm. It turns that dynamic programming is a very general tool that is often used to solve complicated programming problems very efficiently. Well explore ideas similar to dynamic programming for solving this game. Unfortunately, even with these tools at our disposal, the solution to this game will still be quite expensive computationally. Lets first review the basic tenents of dynamic programming. There are several compo- nents to a problem that make it amenable to dynamic programming. The most essential component is that the the solution to the overall problem should be computable by decom- posing the problem into smaller sub-problems and optimally solving them. For example, one can find the shortest path to a node on a graph by first finding the optimal shortest path to nodes adjacent to it and then choosing the one with the smallest overall shortest path....
View Full Document

Page1 / 6

proj2c.dist - CS51 Project 2c: Dead or Alive Due: Friday,...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online