星期三, 10月 29, 2025

EX#8 A* macro thinking Part 3 (Backtracking)

  課堂練習 

Deadline: Regularly This Saturday at 23:59 因期中考緣故繳交日延後一周(11/10/2025)

Send all the links to  me chang212@gmail.com by email with subject EX#8   [your id, your name].


1. 使用聰明狗 A*模胚,模擬聰明狗 A* 每個情境的動畫 (來源:班上同學)




2. 續上題,依據決策樹自動模擬每個情境



3. 提升美學與完成度,進入v1從這裡開始 (來源:班上同學)


Deep Learning Neural Networks

ImageNet Labeling: Understanding the Imperfections 1. The Ideal vs. A Simple Error 🍌 Ideal Case Banana Common Error Dog 2. The Single-Label Problem Image has multiple objects frisbee ImageNet "Ground Truth" Dog AI Model Prediction Frisbee RESULT: WRONG 3. Ambiguity & Fine-Grained Classes ? Blurry or ambiguous Husky vs. Malamute? Hard even for experts Malamute 4. The Evolution & The Solution: Re-labeling Sometimes, AI predictions are better than the original labels 📷 Original Label: "Seashore" AI Prediction: "Breakwater" Solution: Clean data & apply multiple correct labels frisbee Dog Frisbee

Computer Network

How Networks Handle Packet Loss: TCP vs. UDP TCP: The Reliable Method (e.g., File Transfer, Web Browsing) Sender Receiver Time 1. Sender sends numbered packets P1 P2 2. Packet 3 is lost in transit! P3 P4 3. Receiver ACKs what it got (P1, P2) ...and keeps requesting P3 by sending ACKs for P2 ACK 1 ACK 2 ACK 2 (Dup ACK) 4. Sender retransmits the lost packet P3 5. Data is complete and ordered. Transfer resumes. ACK 4 UDP: The Fast Method (e.g., Video Streaming, Online Gaming) Sender Receiver Time 1. Sender streams packets continuously F1 F2 F3 2. Frame 4 is lost. No retransmission occurs. F4 F5 3. The stream continues, causing a minor glitch. Speed is prioritized over perfection. Frame 2 Frame 3 Glitch Frame 5 4. User experiences a brief imperfection, not a pause.

星期二, 10月 28, 2025

Application of Reed-Solomon codes

Reed-Solomon Codes: Real-World Applications QR Codes Recovers data from smudges or tears. Clean Code Damaged Code SCAN OK! CDs/DVDs/Blu-rays Plays smoothly over scratches. Scratched Disc Burst Error PLAY OK! Space Transmission Recovers clear images from noisy signals. Space Probe Earth Noise IMAGE OK! RAID 6 Storage Survives two simultaneous drive failures. Disk 1 Disk 2 Disk 3 Disk 4 X X OK FAILED OK FAILED DATA SAFE!

Hamming code

1. Sender: Encoding 2. Transmission & Error 3. Receiver: Correction Original Data (1011) 1 D3 0 D5 1 D6 1 D7 Encoded Codeword 0 P1 1 P2 1 D3 0 P4 0 D5 1 D6 1 D7 P1 checks D3, D5, D7 (1+0+1=even) P2 checks D3, D6, D7 (1+1+1=odd -> P2=1) P4 checks D5, D6, D7 (0+1+1=even) Transmitted: 0110011 Bit 6 flips! Received Codeword 0 1 1 0 0 0 1 Parity Re-check P1 (1,3,5,7): 0+1+0+1 = even P2 (2,3,6,7): 1+1+0+1 = odd P4 (4,5,6,7): 0+0+0+1 = odd Error Syndrome Failed checks are P2 and P4. Position 2 + Position 4 = Bit 6 Correction Flip bit at position 6. 0 1 1 0 0 1 1 Recovered Data 1 0 1 1

Reed-Solomon codes

1. Sender: Encoding 2. Transmission & Burst Error 3. Receiver: Decoding & Correction Original Data Symbols (k=4) D1 D2 D3 D4 Calculate Parity Symbols (n-k=2) P1 P2 Full Codeword (n=6). All symbols lie on a polynomial curve. D1 D2 D3 D4 P1 P2 Burst Error Corrupts a Sequence! Received Codeword with Errors D1 D2 X D4 Y P2 Check which symbols are "off the curve" Error! Error! 2 parity symbols can correct 2 symbol errors. Corrected Codeword D1 D2 D3 D4 P1 P2 Recovered Original Data D1 D2 D3 D4

星期三, 10月 22, 2025

EX#7 A* macro thinking Part 2 (Synchronization)

 

建議工具

使用 Claude Sonnet 4 推理模式(手動切換,免費用戶額定時間內只能使用三次)

使用 ChatGPT 5 推理模式(自動切換)

使用 Gemini 2.5 Pro 免費額度最高 1M tokens (永遠推理模式)

使用 Grok 4 推理模式(自動切換)


課堂練習 

Deadline: This Saturday at 23:59

Send all the share links to  me chang212@gmail.com by email with subject EX#7 [your id, your name]


任選兩題


1. 推理模式 special topic Smart Dog Ball Retrieval 











more animations (by student)



2. Dinner Operation A* macro thinking


To-do 1:

Build A* search animation 







 A* search tree animation in detail








Advanced visualization with backtrack included and transit animated (Data visualization techniques)

note: Under A* search heuristics,  backtracking does not happen in this case. Therefore, "backtracking" here is a borrowed concept.  Tree may not be accurate as Sarah is left out on the goal path.

3. Build Puzzle 1 animation synced with search tree based on A* macro thinking.  





星期二, 10月 14, 2025

EX#6 A* macro thinking

  1. Try smart search. Prompt AI models to generate A* search Algorithm. 






3, 4 二選一

3. for 推理模式 special topic Smart Dog Ball Retrieval

Visualize the optimal solution sequence. Then visualize any other solution. Plan A&Plan B.



\




 



4. Build Puzzle 1 viz search tree based on A* macro thinking.  









星期五, 10月 10, 2025

Follow up to #5 Complex Constraints, Part 2

 validator 打開沒有資料,為什麼


你餵的資料,被處理後就被扔掉了
你要放進AI的永久記憶
我才看得到

to place your data into the validator, pls refer to the following.




檢查你的渡河計畫是否正確

Use validator+ to check up the plan




如果你希望驗證結果可輸出為app
1. 先進入 validator+
2. 按下右上方 customize 鍵
3. 接下來的操作步驟



星期四, 10月 09, 2025

晚餐接機大作戰(半導體廠製程排程): Part 3 A* on macro thinking Level

搶救感恩節晚餐大作戰講義 題目 


Claude Solving with A* Macro Thinking  


A* Search animation, explaining State 6B



真正的狀態演變是有一些關鍵決策點的,例如在兩點的時候,詹姆士在機場租好車了,要嘛留在機場等艾蜜莉三點出關,或是直接開車回家再說,反正艾蜜莉根本還沒降落,
這是兩條截然不同的發展路徑


ChatGPT 5 A* Macro ThinkingSearch Tree



Grok 4 Optimal






Sub optimal

Solving with A*






history

Try smart search. Prompt Claude Sonnet 3.7, ChatGPT o1, Grok 3 Think to perform A* search

Optimal

Solving with A*

Plan by A* (animation), explaining State 6B

Detailed Analysis of James's Decision at 2:00 PM (animation)


history

使用 Claude 3.7 Extended Trial 1

使用 Claude 3.7 Extended Trial 2


history

(呂利威)

Solving the Thanksgiving Dinner Planning Problem with A* Search (Prompted by Optimal A* Search in Python Program)

A* Search TraceA* search tree

Time Chart (Schedule)


Sub optimal

Solving with A*


ChatGPT o1 Reasoning, prompt "Use A*", same result, no improvement



星期三, 10月 08, 2025

Dog Ball Retrieval


推理模式 special topic Smart Dog Ball Retrieval 


EX#5 Solving Problems with Complex Constraints, Part 2

建議工具

使用 Claude Sonnet 4 推理模式 (手動切換,免費用戶額定時間內只能使用三次)

使用 ChatGPT 5 推理模式 (自動切換)

使用 Gemini 2.5 Pro 免費額度最高 1M tokens (永遠推理模式)

使用 Grok 4 推理模式(自動切換)


課堂練習 

Deadline: This Saturday at 23:59

Send all the share links to me chang212@gmail.com by email with subject EX#5  [your id, your name]


1. solve Puzzle 3 River Crossing by reasoning

檢查你的渡河計畫是否正確

Use validator+ to check up the plan

如果你希望驗證結果可輸出為app

  1. 先進入 validator+
  2. 按下右上方 customize 鍵
  3. 接下來的操作步驟
  4. 結果輸出為app

繳交範例

ChatGPT: validation,  BFS*,  visualize

Claude: validation,  reasoning!, visualize 

如何將驗證過的答案視覺化
  • 方法一: 版型套用

    如果你要使用現成版型(artifact type) 做行程視覺化,步驟如下

    1. 找到版型程式 (圖下方連結)
    2. 按介面右上方 customize  鍵
    3. 輸入你的文字版時間排程
    4. 得到動畫可以分享連結繳交
  • 方法二: 使用視覺化AI App 
    1. 進入 visualizer
    2. 按下 customize
    3. 輸入你的文字計畫到Claude,執行 Claude
    4. Claude 會製作一個新的 visualizer,已經塞好你提供的計劃
    5. 發布(publish) 得到你的連結
    6. 得到專業的渡河計畫動畫

    (因為Claude不允許artifact產生新的artifact,所以多了一些步驟如上)

  • 方法三: 自行給予提示

2. solve Puzzle 3 River Crossing by code generation for python A* search 

To run Python, use Google Colab

If you are not familiar with Python, you can also convert Python to JavaScript to run on Browsers.

繳交範例 

Claude A* Gen*, Colab, Validator, Visualize 

ChatGPT: BFS*, colab, validatorvisualize

ChatGPT: BFS* (auto), visualize

3. solve 渡河問題4

You can use reasoning or generate a search program to solve it.

檢查你的渡河計畫是否正確

Use validator4+ to check up the plan

如果你希望驗證結果可輸出為app

  1. 先進入 validator4+
  2. 按下右上方 customize 鍵
  3. 接下來的操作步驟
  4. 結果輸出為app

繳交範例

Claude validationreasoning!,  Visualization

Claude validation, BFS* (auto),  Visualization 

ChatGPT validationBFS* (auto), Visualization 

星期日, 10月 05, 2025

AI Helper comes to rescue

River Crossing Puzzle 3





2. Use validator to check up the plan



3. Copy the violations if any

violations (from Claude Reasoning)

4. Paste violations into the AI so it can do the reasoning again according to your validation report. Go to step 1 and repeat.  AI may call for help if it cannot fix itself. 





Case with repeated failures (Claude reasoning on Puzzle 4)

Great rescue (ChatGPT on Puzzle 4) - ChatGPT intuitive!, validator, BFS*viz