AI assignment 2
AI assignment 2
AI assignment 2
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
間 center 所在的那層也能轉)—來比較跨的話,branching factor 從 27 降到 15,<br />
searching space 已經大大的縮小許多。<br />
2.<br />
如果說對蹹於任何一個鞄 initial state,它的 optimal solution 是在 depth n 的地方,按<br />
第一小題 problem 的定義,在 worst case 下 search tree 的 size 會等於 O( 15^n )。<br />
3.<br />
可以用三度空間的 Manhattan distance 來定義 heuristic function。就是去算每個鞄<br />
corner 跟 edge 各自根頨據所定義的 action,轉動到它們靽正確位置上的 Manhattan<br />
distance 的總和(例如把一個鞄 corner 轉到它正確的位置上要 3 個鞄 action,Manhattan<br />
distance 就是 3)。然後因為每個鞄 action 會改變 4 個鞄 corner 與 4 個鞄 edge 的位置,也<br />
就是 state 裡面的 8 個鞄 element,所以為了要 admissible,最後 Manhattan distance<br />
的總和還要除以 8,成為最後 heuristic function 的值靹。<br />
因為這個鞄 heuristic function 是 admissible 的,所以若是用 A*或 IDA*來做,可以<br />
保證找出 optimal solution 這是我認為它好的原鞝因。<br />
作業 reference:<br />
Richard E. Korf: Finding Optimal Solutions to Rubik's Cube Using Pattern Databases.<br />
AA<strong>AI</strong>/IA<strong>AI</strong> 1997: 700-705