Commit b12a31d8 authored by pichonju's avatar pichonju
Browse files
parents 17961d1b 6471b1c9
......@@ -42,3 +42,8 @@ Level 1
# B B D#
#########
```
## Comment exécuter espace d'état ?
Pour exécuter l'espace d'état, il suffit de faire
`python3 -l nomdufichier.txt`
......@@ -478,8 +478,6 @@ def main():
infos["grid"], infos["max_steps"], infos["m"], infos["n"]
)
start = time.time()
end, save = None, None
if method == "astar":
......@@ -517,14 +515,12 @@ def main():
debug=False,
)
stop = time.time()
if end:
plan = "".join([a for _, a in dict2path(end, save) if a])
if check_plan(plan):
print("[Niveau] ", infos["title"])
print(f"[Temps] {(stop-start)*1000:.2f} ms")
print("[OK]", plan)
#print("[Niveau] ", infos["title"])
#print(f"[Temps] {(stop-start)*1000:.2f} ms")
print(plan)
else:
print("[Err]", plan, file=sys.stderr)
else:
......@@ -534,4 +530,4 @@ def main():
if __name__ == "__main__":
main()
\ No newline at end of file
main()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment