File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ def plan(
4343 ):
4444 # 🏷️ A2 EXERCISE: WRITE THE RESERVATION TABLE PLANNER
4545 # Write a planning loop that drives the low planning logic,
46- # and don't forget to use the reservation table!
46+ # where agents reserve their path so that future agents
47+ # must avoid them: use your reservation table!
4748 #
4849 # 🧪 Try out a few strategies that use this reservation table.
4950 # - Reserve the entire path as you plan for each agent
@@ -53,17 +54,18 @@ def plan(
5354 #
5455 # Refer to the basic planners in ex1 if you're stuck.
5556 #
56- # region ANSWER A2:
57-
5857 table .clear ()
5958 for i in range (len (paths )):
6059 paths [i ] = run_search (env , i )
60+
61+ # region ANSWER A2:
62+
6163 # Check if we've got a solution
6264 if paths [i ]:
6365 # Reserve only the first point on the path
6466 table .reserve (interop .get_agent_state (env , i ), paths [i ][0 ])
65- return paths
6667
6768 # endregion
69+ return paths
6870
6971 return plan
You can’t perform that action at this time.
0 commit comments