From e561cc340a4ad2d6c7cddd15ad9446a7a71e1ec2 Mon Sep 17 00:00:00 2001 From: Mrna Date: Thu, 18 Sep 2025 19:19:24 +0200 Subject: [PATCH] Python demo: research --- README.md | 6 ++++-- python/pathfinding_demo.ipynb | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0c03b94..c52a1dd 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,13 @@ - [ ] python - [x] get jupyter lab running - - [ ] drawing utility - - [ ] interface for pathfinding + - [x] drawing utility + - [x] interface for pathfinding - [ ] research methods - [ ] implement methods + - [ ] performance measurement: time/visited nodes - [ ] finish text on the page + - [ ] create a dedicated python script - [ ] C++ - [ ] re-use 2D game engine - [ ] add mouse-click movement (direct, no pathfinding, player always selected) diff --git a/python/pathfinding_demo.ipynb b/python/pathfinding_demo.ipynb index c3ade49..b4807d3 100644 --- a/python/pathfinding_demo.ipynb +++ b/python/pathfinding_demo.ipynb @@ -24,7 +24,7 @@ { "id": "16f8fedb-ac10-450c-b5c7-f820a985902d", "cell_type": "markdown", - "source": "# Pathfinding demo", + "source": "# Pathfinding demo\n\n## Optimal path finding\n\nNon-exhaustive list of methods follows. \n\n$V$ is the set of all vertices; $|V|$ is the size of the set\n\n1. [Bellman-Ford algorithm](https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm)\n - exhaustive method\n - $O(|V|*|E|)$\n2. Dijkstra\n3. A*", "metadata": { "tags": [], "slideshow": { @@ -36,7 +36,7 @@ { "id": "fbdf9d2c-d050-4744-b559-abc71e550725", "cell_type": "code", - "source": "#\n# Imports\n#\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom typing import Protocol\nfrom dataclasses import dataclass", + "source": "#\n# Imports\n#\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom typing import Protocol", "metadata": { "trusted": true, "tags": [],