search.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:Pacman-AI 作者: ryanshrott 项目源码 文件源码
def aStarSearch(problem, heuristic=nullHeuristic):
    "Search the node that has the lowest combined cost and heuristic first."

    # Use the genericSearch method, with the fringe maintained with a 
    # PriorityQueue. The cost is calculated using the provided heuristic. 
    # If no heuristic is given (such as UCS), then default to the given
    # nullHeuristic
    return genericSearch(problem, util.PriorityQueue(), heuristic)


# Abbreviations
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号