Files
e2hang 265b8af720 IDS
2025-09-11 15:53:33 +08:00

15 lines
588 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

🔹 基本思想
广度优先搜索 (BFS):逐层扩展,能保证找到最优解,但需要大量内存。
深度优先搜索 (DFS):沿一条路径搜索下去,内存消耗小,但可能陷入深层无解分支,不能保证最优解。
**迭代加深搜索 (IDS) 的做法是:**
设定一个最大搜索深度限制depth limit先用 DFS 在这个深度内搜索。
如果没找到解,就把深度限制增加 1再次用 DFS 搜索。
重复以上过程,直到找到目标或达到全局深度上限。
> 重点是树没有上限的情况->棋类竞技