Berikut contoh hasil jalur pencarian algoritma ZIP2 (disederhanakan) dalam konteks path planning dari titik awal ke tujuan.
Contoh 1 — Representasi Grid
Keterangan:
S= StartG= Goal#= Rintangan*= Jalur hasil ZIP2
Peta Awal
S . . # . .
. # . # . .
. # . . . .
. . # # # .
. . . . . G
Hasil Jalur ZIP2
S * * # . .
. # * # . .
. # * * * .
. . # # # *
. . . . . G
➡️ ZIP2 memilih jalur yang efisien dengan meminimalkan belokan tajam dan menghindari rintangan, tetap mempertahankan jarak tempuh relatif pendek.
Contoh 2 — Bentuk Koordinat Jalur
Misal grid koordinat (x, y):
| Urutan | Koordinat |
|---|---|
| 1 | (0,0) Start |
| 2 | (1,0) |
| 3 | (2,0) |
| 4 | (2,1) |
| 5 | (2,2) |
| 6 | (3,2) |
| 7 | (4,2) |
| 8 | (5,3) |
| 9 | (5,4) Goal |
Contoh 3 — Output Ringkas (Log Sistem)
ZIP2 Path Found
Cost : 9.8
Turns : 3
Obstacles : avoided
Path Status : optimal
Contoh Hasil Jalur Pencarian ZIP2
1. Grid Awal
S . . # . .
. # . # . .
. . . . . .
. . # # # .
. . . . . G
. # . # . .
. . . . . .
. . # # # .
. . . . . G
2. Hasil Jalur ZIP2
S * * # . .
. # * # . .
. * * * . .
. . # # # *
. . . . . G
. # * # . .
. * * * . .
. . # # # *
. . . . . G
3. Koordinat Jalur
| Urutan | Koordinat (x,y) | Keterangan |
|---|---|---|
| 1 | (0,0) | Start |
| 2 | (1,0) | Move |
| 3 | (2,0) | Move |
| 4 | (2,1) | Turn |
| 5 | (2,2) | Move |
| 6 | (3,2) | Move |
| 7 | (4,2) | Move |
| 8 | (5,3) | Turn |
| 9 | (5,4) | Goal |
4. Output Log Sistem
ZIP2 Path Found
Cost : 9.8
Turns : 3
Obstacles : avoided
Path Status : optimal
Cost : 9.8
Turns : 3
Obstacles : avoided
Path Status : optimal
Contoh Jalur Pencarian ZIP2 (Skala Besar)
1. Grid Awal (15 × 10)
S . . . # . . . . . # . . . .
. # # . # . # . # . # . # . .
. . . . . . # . . . . . # . .
# . # # # . . . # . # . . . .
. . . . . . . # # # . . . # .
. # . # . . . . . . . # . . .
. # . . . # # # . # . . . . .
. . . . . . . . . . . . # . .
# . # . # . # . # . # . # . .
. . . . . . . . . . . . . . G
. # # . # . # . # . # . # . .
. . . . . . # . . . . . # . .
# . # # # . . . # . # . . . .
. . . . . . . # # # . . . # .
. # . # . . . . . . . # . . .
. # . . . # # # . # . . . . .
. . . . . . . . . . . . # . .
# . # . # . # . # . # . # . .
. . . . . . . . . . . . . . G
2. Hasil Jalur ZIP2
S * * * # . . . . . # . . . .
. # # * # . # . # . # . # . .
. . . . * * # . . . . . # . .
# . # # # . . * # . # . . . .
. . . . . . . # # # * * * # .
. # . # . . . . . . . # * * .
. # . . . # # # . # . . . * .
. . . . . . . . . . . . # * .
# . # . # . # . # . # . # * .
. . . . . . . . . . . . . * G
. # # * # . # . # . # . # . .
. . . . * * # . . . . . # . .
# . # # # . . * # . # . . . .
. . . . . . . # # # * * * # .
. # . # . . . . . . . # * * .
. # . . . # # # . # . . . * .
. . . . . . . . . . . . # * .
# . # . # . # . # . # . # * .
. . . . . . . . . . . . . * G
3. Contoh Koordinat Jalur (Dipadatkan)
| Step | Koordinat (x,y) | Aksi |
|---|---|---|
| 1 | (0,0) | Start |
| 4 | (3,0) | Move Straight |
| 7 | (4,2) | Turn + Move |
| 12 | (7,3) | Navigate Gap |
| 18 | (12,4) | Smooth Path |
| 24 | (13,7) | Diagonal Bias |
| 30 | (14,9) | Goal |
4. Output Log ZIP2
ZIP2 SEARCH ENGINE
----------------------------
Grid Size : 15 x 10
Total Nodes : 150
Visited : 47
Path Length : 30
Turns : 6
Smooth Cost : 12.6
Obstacles : Successfully Avoided
Status : OPTIMAL PATH FOUND
----------------------------
Grid Size : 15 x 10
Total Nodes : 150
Visited : 47
Path Length : 30
Turns : 6
Smooth Cost : 12.6
Obstacles : Successfully Avoided
Status : OPTIMAL PATH FOUND
ChatGPT
ZIP2 – Robot Motion & Heading Simulator
1. Kontrol Robot
2. Grid & Robot
Robot Status: READY
3. Jalur Final ZIP2
Robot mengikuti jalur hasil ZIP2 dan akan berbelok sesuai perubahan arah.
Comments