Search+Techniques

Searching in AI involves looking for a solution by searching all possible options until a match is found. These techniques are referred to as being brute force in that they try every option until a solution is found.




 * 1. Breadth First**

Searching each horizontal layer

1 - 2 - 3 - 4 - 5 - 6 - 7 - 8

Advantage: Quicker to find solution Disadvantage: Costly in memory because entire tree needs to be stored


 * 2. Depth First**

Search each branch from top to bottom

1 - 2 - 5 - 9 - 10 - 6 - 3 - 4 - 7 - 11 - 8

Advantage: Less memory intensive as a branch is no longer required once the search gets to the end Disadvantage: Slower to find solution


 * Combinatorial Explosion**

Combinatorial Explosion is the set of circumstances where AI problems grow very quickly. Consider an AI chess program searching for the best move:

In it's first move it has 3 possible moves Each of those 3 possible moves has a further 3 possible moves (3 x 3 = 9) Each of those 9 possible moves has a further 3 possible moves (9 x 3 = 27) Each of those 27 possible moves has a further 3 possible moves (27 x 3 = 81) Each of those 81 possible moves has a further 3 possible moves (81 x 3 = 243) Each of those 243 possible moves has a further 3 possible moves (243 x 3 = 729) Each of those 729 possible moves has a further 3 possible moves (729 x 3 = 2187) Each of those 2187 possible moves has a further 3 possible moves (729 x 3 = 6561) Each of those 6561 possible moves has a further 3 possible moves (729 x 3 = 19683) Each of those 19683 possible moves has a further 3 possible moves (729 x 3 = 59049) Each of those 59049 possible moves has a further 3 possible moves (729 x 3 = 177147) Each of those 177147 possible moves has a further 3 possible moves (729 x 3 = 531441)

So thinking just 12 moves head offers over half a million possible combinations

Thinking 20 moves ahead offers over 3.5 billion possible combinations


 * Heuristics**

This means using probability and priori knowledge to reduce the time it takes to search, by ignoring branches less likely to provide an answer. Produces an acceptable solution to a problem more often than not No formal proof of it's correctness May be correct, but no guarantee of best solution or best use of resources


 * Sample of breadth-first search:**

media type="youtube" key="XUEMP3ulYks" height="385" width="480"


 * Sample of depth first search:**

media type="youtube" key="Ev2o_qac4vI" height="385" width="480"