frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

O(1) memory, no-preprocessing reachability algorithm for 2D grids

2•MatthiasGibis•1d ago
I’ve been working on a reachability checker for 2D grids that:

- uses *O(1) memory* - requires *no preprocessing* - handles *arbitrary obstacle maps* - and finishes in under 0.1ms even on large grids (e.g. 16,000×16,000 from bottom-left to top-right)

It works without BFS, DFS, A, or flood fill. The core idea is a hybrid of greedy movement toward the goal and robust outline-following (wall tracing) that switches direction when needed and detects loops to ensure correctness.

The algorithm is fully deterministic and guarantees correctness for any map and any pair of walkable start/end points.

My motivation: I want to make traditional flood fill obsolete for any project that uses it purely for reachability checks. In many real-time systems (like games), a full BFS/DFS or even region-preprocessing is overkill when you just need to answer: “Can I reach tile B from tile A?”*

Here’s the Swift version of the main logic

https://github.com/MatthiasGibis/2D-Grid-Reachability-Check/blob/main/mgReachabilityCheckGibis.swift

A variant that considers *height differences* is also available.

https://github.com/MatthiasGibis/2D-Grid-Reachability-Check/blob/main/mgReachabilityCheckGibisWithHeight.swift

Comments

gus_massa•1d ago
Clicky (repo) https://github.com/MatthiasGibis/2D-Grid-Reachability-Check

AImmerse Web App

1•yiyih•4m ago•0 comments

Is Jordan Peterson Just Making It Up as He Goes?

https://thewalrus.ca/is-jordan-peterson-just-making-it-up-as-he-goes/
1•sameers•14m ago•0 comments

A new path forward for WordPress, and for the open web

https://joost.blog/path-forward-for-wordpress/
3•twapi•46m ago•0 comments

Fair aims to decentralize WordPress.org services, backed by Linux Foundation

https://www.therepository.email/fair-to-decentralize-wordpress-backed-by-linux-foundation-and-contributors
5•ValentineC•52m ago•0 comments

How to Run Webinars

https://blog.engora.com/2023/07/how-to-run-webinars.html
2•Vermin2000•53m ago•0 comments

Private Equity-Owned Companies Pocket Class Action Payouts

https://www.forbes.com/sites/jeffkauflin/2025/05/21/how-private-equity-owned-companies-quietly-pocket-class-action-payouts/
2•walterbell•54m ago•0 comments

Tesla AI VP Milan Kovac Resigns After 9 Years Leading FSD and Optimus Projects

https://gearmusk.com/2025/06/07/tesla-ai-vp-milan-kovac-resigns/
4•loog5566•1h ago•0 comments

Show HN: The 5-minutes Competitor Analysis

https://www.ycompetitor.com/
2•rubeekrumpet•1h ago•0 comments

I built an Image Splitter tool in under an hour using ChatGPT

https://tools.techchee.com/image-tools/image-splitter
2•ketyung•1h ago•1 comments

DeepSeek-R1-0528 Did Not Have a Moment

https://thezvi.substack.com/p/deepseek-r1-0528-did-not-have-a-moment
3•paulpauper•1h ago•2 comments

What Happens When People Don't Understand How AI Works

https://www.theatlantic.com/culture/archive/2025/06/artificial-intelligence-illiteracy/683021/
3•paulpauper•1h ago•0 comments

Ask HN: Do we need a language designed specifically for AI code generation?

2•baijum•1h ago•0 comments

Good pixel art can be one-shotted by AI now

https://gametorch.app/collections/7
3•gametorch•1h ago•3 comments

I dream of roombas: 1000s of automated AI robots that autonomously maintain code

https://ghuntley.com/ktlo/
5•ghuntley•1h ago•5 comments

China Kicks Off Human Testing of Implantable Brain-Computer Interface Devices

https://www.yicaiglobal.com/news/china-kicks-off-human-testing-of-implantable-brain-computer-interface-devices
2•gametorch•1h ago•0 comments

Why are front end dev demand so high if front end development is easier? (2012)

https://simonwillison.net/2012/Feb/13/why-are-front-end/
15•thunderbong•1h ago•4 comments

A Novel "Reasoning"-Enhancing Technique for Large Language Models

https://marqcodes.com
2•N3Xxus_6•1h ago•2 comments

Astonishing discovery by computer scientist: how to squeeze space into time [video]

https://www.youtube.com/watch?v=p_AW6fomKPI
2•drhodes•1h ago•0 comments

Show HN: Resumable Web Streams

https://github.com/vercel/resumable-stream
3•cramforce•2h ago•0 comments

AMC Says It Will Show More Ads Before Movies

https://www.nytimes.com/2025/06/06/business/movies-theaters-ads-amc.html
7•cebert•2h ago•11 comments

Getting C++ Hello World working on Windows (a comedy & tragedy)

https://sdegutis.github.io/blog/creating-cpp-hello-world.html
4•90s_dev•2h ago•2 comments

NASA delays next flight of Boeing's alternative to SpaceX Dragon

https://theedgemalaysia.com/node/758199
7•bookmtn•2h ago•2 comments

Can Schrodinger's Cat Factor Numbers?

https://mathpages.com/home/kmath013/kmath013.htm
3•gametorch•2h ago•0 comments

NASA Delays Next Flight of Boeing's Alternative to SpaceX Dragon

https://www.bloomberg.com/news/articles/2025-06-06/nasa-delays-next-flight-of-boeing-s-alternative-to-spacex-dragon
3•bookmtn•2h ago•0 comments

California AG vows crack down on copper wire thefts in the state

https://abc7.com/post/california-ag-rob-bonta-vows-crack-down-copper-wire-thefts-state/16678391/
2•lxm•2h ago•0 comments

Show HN: A photo backup idea – to your own storage, not iCloud/Google

https://myphoto-vault.netlify.app/
4•Nainiket•2h ago•0 comments

Getting Past Procrastination

https://spectrum.ieee.org/getting-past-procastination
20•WaitWaitWha•2h ago•5 comments

Reverse Engineering Cursor's LLM Client

https://www.tensorzero.com/blog/reverse-engineering-cursors-llm-client/
4•paulwarren•2h ago•0 comments

Show HN: Cpdown – Copy any webpage/YouTube subtitle as clean Markdown(LLM-ready)

https://github.com/ysm-dev/cpdown
2•ysm0622•2h ago•0 comments

Pentagon Disinformation Fueled America's UFO Mythology

https://www.wsj.com/politics/national-security/ufo-us-disinformation-45376f7e
6•doener•2h ago•1 comments