基于 alpha-beta 剪枝搜索算法的 五子棋游戏_基于栅格地图的在线图形剪枝寻路算法...

本文提出了一种新的搜索策略,针对栅格地图的寻路问题,通过识别并扩展跳转点来加速最佳搜索。跳转点算法在保持最优性的同时显著减少了搜索时间和内存开销,与现有最优修剪技术相比,性能提升了一个数量级以上。算法的核心是跳转点的识别和邻接点的修剪规则,确保了在路径对称性下的高效搜索。
摘要由CSDN通过智能技术生成

Online Graph Pruning for Pathfinding on Grid Maps

基于栅格地图的在线图形剪枝寻路算法

摘要:统一代价栅格地图下的路径寻优是移动机器人和电子游戏等领域下的一个常见问题。最新的层次寻路算法速度快,内存开销小,但通常返回次优路径。本文提出了一种具体到栅格、快速且不需要太高内存开销的新的搜索算法。我们的算法可以描述为一个大步运算符,它选择性地计算栅格地图中的某些节点,我们称之为跳转点。连接两个跳转点的路径上的中间节点不参与计算。我们证明了这种方法总是能得到最优解,并进行了深入的实证分析,并与文献中的参考算法进行了比较。我们发现,使用跳转点搜索可以将A-star的速度提高一个数量级甚至更多,并且相比目前的技术水平有显著的改进。

Abstract: Pathfinding in uniform-cost grid environments is a problem commonly found in application areas such as robotics and video games. The state-of-the-art is dominated by hierarchical pathfinding algorithms which are fast and have small memory overheads but usually return suboptimal paths. In this paper we present a novel search strategy, specific to grids, which is fast, optimal and requires no memory overhead. Our algorithm can be described as a macro operator which identifies and selectively expands only certain nodes in a grid map which we call jump points. Intermediate nodes on a path connecting two jump points are never expanded. We prove that this approach always computes optimal solutions and then undertake a thorough empirical analysis, comparing our method with related works from the literature. We find that searching with jump points can speed up A* by an order of magnitude and more and report significant improvement over the current state of the art.

1 引言

广泛应用于机器人技术(Lee和Yu,2009年)、人工智能(Wang和Botea,2009年)和视频游戏(Davis 2000年;Sturtevant,2007年)等领域,无处不在的无向均匀代价网格地图是一种非常流行的表示寻路环境的方法。在自然界中,这个域通常具有高度的路径对称性(Harabor and Botea 2010;Pochter et al.2010)。在这种情况下,对称性表现为路径(或路径段),这些路径共享相同的起点和终点,具有相同的长度,并且除了移动发生的顺序之外,其他路径都是相同的。除非处理得当,对称性可能会迫使搜索算法评估许多等效状态,并阻止朝着目标的真正进展。

在本文中,我们通过发展一个宏操作符来处理这种路径对称性,这个宏操作符只从网格中有选择地扩展某些节点,我们称之为跳跃点。从一个跳转点移动到下一个跳转点需要沿着固定的方向移动,同时重复应用一组简单的邻域修剪规则,直到到达一个死胡同或一个跳转点。因为我们不在跳转点之间扩展任何中间节点,所以我们的策略可以对搜索性能产生显著的积极影响。此外,计算的解保证是最优的。跳转点修剪是快速的,不需要预处理和介绍没有内存开销。它在很大程度上与许多现有的适用于栅格地图的加速技术正交。

我们做了以下贡献:(i)对跳跃点算法的详细描述;(ii)一个理论结果表明使用跳跃点搜索可以保持最优性;(iii)一个将我们的方法与两个最新的搜索空间缩减算法进行比较的实证分析。我们在文献中的一系列合成和真实基准上进行了实验,发现跳转点将标准A-star的搜索时间性能提高了一个数量级甚至更多。我们还报告了对沼泽(Pochter et al.2010)的显著改进,这是一种最新的保持最优的修剪技术,其性能与HPA*(Botea、Muller和Schaeffer 2004)相竞争,在许多情况下占主导地位;这是一种众所周知的次优寻径算法。

2 相关工作

识别和消除搜索空间对称性的方法已在规划(Fox和Long 1999)、约束规划(Gent和Smith 2000)和组合优化(Fukunaga 2008)等领域提出。然而,很少有工作明确地识别和处理诸如栅格地图之类的寻路域中的对称性。

空矩形房间(Harabor和Botea 2010)是一种离线对称打破技术,试图纠正这种疏忽。它将栅格地图分解为一系列无障碍的矩形,并用一组宏边替换每个矩形内部的所有节点,以便于优化行程。具体到4连通映射,这种方法比跳点剪枝更通用。它还需要离线预处理,而我们的方法是在线的。

死胡同启发式(Bjornson and Halld-orsson 2006)和沼泽(Pochter et al.2010)是与我们的工作相关的两种类似的修剪技术。两者都将栅格地图分解为一系列相邻区域。稍后,此分解用于确定与优化求解特定寻径实例无关的区域。这个目标与我们的工作相似,但又是正交的,我们的工作的目的是减少探索搜索空间中任何给定区域所需的努力。

修剪搜索空间的另一种方法是识别死细胞和冗余细胞(Sturtevant、Bulitko和Bjornsson 2010)。该方法是在基于学习的启发式搜索的背景下发展起来的,它只在执行迭代深化算法的多次迭代之后才加速搜索。此外,冗余单元的识别需要额外的内存开销,而跳转点没有这些开销。

快速扩展(Sun等人,2009)是另一个加速最优A*搜索的相关工作。它避免了不必要的打开列表操作,当它找到一个与打开列表中的最佳节点一样好(或更好)的后续节点时。跳转点是一个相似但根本不同的想法:它们允许我们识别通常会扩展但可以完全跳过的大型节点集。

在不需要优化的情况下,分层寻路方法是普遍存在的。它们通过将搜索空间(通常离线)分解为更小的近似值来提高性能。这类算法,如HPA*(Botea、Muller和Schaeffer 2004),速度快,内存效率高,但也不太理想。

3 符号术语

我们使用无向一致代价网格图。每个节点有≤8个邻节点,可以遍历也可以不遍历。从一个可遍历的节点到它的一个邻居的每一个直线(即水平或垂直)移动的代价是1;对角线移动的代价是15543ec87af95b1a18df8c7bfcce9ea9.png。不允许涉及障碍物节点的移动。符号26573ee2fad3700fa27bafb125e524f8.png表示八个允许的移动方向之一(上、下、左、右、斜)。我们用010fd162fa3df1edaf67d0bc823265fb.png表示可以通过节点7c14c4c83aae4db5140c7244c2af0460.png26573ee2fad3700fa27bafb125e524f8.png方向移动d1f7ec09ca474a7f955396fe9a7b1aae.png个单位到达节点e96c1097ed7d573f1b31f60560fb9e16.png。当26573ee2fad3700fa27bafb125e524f8.png是对角线移动时,我们将与26573ee2fad3700fa27bafb125e524f8.png成45度角的两个直线移动表示为00629c2da843f16dfa862273a62b7f6c.png8636232c4f508cae9771bdbcf2177282.png

路径6380cb6ad9eded25226c2cba21697fc2.png表示从节点89b722ee37cdb8d1f2b7ec54da42f11a.png开始到节点8bd5530a7574281239a091a0a0b9cafc.png结束的无周期有序步行。有时我们会在路径的上下文中使用设定负运算符:例如aa2a9c42b1a6207af0a82eb18f23921a.png。这意味着被减去的节点7c14c4c83aae4db5140c7244c2af0460.png不会出现在路径54c807ab5ea64ebcd6fbaf379bd492bc.png上。我们还将使用函数

======================================================================== MICROSOFT FOUNDATION CLASS LIBRARY : fir ======================================================================== AppWizard has created this fir application for you. This application not only demonstrates the basics of using the Microsoft Foundation classes but is also a starting point for writing your application. This file contains a summary of what you will find in each of the files that make up your fir application. fir.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. fir.h This is the main header file for the application. It includes other project specific headers (including Resource.h) and declares the CFirApp application class. fir.cpp This is the main application source file that contains the application class CFirApp. fir.rc This is a listing of all of the Microsoft Windows resources that the program uses. It includes the icons, bitmaps, and cursors that are stored in the RES subdirectory. This file can be directly edited in Microsoft Visual C++. fir.clw This file contains information used by ClassWizard to edit existing classes or add new classes. ClassWizard also uses this file to store information needed to create and edit message maps and dialog data maps and to create prototype member functions. res\fir.ico This is an icon file, which is used as the application's icon. This icon is included by the main resource file fir.rc. res\fir.rc2 This file contains resources that are not edited by Microsoft Visual C++. You should place all resources not editable by the resource editor in this file. ///////////////////////////////////////////////////////////////////////////// For the main frame window: MainFrm.h, MainFrm.cpp These files contain the frame class CMainFrame, which is derived from CFrameWnd and controls all SDI frame features. ///////////////////////////////////////////////////////////////////////////// AppWizard creates one document type and one view: firDoc.h, firDoc.cpp - the document These files contain your CFirDoc class. Edit these files to add your special document data and to implement file saving and loading (via CFirDoc::Serialize). firView.h, firView.cpp - the view of the document These files contain your CFirView class. CFirView objects are used to view CFirDoc objects. ///////////////////////////////////////////////////////////////////////////// Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named fir.pch and a precompiled types file named StdAfx.obj. Resource.h This is the standard header file, which defines new resource IDs. Microsoft Visual C++ reads and updates this file. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" to indicate parts of the source code you should add to or customize. If your application uses MFC in a shared DLL, and your application is in a language other than the operating system's current language, you will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. For example, MFC42DEU.DLL contains resources translated to German.) If you don't do this, some of the UI elements of your application will remain in the language of the operating system. /////////////////////////////////////////////////////////////////////////////
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值