searchAgents.py 文件源码

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

项目:AIclass 作者: mttk 项目源码 文件源码
def cornersHeuristic(state, problem):
    """
    A heuristic for the CornersProblem that you defined.

      state:   The current search state
               (a data structure you chose in your search problem)

      problem: The CornersProblem instance for this layout.

    This function should always return a number that is a lower bound on the
    shortest path from the state to a goal of the problem; i.e.  it should be
    admissible (as well as consistent).
    """
    corners = problem.corners # These are the corner coordinates
    walls = problem.walls # These are the walls of the maze, as a Grid (game.py)

    "*** YOUR CODE HERE ***"
    return 0 # Default to trivial solution
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号