From 6a814f4a3b25eb0aac362f5f000b27f021b69efd Mon Sep 17 00:00:00 2001 From: soybby Date: Sun, 26 Apr 2020 23:52:30 +0200 Subject: [PATCH] hellcdvsraff --- route_planning.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 route_planning.md diff --git a/route_planning.md b/route_planning.md new file mode 100644 index 0000000..d6b0670 --- /dev/null +++ b/route_planning.md @@ -0,0 +1,9 @@ +# Route Planning Task +### Report + +##### Our topic is the Waiter Project. To complete the Route planning Task we have decided to use the most intuitive way to traversal all the tables available on the grid. Beacuse we already have a 16x16 grid, we do not think about extra search strategies which are for trees or graphs. + +##### First, we put all the point of tables in an array. For example: [table1, table2, ......]. +##### In a while loop, it starts at picking the first element(point) in the array and calculating the distance between the agent and the point, and choose the smallest distance of four directions(left, right, up, down). Then move to that direction. (Here is a special condition - we do not allow the agent to go back to previous point. If agent can go back, it will cause a infinate loop somethings.) +##### If the agent arrive the destination(means the agent and the table are at the same point), then the table in array will be deleted. And the agent will go back to kitchen. +##### When agent arrive the ketchen, the loop will iterate again to the next table until all the tables are visited.