FIT9136 Task 3 - Robbie the Transformer

Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due

Task 3 - Robbie the Transformer

Background

Inspired by the Transformers movies, Robbie can now transform into a Drone or an AUV (Autonomous Underwater Vehicle), which has different initial exploration speeds (see the table below). Rules in tasks 1 and 2 are still valid for the transformed Robbie.

+------------------+--Mountain------------+--Lake---------------+--Crater-----------------+

| Robbie the Robot | 6 (height unit/day)  | 8 (depth unit/day)  | 10 (perimeter unit/day) |

+------------------+----------------------+---------------------+-------------------------+

| Robbie the Drone | 12 (height unit/day) | 6 (depth unit/day)  | 8 (perimeter unit/day) |

+------------------+----------------------+---------------------+-------------------------+

| Robbie the AUV   | 2 (height unit/day)  | 12 (depth unit/day) | 6 (perimeter unit/day)  |

+------------------+----------------------+---------------------+-------------------------+

Robbie is now given a list of feature names to explore (in that order). Your task is to help Robbie decides which type of robot Robbie should transform into (or not transform at all) to complete the mission in the shortest time.

There are some rules for transformations:

· Robbie is allowed to transform only once (if he wants to) for a mission. His preference is: no transformation, a drone, and an AUV (in this order) if this does not increase the duration of the mission.

· The gain of his skills and experiences from his previous explorations still remains. This means, for example, if he previously explored one mountain, then after being transformed into a drone, his exploration speed for mountain will be increased by 20%.

· After each mission, Robbie will automatically transform into the regular Robbie the Robot.

Your tasks

# geo_features.py

You may make changes to the classes GeoFeature , Mountain, Lake, and Crater as you need.

# robot.py

You may make changes to the class Robot and add more classes as you need.

# task3.py

In addition to commands in the previous tasks, you need to add the following commands:

· The user can input mission , where  is a list of features (separated by commas) that Robbie needs to explore (in that order). You should help Robbie transforms into the best form (or not transform at all) and accomplish the mission (see examples for more details).

You can assume that  and  correspond to a valid location on the map.

You can assume that all user inputs are valid.

You can assume that feature names are unique and all inputted feature names are valid.

You are allowed to modify the import statements in the scaffold, but you are not allowed to import any modules which were not originally imported in the scaffold.

You can assume that and correspond to a valid location on the map.

You can assume that all user inputs are valid.

You can assume that feature names are unique and all inputted feature names are valid.

You are allowed to modify the import statements in the scaffold, but you are not allowed to import any modules which were not originally imported in the scaffold.



发表评论

电子邮件地址不会被公开。 必填项已用*标注