HPA* (Near Optimal hierarchical Path-finding) —— 外网的讲解blog
原地址:
https://alexene.dev/2019/06/02/Hierarchical-pathfinding.html
讲解视频:
https://www.youtube.com/watch?v=qSbSb8vMbLI

目标问题:

为不同的分割区建立door,也就是两个分割器有两个相邻的小格,这两个小格子是可以联通的,下图中指的是在黄色线两侧的相邻的两个蓝色小格子。

在每个划分后的格子里面(黄色线割出的大格子)设置好蓝色的door后,为大格子内的所有蓝色小格子建立连接,并得到彼此之间的连接路径的长度。注意,往往我们会在一个大格子的边缘上选几个点,而这里是将所有的边上的点(没有阻碍的点,不包括黑点)都设置为可以联通的点,比如一个10 * 10的大格子,我们一个边上有10个点,但是我们实际中并不会设置10个door,而是在这10个中选择几个,如三个点作为door。

在大格子中,10 * 10 的格子中,我们也是使用A* 算法建立出边缘点之间的连接路径的,因此如果边缘点上选择过多的作为door就会导致在为大格子计算内部路径时耗费过多的计算资源,因此我们可以选择大格子边缘上的几个点作为door。
我们知道了在大格子内部为边缘上的door建立路径,这时候使用的是A* 算法,我们需要把这个结果进行保存,在大格子之间进行寻路时依然使用A* 算法,这时我们选择哪个大格子作为下一步时是只选取之前保存的路径数值的。

Getting a path
Now that we have our high-level cells and they have connections between them and internal connections we just need to explore two things when we are searching for a path.
- From the starting point find all possible high-level connections that we can start from
- Traverse the high-level graph until we reach the high-level cell containing the destination.
- Once we reached that end high-level cell, do a low-level A* to find if from the entry point we have a path to the destination.
As our entity moves through the world it will encounter a cell that’s connected to another far away cell. This is for the case where we need to traverse a high-level cell. In that case we have to call A* pathfinding again for that high-level cell.
It is also possible to cache the path and just querry it as it saves us a A* search for a 10x10 cell. This is what I do and if you have spare memory to cache these paths I highly recommend doing so.
For example a path from the start point S to the destination D will look like this:
- The orange cells are part of low-level paths.
- The red cells are connected in the high-level pathfinding grid. For them we either have low-level paths cached or we compute them as needed. When we reach the first cell touched by that red arrow.
HPA* (Near Optimal hierarchical Path-finding) —— 外网的讲解blog的更多相关文章
- mysql 设置服务器的MySQL允许远程访问/外网访问
设置服务器的MySQL允许远程访问/外网访问 https://blog.csdn.net/weixin_34232363/article/details/85889037
- 服务器发布tomcat的WEB项目供外网访问
1.首先你要确定你有一个外网ip地址.如果你分配到的是一个局域网IP地址需要经过一系列的转换为外网ip地址,然后继续下面操作. 2.拿到外网IP地址,进行tomcat的server.xml文件的配置. ...
- 【转】CentOS5.6下配置rsync内网同步数据到外网
[转]CentOS5.6下配置rsync内网同步数据到外网 本文转自:http://www.linuxidc.com/Linux/2012-06/64070.htm 一.需求 卫士那边有一个需求,就是 ...
- ngrok访问外网
1. 外网映射工具介绍 windows用户: 1,下载windows版本的客户端,解压到你喜欢的目录2,在命令行下进入到path/to/windows_386/下3,执行 ngrok -config= ...
- 如何在自己的Windows系统上 架设服务器并开发网站,然后连入外网供外界访问?(JDK+Tomcat+花生壳)
<目前百度谷歌上都木有我这么完整的笔记,虽然各个部分都是来自百度的,然后自己实践,自己做截图笔记,嘻嘻 Made By HeYang> 环境:Windows 7 工具:JDK,Apache ...
- 外网访问自己的tomcat
我们平常学习时经常会写一下javaweb程序,我们为了更能逼近现实,就想着自己的javaweb程序发布后,外网的同学能够访问我们的网站,难道我们去买空间,去买域名嘛,其实也没必要,我们只是学习,测试之 ...
- 【转】使用miniupnpd-->upnp协议 映射本地端口到外网
miniupnpc的主要函数介绍 1>.miniupnpc库主要使用的头文件有 #include"miniwget.h" #include"miniupnpc.h& ...
- 如何利用自己的电脑做服务器发布tomcat的WEB项目供外网访问
1.首先你要确定你有一个外网ip地址.如果你分配到的是一个局域网IP地址需要经过一系列的转换为外网ip地址,然后继续下面操作. 2.拿到外网IP地址,进行tomcat的server.xml文件的配置. ...
- 外网如何访问本地tomcat web服务器【转】
转自:http://jingpin.jikexueyuan.com/article/49159.html 外网如何访问本地tomcat web服务器 作者: XHKJOE 发布时间:2015-07-1 ...
- Tomcat禁止外网访问
Tomcat中某个应用禁止外网访问 Tomcat中有多个应用,由于权限需要,将某一个主机禁止外网访问.在config/server.xml中设置: <Host name="172.16 ...
随机推荐
- Linux扩展篇-shell编程(五)-流程控制(四)-while语句
基本语法: while [ condition ] do statement done 或 while [ condition ]; do statement done 注意事项: 实践:
- Python BeautifulSoup定位取值
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* ...
- 喜讯!极限科技再次中标中国移动云 Elasticsearch 自研版技术开发服务项目!
喜讯!极限科技 再次中标 中国移动云 Elasticsearch 自研版技术开发服务项目! 近日,极限科技再次成功中标中国移动苏州研发中心 <云能力中心 2023-2024 年移动云 Elast ...
- Scrapy框架(五)--请求传参
在某些情况下,我们爬取的数据不在同一个页面中,例如,我们爬取一个电影网站,电影的名称,评分在一级页面,而要爬取的其他电影详情在其二级子页面中. 这时我们就需要用到请求传参. 请求传参的使用场景 当我们 ...
- 将html页面转成pdf下载保存(html2canvas + jspdf或者Print调出打印功能导出pdf)
方案1:html2canvas + jspdf (缺点:清晰度不高) 安装插件: 亲测可用 yarn add html2canvas yarn add jspdf import html2canvas ...
- maven依赖关系及打包及阿里云仓库地址
https://developer.aliyun.com/mvn/search 阿里云仓库地址,可以搜索 <repositories> <repository> <id& ...
- 记录一下tomcat报错日志分析(去重分类)
#!/usr/bin/env python # coding=utf-8 import os folder_path = 'E:\\Desktop' output_file = 'E:\\Deskto ...
- Go1.13的坑:无法结束Goroutine
背景 本人作为一名SRE,想用Go模拟Cpu占用100% 1秒钟,但是在Go1.13上遇到了问题,1s后Goroutine不会停止. 只要用了for{},Goroutine就无法结束,即使主Gorou ...
- EEPROM、Flash有关知识
存储器分为两大类:RAM(Random Access Memory,任意地址访问储存器)和ROM(Read-Only Memory,只读储存器). 发展历史 ROM Read-Only Memory, ...
- STM32 CubeMX 学习:003-定时器
背景 上一讲 STM32 CubeMX 学习:外部中断的使用 介绍了如何配置以及操作GPIO外部中断. 这一讲我们介绍定时器的有关概念,并对其中一种进行示范. HOST-OS : Windows-10 ...