-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: A-star search #3973
feat: A-star search #3973
Conversation
Eventually this is leading to a reimplementation of the original |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one small thing: you use lowest priority
and highest priority
synonymously (I think).
bors d+
heuristicPrio := default | ||
totalPrio := default | ||
explored := [] | ||
remaining := .nil }⟩ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just write deriving Inhabited
after Path
and VertexData
instead of doing this manually?
recursively record all paths obtained by adding a previously explored edge to this path. | ||
-/ | ||
partial def recordPath (Γ : GraphData m P V E) (optimal : Bool) (path : Path P V E) : | ||
(M m P V E) PUnit := do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(M m P V E) PUnit := do | |
M m P V E PUnit := do |
/-- The best so far path to the vertex. -/ | ||
bestPath : Path P V E | ||
/-- The heuristic associated to the vertex. -/ | ||
heuristicPrio : P |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to track this here, because it's always the same as Γ.heuristic v
for the v
this is associated to, right? The single occurrence of d.heuristicPrio
below can become Γ.heuristic v
.
✌️ semorrison can now approve this pull request. To approve and merge a pull request, simply reply with |
This was support for a previously planned implementation of |
This is intended for meta programming, not proving.