pacai.search.mazetiny

 1import random
 2import typing
 3
 4import pacai.core.search
 5
 6def maze_tiny_search(
 7        problem: pacai.core.search.SearchProblem,
 8        heuristic: pacai.core.search.SearchHeuristic,
 9        rng: random.Random,
10        **kwargs: typing.Any) -> pacai.core.search.SearchSolution:
11    """
12    Output a very specific set of actions meant for the `maze-tiny` board.
13    This (fake) search will generally not work on other boards.
14    """
15
16    actions = [
17        pacai.core.action.SOUTH,
18        pacai.core.action.SOUTH,
19        pacai.core.action.WEST,
20        pacai.core.action.SOUTH,
21        pacai.core.action.WEST,
22        pacai.core.action.WEST,
23        pacai.core.action.SOUTH,
24        pacai.core.action.WEST,
25    ]
26
27    return pacai.core.search.SearchSolution(actions, 0.0)