Repository navigation
Library, property tests, benchmark and CI - #1
Merged
Merged
Conversation
- Crash fix: guard algorithms against missing start/end (was UB on grid[-1][-1])
- Crash fix: guard reconstructPath against broken parent chain ({-1,-1})
- Fix: horizontal grid lines no longer bleed over the UI panel (GRID_WIDTH)
- Fix: window stays responsive during visualization via sleepAndPoll()
- Fix: A* now uses shared updateVisual() instead of its own inline draw loop
- Fix: left-click on a wall now toggles it off (was silently ignored)
- Fix: maze generation clears stale Visited/Path cells first
- Fix: remove duplicate mousePos declaration (line 531 shadow)
- Fix: remove all debug cout statements (were called 60x/sec inside drawGrid)
- Improvement: selected algorithm button highlighted in blue (ButtonActive)
- Improvement: status message guides user when no start/end placed yet
- Improvement: replaced custom INFINITY hack with numeric_limits<float>::max()
- Improvement: button bounds computed from shared constants, not duplicated
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove the committed .exe and SFML .dll/.lib files; CMake builds everything - Drop the duplicate font and the old screenshot - .gitignore build trees, IDE folders and binaries
- pathfinder library: weighted grid, BFS, DFS, Dijkstra, A*, greedy; search returns path, cost and expansion order - Expanded means closed; stale heap entries skipped; A* heuristic scaled by the minimum cost so it stays admissible - Perfect-maze, random-wall and weighted-terrain generators, all seeded - App replays recorded searches per frame (no blocking), drag editing, mud cells, offscreen --screenshot mode - CMake 3.20, C++20, warnings and sanitizer options; the single-file main.cpp is gone
- Valid walks with the reported cost; agreement on reachability - A* matches Dijkstra's cost and never expands more; BFS optimal only on uniform cost - Each cell expanded at most once; perfect mazes are spanning trees
- pathfinder-bench: median time, cells expanded and cost vs optimum per algorithm and scenario - CI: GCC and Clang with warnings as errors, plus an ASan/UBSan test job - README: design, benchmark results (A* expands 11% of BFS on uniform grids, no gain on terrain), tests, build
- GCC 13 flags the conditional-expression assignment as a possible dangling pointer (-Wdangling-pointer) - Plain if/else, same behaviour
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns the single-file SFML demo into a tested C++20 project.
include/pathfinder,src/): weighted grid; BFS, DFS, Dijkstra, A*, greedy.search()returns the path, its cost and the expansion order, with no graphics in the loopapp/): replays recorded searches a few cells per frame, so the window never blocks. Drag editing, mud cells, perfect mazes, weighted terrain,--screenshotfor reproducible imagespathfinder-benchon 501×501 grids. A* expands 11% of BFS's cells on uniform cost and gains nothing on weighted terrain.exe/.dll/.libfiles are removed and gitignoredAlso includes the May bug-fix commit (2f15591), which was never pushed.
The binaries are still in older commits (~7 MB of history). Removing them from history would need a force-push to main, so this PR doesn't do it.