[Solved] Breadth-first Search Exercise – AI


Basically, you multiply the number of pieces with their individual potential mobility to get the theoretical branching factor for one side. That is, the number of possible moves at each search level.

Then you raise that figure to the power of the search depth to get the number of total positions to evaluate.

So if for the first search ply (half-move), the branching factor is N, then for a two-ply search the total number of positions is N*N, for three it’s N*N*N, and so on.

I’ll leave the rest up to you 🙂

solved Breadth-first Search Exercise – AI