TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A* search: optimized implementation in Lisp

107 pointsby nemoniac10 months ago

5 comments

Jach10 months ago
I like this author&#x27;s work on fast game structures for Lisp, shows what you can do if you&#x27;re willing to do a bit of work on explicit types and so on. It&#x27;s not obvious from the readme but the trivial-benchmark code includes details like time spent in the garbage collector (0 for this) and memory allocated, not just wall clock time. If he wants to do more interesting benchmarks, a standard set to use includes <a href="https:&#x2F;&#x2F;movingai.com&#x2F;benchmarks&#x2F;grids.html" rel="nofollow">https:&#x2F;&#x2F;movingai.com&#x2F;benchmarks&#x2F;grids.html</a> which includes some maps from real games.<p>It&#x27;s quite a bit faster than my Lisp version, at least, though mine&#x27;s an unoptimized (lots of lists) incompletely ported C++ version. Tempted to dig out the C++ version and compare since it was pretty fast... I originally ported it to make a joke about a vtuber&#x27;s long neck: <a href="https:&#x2F;&#x2F;pbs.twimg.com&#x2F;media&#x2F;FAJQkskVQAoiGlT?format=png&amp;name=orig" rel="nofollow">https:&#x2F;&#x2F;pbs.twimg.com&#x2F;media&#x2F;FAJQkskVQAoiGlT?format=png&amp;name=...</a> (Edit: screenshot from C++ version: <a href="https:&#x2F;&#x2F;www.thejach.com&#x2F;imgs&#x2F;visibility_with_astar.png" rel="nofollow">https:&#x2F;&#x2F;www.thejach.com&#x2F;imgs&#x2F;visibility_with_astar.png</a> Note how the shorter path would be going through the central chamber, but visibility is high there, so it goes down the corridors. Original had lots of extra features like fog of war, visibility tests&#x2F;terrain analysis, smoothing and rubber-banding, a Floyd-Warshall implementation...)
mark_l_watson10 months ago
I love seeing highly optimized Common Lisp code like this.<p>I implemented A* in Common Lisp for my Springer Verlag AI book (1998), so a bit of nostalgia for me.<p>SBCL is really an amazing ecosystem and I argue that it is a great example of the power of open source.
评论 #41147677 未加载
efilife10 months ago
Can someone explain why is this special? It doesn&#x27;t look anything more than an algorithm implementation
评论 #41146329 未加载
评论 #41147470 未加载
评论 #41150248 未加载
MeteorMarc10 months ago
Need to change this: &#x27;NOTE: this software is of alpha quiality&#x27;
评论 #41146212 未加载
tankfeeder10 months ago
do this on picolisp in my todo list.