Enhance pathfinding UI with grid resizing and scenarios
Added controls for dynamic grid size adjustment and scenario presets (normal and edge case) to the pathfinding component. Improved UI/UX with algorithm explanations, Wikipedia links, and reorganized controls. Refactored grid logic for flexibility, updated translations, and improved code structure for maintainability.
This commit is contained in:
@@ -301,12 +301,18 @@
|
||||
"CLEAR_NODE": "Clear",
|
||||
"DIJKSTRA": "Dijkstra",
|
||||
"ASTAR": "A*",
|
||||
"RESET_BOARD": "Reset Board",
|
||||
"NORMAL_CASE": "Test Scenario",
|
||||
"EDGE_CASE": "A* Edge Case",
|
||||
"CLEAR_BOARD": "Clear Board",
|
||||
"VISITED": "Visited",
|
||||
"PATH": "Path",
|
||||
"PATH_LENGTH": "Path length",
|
||||
"EXECUTION_TIME": "Execution Time",
|
||||
"EXPLANATION": {
|
||||
"TITLE": "Algorithms",
|
||||
"DIJKSTRA_EXPLANATION": " is guaranteed to find the shortest path if all edge costs are non-negative. Advantage: optimal and without heuristics. Disadvantage: often visits a large number of nodes (can be slower for large grids).",
|
||||
"ASTAR_EXPLANATION": " extends Dijkstra with a heuristic (e.g. Manhattan distance) and can therefore search in a much more targeted manner. Advantage: often significantly faster with good heuristics; with permissible heuristics, the path remains optimal. Disadvantage: highly dependent on heuristics (poor heuristics ≈ Dijkstra)."
|
||||
},
|
||||
"ALERT": {
|
||||
"START_END_NODES": "Please select a start and end node before running the algorithm."
|
||||
}
|
||||
@@ -315,7 +321,9 @@
|
||||
"TITLE": "Algorithms",
|
||||
"PATHFINDING": {
|
||||
"TITLE": "Pathfinding",
|
||||
"DESCRIPTION": "Comparing of Dijkstra vs. A*."
|
||||
"DESCRIPTION": "Comparing of Dijkstra vs. A*.",
|
||||
"GRID_HEIGHT": "Height",
|
||||
"GRID_WIDTH": "Width"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user