Choosing Packages

In this assignment, we will try to adapt the knapsack algorithm from last week's assignment to our game. Here are the beginnings of the solution specifying the type of packages and robots from the game. Your job is to write the function decide_action.

For this assignment choose a simple function to compute the cost associated with each package based on the current location of the robot, the home location of the package and its weight. In the next few assignments we will refine this function. Remember that the goal of the game is to maximize the number of packages delivered and the weight of each package deliverd. Hence very heavy packages that are to be delivered to very close locations should have the highest costs in the knapsack algorithm.