Skip to main content
  • A*寻路算法 pip install xhAStar

使用方法

import astar
w, h = 6, 3
start, goal = (0, 0), (3, 2)
walls = [(2, 1), (3, 1), (4, 1)]
obj = astar.AStar(w, h, start, goal, walls, astar.MANHATTAN)
print(obj.result)

AStar参数说明:

  • w (int): 长
  • h (int): 宽
  • start (Tuple[int, int]): 起始点
  • goal (Tuple[int, int]): 终点
  • walls (List[Tuple[int, int]]): 墙壁坐标列表
  • type (int, optional): 寻路类型. 默认为曼哈顿寻路 MANHATTAN.

Release files for xhAStar 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xhAStar 0.0.2
File Size Uploaded
xhAStar-0.0.2.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xhAStar 0.0.2
File Interpreter ABI Platform
xhAStar-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / xhAStar-0.0.2.tar.gz

Download URL xhAStar-0.0.2.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2a15dc0d2902ec7323380e36933f54a50462b559796a61b64f850f8e01739467
BLAKE2b-256 checksum
How to use checksums
bd085b44231e39cdfc3dd36dd9d1340821a642cd812f64205fce04cbb85ba27e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Release files / xhAStar-0.0.2-py3-none-any.whl

Download URL xhAStar-0.0.2-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c672c088701191f6b708ec25e359113bbafc3425eeccf930a2fe94948a2d6686
BLAKE2b-256 checksum
How to use checksums
d59cb5fa4862b96c2d4f472a255d5f8db5d3f67b56ba943f65f96ba4b703c175
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page