惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
罗磊的独立博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
A
About on SuperTechFans
WordPress大学
WordPress大学
B
Blog
Martin Fowler
Martin Fowler
Jina AI
Jina AI
I
InfoQ
P
Proofpoint News Feed
小众软件
小众软件
S
SegmentFault 最新的问题
V
V2EX
B
Blog RSS Feed
量子位
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
MongoDB | Blog
MongoDB | Blog
美团技术团队

Red Blob Games: latest blog posts

Red Blob Games: English: a vs an Red Blob Games: Responsive design calculator Red Blob Games: Academic citations Red Blob Games: Highlighting interactive code blocks Red Blob Games: Optimizing page size Red Blob Games: Writing a guide to SDF fonts Red Blob Games: URLs with trailing punctuation Red Blob Games: What I did in 2025 Red Blob Games: Goodbye Sass Goodbye Sass Red Blob Games: RotMG map seeds Red Blob Games: Mapgen4 Mapgen4's use of WebGL2 Red Blob Games: Mapgen4 river shader Red Blob Games: Mapgen4 renderer Red Blob Games: Harnessing ChatGPT hallucinations Red Blob Games: Let Let's write a search engine, part 2 of 2 Red Blob Games: Let Let's write a search engine, part 1 of 2 Red Blob Games: Hexagon conversions Red Blob Games: Mapgen4 trade routes Red Blob Games: De-optimizing mapgen4 Red Blob Games: Hexagon spiral coordinates Red Blob Games: Thoughts on Flash Red Blob Games: What I did in 2024 Red Blob Games: Hexagon page animations Red Blob Games: SDF Halos SDF Halos Red Blob Games: SDF headless tests, part 2
Red Blob Games: Differential heuristics
2026-08-09 · via Red Blob Games: latest blog posts
Blog post: 8 Aug 2026

In 2005 Google showed off Google Maps, which lets you drag the map around instead of reloading the page like MapQuest and others used. That’s the feature that got everyone’s attention. But what got my attention was a feature they added in 2007 where you could drag the start/end points on a route[1], and it would recalculate the shortest path as you dragged. That means they had fast A* pathfinding on the entire world, which had millions of roads. How did they do it?

I had already studied A* and the common optimizations, but Google Maps was using optimizations I hadn’t learned about. I started reading papers. My reaction to almost all of them was “this complexity isn’t worth it unless your map is very large”. There was one technique however that was relatively simple, and I wanted to explore it further.

A better heuristic reduces how much of the map A* explores

In 2014 I wrote my interactive guide to A* pathfinding. I made a list of additional topics I wanted to cover, including graphs, heuristics, optimizations, data structures, and so on. One of these topics was the optimization I had learned about in 2007: differential heuristics (although it didn’t get that name until later).

I tried writing a tutorial about it in 2015 but I couldn’t find an explanation I liked. I tried again in 2016, 2018, 2019, 2022, 2024. I finally realized that I needed to stop trying to write a tutorial. Although I understood the algorithm, I didn’t understand it well enough to teach it.

I needed to understand it better. So I switched to learning and experimentation mode. I learned a lot. I went through some ups and downs. I learned that there’s still more to learn. Along the way I found an explanation I was happier with, and I rewrote the page again.

  1. I had previously shown the heuristic as lots of numbers. I switched to using two arrows. One is the direction the heuristic suggests and one is the correct direction. When they are in alignment, the heuristic makes A* run faster.

    Arrows showing heuristic mismatches
  2. I added visualizations showing the regions in which the optimization was effective, combined with an interactive diagram where I can move the points around to see how those regions change.

    Visualizing the improved areas

Here’s my new page about Differential Heuristics. I started over ten years ago so there are remnants of old text and code still there. I think there’s still plenty of room for improvement, but this is the first version I’m considering “released”.