## 这是一篇来自澳洲的关于规划和自动化推理相关任务的Python代写，具体作业要求是通过一个铁路网安排一组火车。你需要尽快协调每一列火车从起点到目的地。由于可能会有许多火车同时行驶，所以你需要保证每条道路都是无碰撞的。

Assignment 1: Flatland Challenge

In this assignment your job is to schedule a set of trains through a railway network.

You need to coordinate every train from its starting station to its destination as quickly as possible. As there can be many trains moving at the same time you need to guarantee that each path is collision-free.

The assignment has three sections, in increasing order of difficulty. The amount of points relative to each question is stated in the question heading. A passing grade is 50%.

**Be sure to watch the introductory video on Moodle and to read the Introduction to **

**Flatland documentation which we have prepared for you. Both are available from ****Moodle. **

**You must update your flatland code and installation before starting the assignment: **

**Under flatland folder***git pull**python3 setup.py install***Now, run command***python3 -m pip list***, you should see flatland-rl version is****updated to 2.2.4**

**(Hint, use***python***instead of***python3***if***python***points to the right one on your****machine)**

**Instructions to get code base (in assignment1_2023 branch of piglet repo) for ****assignment is in the Introduction to Flatland documentation. **

When the contest server is ready, you will see your f score upon submission.

QUESTION 1: Warm up (15 points)

You are given start and target locations, one at a time. Your job is to route each train independently from all the rest. In this question collisions are not possible and there is no time dimension.

For this question, you need to implement a successor function for the Flatland domain. You also need to choose an algorithm to help you find paths. You are free to use any of the techniques we have discussed in the lectures, that you have read about in the literature or can write your own new approach.

Your solution will be evaluated on 40 evaluation instances (only staff have these instances) with 2 hours timelimit and each instance has 1 agent. We will compare your sum of individual cost(SIC, for agents did not arrive goal location, its cost will be 𝑇𝑚𝑎𝑥= 8 * (𝑤𝑖𝑑𝑡ℎ + ℎ𝑒𝑖𝑔ℎ𝑡)

implemented by teaching team and calculate your score using following method:

𝑝𝑠𝑐𝑜𝑟𝑒= ( 𝑐𝑜𝑚𝑝𝑙𝑒𝑡𝑒𝑑_𝑎𝑔𝑒𝑛𝑡𝑠_𝑆𝐼𝐶 + 𝑇 𝑚𝑎𝑥

* 𝑓𝑎𝑖𝑙𝑒𝑑_𝑎𝑔𝑒𝑛𝑡𝑠)/𝑡𝑜𝑡𝑎𝑙_𝑎𝑔𝑒𝑛𝑡𝑠

𝑓𝑠𝑐𝑜𝑟𝑒 = 𝑝 𝑠𝑡𝑎𝑓𝑓 /𝑝 𝑠𝑐𝑜𝑟𝑒 where

is the p score of staff implementation. Generally, a good solution has small 𝑝 𝑠𝑡𝑎𝑓𝑓 𝑝 score and large 𝑓 score.

Your final score will be (since there are 15 points available for this question).

𝑓𝑠𝑐𝑜𝑟𝑒× 15

QUESTION 2: Easy mode (25 points)

You are given start and target locations, one at a time, as well as a set of existing paths for trains that are already moving. Your job is to route each train individually while avoiding collisions with all the rest. You are free to use any of the techniques we have discussed in the lectures, that you have read about in the literature or can write your own new approach.

For this question, you need to modify your successor function to account for time. In addition, there might be the situation that the search algorithm failed to find a feasible solution as dynamic obstacles block all possible paths. Just return an empty list in this case.

Furthermore, each action and each location for every computed plan need to be collision-free.

Your solution will be still evaluated on 56 instances with a 2 hours timelimit and your score in this question will again be computed as the sum of individual path costs (SIC) and compared to the best solution from students (and staff)!

Your will be computed in the same way as for Question 1. But there are some 𝑓𝑠𝑐𝑜𝑟𝑒 differences:

- Here we computefor each instance.𝑓𝑠𝑐𝑜𝑟𝑒

- Each instance contains multiple agents.
- Your final points will be, where is instance id.

𝑖𝑛∑ 𝑓𝑠𝑐𝑜𝑟𝑒𝑖÷ 56 × 25 𝑖

There are up to 25 points available for this question.

QUESTION 3: Challenge (60 points)

You are given sets of start and target locations at the same time. Your job is to route all the trains simultaneously in a way that is collision-free. **But, each agent has an expected **

**arrival time, late arrival will result in a penalty. **

You are free to use any of the techniques we have discussed in the lectures, that you have read about in the literature or can write your own new approach.

Now, as all agents are under your control, you need to make all agents reach their goal locations.

In this question agents may run into malfunctions during execution. The evaluator will call the replan function when a new malfunction occurs. Implement the replan function to properly handle malfunction. Refer to the “Introduction to Flatland” document for details about malfunction and replan function.

Your solution will be still evaluated on 56 instances with different difficulty levels in 2 hours and your score in this question will again be computed as the sum of individual path costs (SIC) and compared to the best solution from students (and staff)!

Your computation is similar to Question 1. But there are some differences:

𝑓𝑠𝑐𝑜𝑟𝑒

- 𝑝𝑠𝑐𝑜𝑟𝑒= ( 𝑐𝑜𝑚𝑝𝑙𝑒𝑡𝑒𝑑_𝑎𝑔𝑒𝑛𝑡𝑠_𝑆𝐼𝐶 + 𝑝𝑒𝑛𝑎𝑙𝑡𝑦 + 𝑇𝑚𝑎𝑥* 𝑓𝑎𝑖𝑙𝑒𝑑_𝑎𝑔𝑒𝑛𝑡𝑠)/𝑡𝑜𝑡𝑎𝑙_𝑎𝑔𝑒𝑛𝑡𝑠

- The 𝑝𝑒𝑛𝑎𝑙𝑡𝑦 is 2 * 𝑡𝑜𝑡𝑎𝑙_𝑑𝑒𝑙𝑎𝑦𝑒𝑑_𝑡𝑖𝑚𝑒𝑠𝑡𝑒𝑝𝑠.
- Each instance contains multiple agents.
- Each instance’s

will refer to a baseline implementation and an advanced

𝑓𝑠𝑐𝑜𝑟𝑒𝑝𝑏𝑎𝑠𝑒

implementation

(or best student solution which ever is better):

𝑝𝑎𝑑𝑣𝑓𝑠𝑐𝑜𝑟𝑒= 𝑚𝑖𝑛(0. 5 *𝑝𝑏𝑎𝑠𝑒𝑝𝑠𝑐𝑜𝑟𝑒, 0. 5) + 𝑚𝑎𝑥(0. 5 *𝑝𝑏𝑎𝑠𝑒−𝑝𝑠𝑐𝑜𝑟𝑒𝑝𝑏𝑎𝑠𝑒−𝑝𝑎𝑑𝑣, 0)

𝑖𝑛∑ 𝑓𝑠𝑐𝑜𝑟𝑒𝑖÷ 56 × 60 𝑖 , where is instance id.

There are up to 60 points available for this question.

Report (50 points)

You need to create a report that describes your approach to each of the questions. This includes a textual description of your approaches, why you adopted that particular approach and a thorough discussion along with any supplementary material required (such as pseudo code, images, graphs, tables…).

Bonus Points

We will issue bonus points for students implementing multiple approaches for the same problem, and/or for implementations of algorithms from the scientific literature that are not discussed during tutorials/lectures (e.g., from one of the recommended papers or elsewhere). The size of the bonus depends on how ambitious the implementation is, its effectiveness and the quality of the writeup.

**BONUS POINTS CAN MAKE THE DIFFERENCE BETWEEN ‘D’ and ‘HD’ **

Grades

The total points for the assignment is 150. A passing grade is 50% of total points, which is 75 points.

**程序代写代做C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB**

本网站支持淘宝 支付宝 微信支付 paypal等等交易。如果不放心可以用淘宝交易！

**E-mail:** itcsdx@outlook.com **微信:**itcsdx

如果您使用手机请先保存二维码，微信识别。如果用电脑，直接掏出手机果断扫描。