Search code examples
artificial-intelligenceheuristicsconsistencytic-tac-toe

In game programming, how can I test whether a heuristic used is consistent or not?


I have thought of some heuristics for a big (higher dimensions) tic-tac-toe game. How do I check which of them are actually consistent?

What is meant by consistency anyways?


Solution

  • EDITED: This answer confused admissibility and consistency. I have corrected it to refer to admissibility, but the original question was about consistency, and this answer does not fully answer the question.

    You could do it analytically, by distinguishing all different cases and thereby proving that your heuristic is indeed admissible.

    For informed search, a heuristic is admissible with a search problem (say, the search for the best move in a game) if and only if it underestimates the 'distance' to a suitable state.

    EXAMPLE: Search for the shortest route to a target city via a network of highways between cities. Here, one could use the Eucidean distance as a heuristic: the length of a straight line to the goal is always shorter or equally long than the best possible way.

    Admissibility is required by algorithms like A*, which then quarantuee you to be optimal (i.e. they will find the best 'route' to a goal state if one exists).

    I would recommend to look the topic up in an AI textbook.