Optimize board generation by relying on dirty heuristics as to whether to lazily bfs or eagerly dfs.