1. Homepage
  2. Programming
  3. CS 7638: Artificial Intelligence for Robotics: Warehouse Project

CS 7638: Artificial Intelligence for Robotics: Warehouse Project

Engage in a Conversation
GaTechCS 7638Artificial Intelligence for RoboticsWarehouse ProjectPython

CS 7638: Artificial Intelligence for Robotics CourseNana.COM

Warehouse Project - Fall 2023 - Deadline: Monday November 13th, Midnight AOE CourseNana.COM

Introduction CourseNana.COM

In this project, you will implement search algorithms to navigate a robot through a warehouse to pick up and deliver boxes to a designated drop zone area. The template code provides 3 classes, one for each part of the project: DeliveryPlanner_Part[A, B, C] CourseNana.COM

You may share code between part A, B, and C
Your submission will consist of a single file: warehouse.py CourseNana.COM

Grading CourseNana.COM

The weighting for each part is: PartA=40% CourseNana.COM

PartB=40% CourseNana.COM

PartC=20%
Within each part, each test case is equally weighted. CourseNana.COM

Part A (40%) CourseNana.COM

Your task is to pick up and deliver all boxes listed in the todo list. You will do this by providing a list of motions that the testing suite will execute in order to complete all the deliveries. Your algorithm should determine the best path to take when completing this task. CourseNana.COM

DeliveryPlanner_PartA's constructor must take five arguments: self, warehouse, robot_position, todo, and box_locations. It must also have a method called plan_delivery that takes 2 arguments: self and debug (set to False by default). CourseNana.COM

plan_delivery will only be invoked once for each test case. The testing suite will not execute code while your function is creating a solution to deliver ALL boxes in the todo list. This means that your warehouse map will not automagically update during your function invocation, you will need to perform all updates to your warehouse map representation as necessary for processing your solution. CourseNana.COM

Part A Input Specifications CourseNana.COM

warehouse will be a custom object used by the testing suite. For all intents and purposes, you can think of it as a list of m lists, each inner list containing n characters, corresponding to the layout of the warehouse. The warehouse is an m x n grid. warehouse[i][j] corresponds to the spot in the ith row and jth column of the warehouse, where the 0th row is the northern end of the warehouse and the 0th column is the western end. CourseNana.COM

NOTE: In part A, your code will not know (nor should it depend on) the size of the warehouse (n and m). You are only allowed to use the warehouse object (WarehouseAccess) in the following 2 ways, if we find that your code is using any other methods/approaches to use or manipulate the warehouse object, you will receive a 0 for part A (this may be done manually after the project is due): CourseNana.COM

1. You may access a particular cell in the warehouse using warehouse[i][j]
2. You may overwrite the contents of a cell using warehouse[i][j] = '<some symbol>' (note that this is only for your convenience if needed) CourseNana.COM

1. Are you attempting to determine the size of the warehouse?
2. Are you attempting to access an entire row of the warehouse (rather than a particular cell)?
3. Are you accessing a private attribute (as indicated by a leading underscore) of the warehouse?
4. Are you iterating through the warehouse in any way?
5. Are you somehow gaining access to a warehouse cell’s contents without it being counted towards the
CourseNana.COM

viewed_cell_count?
6. Are you attempting to copy the warehouse object/data in any way?
CourseNana.COM

Note that the box locations and the initial position of the robot are counted as viewed cells because they are given to you. CourseNana.COM

The characters in each string will be one of the following:
. (period) : traversable space. The robot may enter from any adjacent space. CourseNana.COM

# (hash) : a wall. The robot cannot enter this space. All warehouse cases will be surrounded by walls(Note: This is only for partA). CourseNana.COM

@ (dropzone) : the starting point for the robot and the space where all boxes must be delivered. The dropzone may be traversed like a . (period). CourseNana.COM

[0-9a-zA-Z] (any alphanumeric character) : a box. At most one of each alphanumeric character will be present in the warehouse (meaning there will be at most 62 boxes). A box may not be traversed, but if the robot is adjacent to the box, the robot can pick up the box. Once the box has been lifted, the space that the lifted box previously occupied now functions as a . (period). CourseNana.COM

For example, CourseNana.COM

warehouse = ['#####',
             '#1#2#',
             '#.#.#',
             '#..@#',

'#####' CourseNana.COM

] CourseNana.COM

is a 5x5 warehouse. CourseNana.COM

The dropzone is at the warehouse cell in row 3, column 3.
Box 1 is located in the warehouse cell in row 1, column 1.
Box 2 is located in the warehouse cell in row 1, column 3.
There are walls within the warehouse at cells (row 1, column 2) and (row 2, column 2) and around the CourseNana.COM

warehouse.
The remaining five warehouse cells (which includes the dropzone) are traversable spaces. CourseNana.COM

The argument todo is a list of alphanumeric characters giving the order in which the boxes must be delivered to the dropzone. For example, if todo = ['1','2'] is given with the above example warehouse, then the robot must first deliver box 1 to the dropzone, and then the robot must deliver box 2 to the dropzone. CourseNana.COM

Part A Rules & Costs for Motions CourseNana.COM

  • The robot may move in 8 directions (N, E, S, W, NE, NW, SE, SW) CourseNana.COM

  • The robot may not move outside the warehouse. The warehouse does not “wrap” around (it is not CourseNana.COM

    cyclic). CourseNana.COM

  • Two spaces are considered adjacent if they share an edge or a corner. CourseNana.COM

  • The robot may pick up a box that is in an adjacent square. CourseNana.COM

  • The robot may put a box down in an adjacent square, so long as the adjacent square is empty (. or @). CourseNana.COM

  • While holding a box, the robot may not pick up another box. CourseNana.COM

  • If a box is placed on the @ space, it is considered delivered and is removed from the warehouse, thus the @ space is still traversable after dropping a box on it. CourseNana.COM

  • The warehouse will be arranged so that it is always possible for the robot to move to the next box on the todo list without having to rearrange any other boxes. CourseNana.COM

  • The robot will end up in the same location when an illegal motion is performed. CourseNana.COM

  • An illegal motion will incur a penalty cost of 100 in addition to the motion cost. CourseNana.COM

  • Illegal motions include: CourseNana.COM

    • –  attempting to move to a nonadjacent, nonexistent, or occupied space CourseNana.COM

    • –  attempting to pick up a nonadjacent or nonexistent box CourseNana.COM

    • –  attempting to pick up a box while already holding one (attempting to put down a box while not CourseNana.COM

      holding one) CourseNana.COM

    • –  attempting to put down a box on a nonadjacent, nonexistent, or occupied space (this means the CourseNana.COM

      robot may not drop a box on the drop zone while the robot is occupying the drop zone) CourseNana.COM

      Part A Method Return Specifications CourseNana.COM

      plan_delivery should return a list of moves that minimizes the total cost of completing the task. Each move should be a string formatted as follows: CourseNana.COM

    • 'move {d}', where '{d}' is replaced by the direction the robot should move: "n", "e", "s", "w", "ne", "se", "nw", "sw" CourseNana.COM

    • 'lift {x}', where '{x}' is replaced by the alphanumeric character of the box being picked up CourseNana.COM

    • 'down {d}', where '{d}' is replaced by the direction the robot will put the box down CourseNana.COM

      For example, for the values of warehouse and todo given previously (reproduced below): CourseNana.COM

      warehouse = ['#####',
                   '#1#2#',
                   '#.#.#',
                   '#..@#',
      

      '#####' CourseNana.COM

      ] CourseNana.COM

      todo = ['1','2']
      plan_delivery
      might return the following: CourseNana.COM

      ['move w', CourseNana.COM

   'move nw',
   'lift 1',
   'move se',
   'down e',
   'move ne',
   'lift 2',
   'down s']

Part A Scoring CourseNana.COM

The testing suite will execute your plan and calculate the total cost: student_cost. The score for each test case will be calculated by: benchmark_cost / student_cost. The benchmark will be greater than or equal to the absolute minimum cost. You will receive a 0 in the following situations: CourseNana.COM

your code views more warehouse cells than specified in the test case: viewed_cell_count_threshold your code takes longer than the prescribed time limit
your method returns the wrong output format
the boxes are not delivered in the correct order CourseNana.COM

Part B (40%) CourseNana.COM

In this part there are three main differences from part A: CourseNana.COM

there will be only a single box for your robot to deliver
the warehouse has an “uneven” floor which imposes an additional cost (range: 0 ~ 95 inclusive) the robot starting location is not provided CourseNana.COM

DeliveryPlanner_PartB's constructor must have four arguments: self, warehouse, warehouse_cost, and todo. CourseNana.COM

Part B Input Specifications CourseNana.COM

Same as part A but the only box in the warehouse will be: 1 (the single box to be delivered). CourseNana.COM

Note: Test cases in the test suite will only contain the characters listed in part A’s input Specifications section. There is a helper function (_set_initial_state_from) that parses this initial input into an internal warehouse state. This is the same internal state representation that is used by the testing suite. You are NOT required to use this helper function and may change it as you see fit, it is just provided for convenience. Note that the testing suite uses an asterisk (*) to denote the current location of the robot as it executes your plan. This asterisk is only used for internal purposes in the testing suite so you will not see it present in the test cases. It is also used to denote the robot’s location in some examples in this document. CourseNana.COM

For example: CourseNana.COM

where w represents a wall. Note that the value of w has no consequence since the robot can’t occupy a space CourseNana.COM

containing a wall. CourseNana.COM

The argument todo is limited to a single box as follows: todo = ['1'] CourseNana.COM

There is no input for initial robot location because the robot may “wake up” at any point in the warehouse and must be handed a “policy” so that no matter where it is, it can retrieve the box. Further, because it may lift the box from different squares depending on its starting location, it requires another “policy” to deliver the box to the dropzone. CourseNana.COM

Note: You must update your internal warehouse state in your code as this is not done for you. CourseNana.COM

Part B Rules for Motions CourseNana.COM

Same as part A. CourseNana.COM

Part B Costs for Actions
The total cost for an action consists of a summation of 2 parts: CourseNana.COM

motion cost (same as part A) floor cost CourseNana.COM

movements: value of the destination cell the robot is moving into lift: value of the cell the box is located in prior to lifting
down: value of the cell the box is being placed into CourseNana.COM

This means although you may incur less motion cost to move straight to a target location, the additional floor cost along the way may be such that taking a roundabout way will result in an overall lower cost. CourseNana.COM

For example the lowest cost route to box 1 is not [‘move e’, ‘move e’]: CourseNana.COM

warehouse = ['*..1',
             '....',
             '.##.']
warehouse_cost = [[ 1, 95, 50, 1],
                  [ 1,   1,  1, 1],

[ 1, w, w, 1],]
Two example calculations for the total cost of an action using the example grid above are: CourseNana.COM

  • If the robot enters (0,1) from (0,0) then the total action cost will be:
    total action cost = motion cost (horizontal movement) + floor cost (destination) =2 +95=97. CourseNana.COM

  • If the robot enters (0,1) from (1,0) then the total action cost will be:
    total action cost = motion cost (diagonal movement) + floor cost (destination) =3 +95=98. CourseNana.COM

    Note that the floor cost to move into cell (0,1) is 95 regardless of the direction the robot is entering from. Three example calculations for the total action cost of illegal motions (i.e. attempting to move into (or CourseNana.COM

    put down a box at) an occupied space or outside the warehouse) are: CourseNana.COM

  • If the robot attempts to move east from (2,0) then the total action cost will be:
    total action cost = motion cost (horizontal movement) + illegal motion penalty cost = 2 + 100 = 102. CourseNana.COM

  • If the robot attempts to move southeast from (2,0) then the total action cost will be:
    total action cost = motion cost (diagonal movement) + illegal motion penalty cost = 3 + 100 = 103. CourseNana.COM

  • If the robot attempts to put down a box to the southeast from (2,0) then the total action cost will be: total action cost = motion cost (put down box) + illegal motion penalty cost
    = 2 + 100 = 102. CourseNana.COM

    Note that the motion costs are still included in the case of illegal motions even though they weren’t successful (the robot still exerted the energy). Floor costs are only incurred when a motion is legally carried CourseNana.COM

out. Floor costs (of the box location) are incurred when legally lifting, and floor costs (of the drop location) are incurred when putting down boxes. CourseNana.COM

Part B Method Return Specifications CourseNana.COM

plan_delivery should return two policies, each as a list of lists of strings indicating the motion to take at each square on the grid. The format of the commands is the same as in part A. The special command CourseNana.COM

‘-1’ should be placed at any square for which there is no valid command, such as a wall. CourseNana.COM

For example, for the values of warehouse and todo given previously (reproduced below): CourseNana.COM

warehouse = ['1..',
             '.#.',
             '..@']

plan_delivery might return the following two policies: CourseNana.COM

where: ‘B’ indicates the box location. CourseNana.COM

For the “Deliver Box Policy”, the dropzone includes a motion in the event the robot starts on, lifts an adjacent box, and then must move off the dropzone to deliver it. CourseNana.COM

Part B Scoring CourseNana.COM

The testing suite will pick a starting location for the robot and then execute the motions specified by the “To Box Policy” until it finds and lifts the box. Then it will use the “Deliver Box Policy” and, given the location of the robot when it lifted the box, the appropriate commands are executed until the the box is delivered to the dropzone. The total cost of the student delivery is denoted as: student_cost. The score for each test case will be calculated the same as part A. CourseNana.COM

Part C (20%) CourseNana.COM

In this part there is only one main difference from part B: move motions are stochastic CourseNana.COM

DeliveryPlanner_PartC's constructor must have five arguments: self, warehouse, warehouse_cost, todo, and stochastic_probs. CourseNana.COM

In part A and B we dealt with a deterministic robot. In real life however, we are inevitably faced with stochasticity. As such, part C is about finding an optimal policy based on stochastic robot motions. CourseNana.COM

Note: For this part you should find 2 individually optimal policies: pick up and drop off. This means your main algorithm should be executed 2 times: once to obtain the optimal policy to pick up the box and once to obtain the optimal policy to deliver the box. CourseNana.COM

Part C Rules for Motions CourseNana.COM

Rules for motions are almost the same as part A & B. Instead of deterministic movements however, the robot will move according to a probability distribution defined by stochastic_probabilities. stochastic_probabilities will give you the probability that the movement will be as_intended, slanted, or sideways as depicted in the grids below. Since these are probabilities, the sum of all possible outcomes will be one: 2 (sideways + slanted) + as_intended = 1. Your code should be able to handle any distribution provided to you in stochastic_probabilities. as_intended will be strictly greater than 0% and strictly less than 100%. The as_intended direction in the images below indicates the intended movement by the robot. Note that slanted and sideways are with respect to the intended movement direction. CourseNana.COM

Example #1 Example #2 Example #3 CourseNana.COM

Note that Example 2 and 3 above are the same since orientation does not matter in this project, they are both provided to emphasize that the unintended stochastic outcomes are with respect to the intended movement direction. CourseNana.COM

To understand the stochastic movement probability better, lets take a look at a few concrete examples. Assume the movement probability distribution is given as: CourseNana.COM

as intended = 70% slanted = 10%
sideways = 5% CourseNana.COM

Do yourself a favor and validate that the sum of all possible outcomes for this example is indeed one. The probability distribution showing the outcomes of an intended movement of “move n” in 3 different scenarios are depicted below: CourseNana.COM

Example #4 Example #5 Example #6 CourseNana.COM

Notice that in example #5, the two locations occupied by a wall prevent the robot from moving into those spaces and therefore the robot stays in place 15% (10% + 5% ) of the time. Similarly, any attempt to move outside the warehouse will result in the robot staying in the same location (as seen in example #6). CourseNana.COM

Only directional movement is stochastic. The lift and down motions are deterministic. Part C Costs for Actions CourseNana.COM

Same as part B, with the clarification that the cost incurred is the cost of the motion actually performed. This may differ from the motion attempted (intended), due to the stochastic nature of Part C. CourseNana.COM

For example, if the intended motion is a vertical movement, but the robot ends up performing a slanted movement then the result will incur a diagonal movement cost. Similarly, if the intended motion is a diagonal movement, but the robot ends up performing a sideways movement then the result will incur a diagonal movement cost. CourseNana.COM

Part C Output Specifications CourseNana.COM

Same as part B. CourseNana.COM

Part C Scoring CourseNana.COM

TL;DR: for each correct policy (to-box and to-dropzone) you will earn 0.5 points for a total of 1 point per test case. More details about the scoring are below, but not required to complete the project. CourseNana.COM

A random number generator will be seeded in order to produce deterministic (consistent) results. The testing suite will initialize a robot at robot_init. The student policy is then used to express the intended motion at each step. The performed motion (stochastic movement or deterministic lift/down) is recorded at each step. Note that the performed motion may not be the same as the motion specified in your policy (intended motion) due to stochasticity. The list of performed motions (actions) are recorded as: student_performed_actions. Since the random number generator is seeded, a particular policy will always produce the same list of performed motions. You are given 0.5 points if student_performed_actions match the correct_performed_actions. CourseNana.COM

must analyze your code by scrutinizing your implementation of the algorithm and making sure to adhere to the warehouse rules laid out in this document. CourseNana.COM

Environment Test CourseNana.COM

Before changing warehouse.py, test your environment using the following steps: 1) From the command line run: python warehouse.py CourseNana.COM

A list of moves for Part A test case 1 should be printed CourseNana.COM

A “to_box_policy” and “deliver_policy” will be printed for part B, test case 1 CourseNana.COM

A “to_box_policy” and “to-zone_policy” will be printed for part C, test case 1 2) From the command line run: python testing_suite_PartA.py [or B, C, or full] CourseNana.COM

A list of test cases and their score should show that test case 1 passed and the remaining failed. There are more notes in testing_suite_partA.py to discuss how to run and debug CourseNana.COM

Visualization CourseNana.COM

There is an ASCII based visualization which will print the warehouse state and other important data to the console. This can be set by using the VERBOSE_FLAG in the testing suite files. CourseNana.COM

In addition, there is a GUI based visualization, set VISUALIZE_FLAG=True. You can change the GUI frame rate speed in the visualizer.py file. The 6 choices are [1,2,3,4,5] (slow to fast) and [0] which is MANUAL-PAUSE mode (this will not proceed to the next time step until you press the space bar). You can conveniently quit any test case by pressing the Esc (escape) key. An example demo video can be found at the following link: https://mediaspace.gatech.edu/media/t/1_onp8ge69 CourseNana.COM

Part A’s visualization will also indicate to you which cells your algorithm (did and didn’t) access during the search process. The cells with a dark overlay on them indicate cells that your algorithm didn’t access. CourseNana.COM

In testing_suite_partA.py you can turn on TEST_MODE to control the robot with your keyboard. This can be used to validate and build your understanding about the rules of the game. The controls are the following CourseNana.COM

(note that NumLock may need to be turned off): CourseNana.COM

Illegal Move Indication CourseNana.COM

Successfully Moved Diagonally CourseNana.COM

Cells Accessed CourseNana.COM

Development and Debugging CourseNana.COM

Illegal “box” Lift Indication Illegal Move Example CourseNana.COM

Successfully Put Box Down Successfully Lifted Box CourseNana.COM

Cells Not Accessed CourseNana.COM

When developing and debugging here are some ideas that might prove helpful. CourseNana.COM

1) During initial development of your algorithm use warehouse.py and its main function
Copy a test case from the testing suite to the main in the bottom of warehouse.py CourseNana.COM

2) Test your algorithm using a single test case:
You can run a single test case. For example to run the first test case for partA: CourseNana.COM

         python testing_suite_partA.py PartATestCase.test_case_01

Or you may comment out all but a single test case in the testing_suite CourseNana.COM

3. If testing in a debugger, to allow breakpoints to work properly, there are some flags that can be set at the top of testing_suite_partA.py and testing_suite_partB.py CourseNana.COM

CourseNana.COM

provides a simple console based visualization
provides line numbers for any syntax errors that occur if exceptions are raised provides detailed stack trace CourseNana.COM

After the test case of interest works be sure to set the flags back to VERBOSE_FLAG = False
TIME_OUT = 5
DEBUGGING_SINGLE_PROCESS = False CourseNana.COM

3) Part C outputs some additional terminal based data and visualizations that may be helpful in developing your solution, to turn them on set VERBOSE = True in the testing suite: CourseNana.COM

Symbol Policy Values & Symbol Policy CourseNana.COM

Surrounding the warehouse policy are the row and column indexes so it is easier to locate a particular index (helpful on larger warehouses). The arrows denote the policy motion. The empty square denotes a box. The white square denotes a wall. + denotes a lift command. - denotes a down command. Note that lift and CourseNana.COM

down for part C are a little more lax as they do not check the box number nor direction. CourseNana.COM

If you also return a set of values to accompany your policies then these will be displayed (as integers) next to your motions. These values can represent anything you want and can serve as a way to visually see why certain motions are as they are. CourseNana.COM

Correct vs. Student Actions Comparison CourseNana.COM

The correct actions performed and student actions performed are output for part C. The difference between these are marked with ˆ indicating the place where the lists do not match.  CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
GaTech代写,CS 7638代写,Artificial Intelligence for Robotics代写,Warehouse Project代写,Python代写,GaTech代编,CS 7638代编,Artificial Intelligence for Robotics代编,Warehouse Project代编,Python代编,GaTech代考,CS 7638代考,Artificial Intelligence for Robotics代考,Warehouse Project代考,Python代考,GaTechhelp,CS 7638help,Artificial Intelligence for Roboticshelp,Warehouse Projecthelp,Pythonhelp,GaTech作业代写,CS 7638作业代写,Artificial Intelligence for Robotics作业代写,Warehouse Project作业代写,Python作业代写,GaTech编程代写,CS 7638编程代写,Artificial Intelligence for Robotics编程代写,Warehouse Project编程代写,Python编程代写,GaTechprogramming help,CS 7638programming help,Artificial Intelligence for Roboticsprogramming help,Warehouse Projectprogramming help,Pythonprogramming help,GaTechassignment help,CS 7638assignment help,Artificial Intelligence for Roboticsassignment help,Warehouse Projectassignment help,Pythonassignment help,GaTechsolution,CS 7638solution,Artificial Intelligence for Roboticssolution,Warehouse Projectsolution,Pythonsolution,