Issue 29: Global Search - Worked out tree search algorithm