Skip to main content

A*搜索算法

Project description

  • 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xhAStar-0.0.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xhAStar-0.0.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file xhAStar-0.0.2.tar.gz.

File metadata

  • Download URL: xhAStar-0.0.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for xhAStar-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2a15dc0d2902ec7323380e36933f54a50462b559796a61b64f850f8e01739467
MD5 407ceccfefd09c106e10e860f4558919
BLAKE2b-256 bd085b44231e39cdfc3dd36dd9d1340821a642cd812f64205fce04cbb85ba27e

See more details on using hashes here.

File details

Details for the file xhAStar-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: xhAStar-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for xhAStar-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c672c088701191f6b708ec25e359113bbafc3425eeccf930a2fe94948a2d6686
MD5 0531f0cc6dc22f88f14e3fefa928146f
BLAKE2b-256 d59cb5fa4862b96c2d4f472a255d5f8db5d3f67b56ba943f65f96ba4b703c175

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page