星期三, 4月 15, 2026

EX#7 Mathematical Optimization

 Assignment Structure 作業架構




md version 

Deadline:  Next Saturday at 23:59 (one more week) 期中考緣故,順延一周

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



Students choose from three progressively harder assignments. Each builds on the interactive "Optimization in Hyperspace" 3D visualizer, which demonstrates five algorithms navigating a fitness landscape.

同學從三份難度遞增的作業中逐一完成。每份皆以互動式「超空間最佳化」3D 視覺化工具為基礎,展示五種演算法在適應度地形上的行為。

Problem 1 — Conceptual Understanding 概念理解

  • Task 任務: Written reflection (300–500 words) on how each algorithm behaves on the landscape — local vs. global optima, exploration vs. exploitation.
  • 撰寫心得(300–500字),描述各演算法在地形上的行為差異——區域最佳解 vs. 全域最佳解、探索 vs. 開發的取捨。
  • Deliverable 繳交物: md (1–2 pages)
  • Difficulty 難度: ★☆☆

Problem 2 — Mathematical Analysis 數學分析

  • Task 任務: Implement gradient descent from scratch on a multimodal 2D function f(x,y) = sin(x)·cos(y) + 0.1(x² + y²). Test 3 starting points × 3 learning rates. Plot the surface + convergence paths.
  • 自行實作梯度下降法,應用於多峰 2D 函數。測試 3 個起點 × 3 種學習率 (α = 0.01, 0.1, 0.5),繪製曲面與收斂路徑。
  • Deliverable 繳交物: Code + 1-page report in artifact
  • Difficulty 難度: ★★☆

Problem 3 — Comparative Algorithm Design 演算法比較實驗

  • Task 任務: Compare Gradient Descent vs. Simulated Annealing (exponential cooling T(t) = T₀·γᵗ). Run 50 trials each from random starts; vary T₀ and γ; produce success-rate table + plot.
  • 比較梯度下降 vs. 模擬退火法(指數冷卻排程)。各執行 50 次隨機起點實驗,調整 T₀ 與 γ,製作成功率表格與圖表。
  • Deliverable 繳交物: Code + 1–2 page analysis with table & plot in artifact
  • Difficulty 難度: ★★★

Five Algorithms in the Visualizer 視覺化工具中的五種演算法

Algorithm 演算法Type 類型Key Trait 特性
Gradient Descent 梯度下降Local 區域Follows steepest slope; gets trapped in local optima 沿最陡方向走,易陷入區域最佳解
Nelder-Mead 單純形法Local 區域Derivative-free simplex; can stall near local optima 無需導數,但仍可能停在區域解
A* Search A*搜尋Heuristic 啟發式Graph-based, uses heuristic to guide search 圖形搜尋,以啟發函數引導
Simulated Annealing 模擬退火Global 全域Accepts worse moves probabilistically; escapes traps 以機率接受較差解,可跳脫陷阱
Global Optimization 全域最佳化Global 全域Systematic global search 系統性全域搜尋

Grading Notes 評分備註

  • problem 1 is reflection-based — check for genuine engagement with the visualizer, not just generic definitions. HW1 為心得型——確認同學確實操作過視覺化工具,而非僅抄定義。
  • problem 2, 3 require working code — verify plots are generated from their own implementation, not copied. HW2/HW3 需繳交可執行程式碼——確認圖表由自己實作產生。
  • problem 3 requires statistical rigor (50 runs, multiple parameter settings). Check for proper experimental design. HW3 需具備統計嚴謹度(50次試驗、多組參數),檢查實驗設計是否完整。

RF PA IC Design

PA Sub 6 GHz


Build Sub 6 GHz Power Amplifier Optimizer with Die Synced
Promptsartifact (Closed-Form), artifact (MNA)



Placement

originalfixed (hardcoded), SA 1QPQP+SA (MNA, Small WireLen, non 0 viol.), 

QP+ILP+PrePass (No A* or SA, viol.) comparison with ACS  detail

Slides fit of SA for RF PA Layout



PA Parameter Optimization

original (analytical), HessianMNA (post QP+SA)


PA LessonsApple C1 PA Verified by by computing the exact KCL residual at its converged solution, not because of blow up of MNA (share)










星期三, 4月 08, 2026

EX#6 A* scheduling

本次習題基本說明

進階說明


Handouts 課堂講義


Comparison of LLMs
Claude Opus 4.6 optimal (visualizing how AI thinks)
Gemini 3.0 Pro 推理,optimal
ChatGPT 5, end results 流程圖  feasible, not optimal,

課堂練習 

Deadline:  Saturday at 23:59 (one more week)

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


任選一題就可以


 1. 搶救感恩節晚餐大作戰講義 題目 使用AI推理或用程式計算出最佳計畫, 然後將求解過程視覺化


推理視覺化(動畫)

style 1


style 2



A* 搜尋樹狀圖(動畫)

style 1


style 2



2. 搶救感恩節晚餐大作戰講義 題目 使用AI推理或用程式計算出最佳計畫, 然後將得出結果視覺化



狀態圖(State Diagram) 









state diagram with aligned timeline





看板圖 (Kanban)


 (interactive timeline)




流程圖(Flow chart)




timed flowchart with interactive timeline (share)




Logic circuit design




slides

星期三, 4月 01, 2026

EX#5 A* circuit optimization

本次作業詳細說明


  課堂練習 

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. Design a Two-Stage BJT Amplifier according to goals specified using A* (Parameters to optimize RE1, RC1. RE2. RC2) 


A* search for optimizationshare  (c_mu=3 pF, c_pi=22 pF)

2. Optimize LM3886 class AB audio amplifier IC using A* (Parameters to optimize: resistors except the load) 

LM3886

A Search Setup*

  • State space: 5 components × 5 E12 values each = 3,125 possible states
  • g(n): actual steps taken from the start configuration
  • h(n): circuit performance cost (the heuristic) — sum of 5 weighted penalties
  • f(n) = g + h: A* priority queue ordering

Cost function (5 components, all minimized):

  • Gain: quadratic penalty for deviation from 26 dB (20×)
  • f_low: penalty if low-frequency cutoff exceeds 10 Hz
  • f_high: penalty if high-frequency cutoff falls below 100 kHz
  • Bias: penalizes Rb1 ≠ Rb2 (asymmetric thermal tracking)
  • Re stability: log-scale penalty away from 0.47 Ω optimum

the architecture inside the LM3886 and TDA7293
optimizer A* (share)



星期三, 3月 25, 2026

EX#4 Search and Visualizaiion

 Handouts

Chain of Thought with Example, Make your AI powerful

Constraints,  Visualization on energy landscape

Search Algorithms: A*, BFS, Dijkstra

River Puzzles  (Pz 2Pz 20) by Chain of Thought vs. Search Algortihms

BFS/A* Scalability: 8 vs. 20 persons

  課堂練習 

Deadline: This Saturday at 23:59

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

任選一題

1.   

Solve Pz 2  by A*/BFS

Animate search tree with synced progression (A*/BFS side-by-side)

 2. 

Solve Pz 20 by  A*/BFS 

Animate search tree with synced progression (A*/BFS side-by-side)


3.  Solve Dog Ball Retrieval by A*/BFS 

Animate search tree with synced progression (A*/BFS side-by-side)


星期三, 3月 11, 2026

Mathematical Optimization



 Compare GD, NM Simplex, SA and A* (slides)

EX#3 Chain of Thought


Handouts

Chain of Thought with Example, Make your AI powerful

Constraints,  Visualization on energy landscape

Search Algorithms: A*, BFS, Dijkstra

River Puzzles  (Pz 2Pz 20) by Chain of Thought vs. Search Algortihms

BFS/A* Scalability: 8 vs. 20 persons

  課堂練習 

Deadline: This Saturday at 23:59

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

 

1.   

Solve Pz 2 using  reasoning with each step whether correct or incorrect, showing backtracking. 

Animate the reasoning process in the above synced with river crossing scenarios.  

 2. 

Solve Pz 20 using  reasoning with each step whether correct or incorrect, showing backtracking. 

Animate the reasoning process in the above synced with river crossing scenarios.  


3. Solve Dog Ball Retrieval then animate the solution you got.

Failure example puff

 wait for winds

Analog IC Design (OP741, diff pair, Parameter Optimization, Placement & Rotuing)

BJT Differential Pair 







2-stage diff pair 


corrected







OP 741
 schematic,  die, P&R





星期三, 3月 04, 2026

Catch up 3/11/2026

 Claude 知識遭遇蒸餾事件


EX#2 Solving Electronic Circuits

  AI for solving amplifier electronics (課堂講義)


 建議工具

使用 Claude Sonnet 4.6

使用 ChatGPT 5

使用 Gemini 3 Pro 免費額度最高 1M tokens

使用 Grok 4


Content share

  • share only link, pure text, markdown (md)
  • no attachments accepted, no html, screen dump, or png
  • non-compliant homework will be rejected and returned to you


 課堂練習 

Deadline: This Saturday at 23:59

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

How to publish a Claude artifact

How to share a ChatGPT link

How to share a Grok link

How to share Gemini Link


四題任選兩題



1. Make the Bode plot of Circuit in Example 1, as below. You must verify the results for correctness.

The results must be scientifically accurate.



Topology B in Schematic


Reference materials:

You may want to generate Python for the Bode plots. Then you  carry it out to the end.

How to make Bode plots 

Make Bode plot:

ChatGPT can generate Python like Claude/Gemini, Therefore, you can study  

Key takeaways:
 
Put your Python to run on Google's colab platform. 



Plots can be made more professional and well suited for formal documents such as reports or academic journals.

You may want to label it more clearly following IEEE standard.

2.  Lab Activity: Amplifier Gain & Frequency Response Using AI-Assisted Analysis 










 
Bode plot (Color)



3. With the following circuit and its Bode plot, as in Example 3


textbook approximations








Think about the prompt used to generate the Bode plot. Why there is level off at high frequencies?


4. Comparing LLMs: Claude 4.6, Gemini 3.0 Pro, ChatGPT 5.0 (三選二) for the following task.

Animate in 3d (in three.js) Yagi-Uda Antenna, AI pipe inspector, or things you choose. (擇一)

The animation must be scientifically accurate


Hints

  • Reasoning/Think/Extended Thinking Mode of the AI platform you use may be required for all the problems here

不是主修電子工程的同學,可以練習以下問題


1.







share Claude
ChatGPT 5 eats it alive.



2. Comparing LLMs: Claude 4.6, Gemini 3.0 Pro, ChatGPT 5.0 (三選二) for the following task.

Animate in 3d (in three.js) Yagi-Uda Antenna, AI pipe inspector, or things you choose. (擇一)

The animation must be scientifically accurate


Hints

  • Reasoning/Think/Extended Thinking Mode of the AI platform you use may be required for all the problems here



3.


Claude man in the loop
Gemini 2.5 Pro got it right twice in a row