2025年3月4日 星期二

River Crossing 2, Part 2: Light Speed

 渡河問題2 (statement)  source 許元銘


Code Gen 


Use ChatGPT o1 to generate A* search


4o fails to generate A* search that works



Use Claude 3.7 standard mode to generate A* in Python to solve the River Crossing problem

Sonnet 3.7 or Sonnet 3.5 to gen code (no reasoning)


Gen python, run Python, animate (15-step solution)


Run Python

it takes 15 steps. (thanks to the python code generated by Claude)




If you don't do Python, you can change the Python code you just generated to js. Run it in Claude.Use React to visualize the text results you just got.

However, the change of language might occasionally go wrong. It is better to go Python directly.


another 15-step solution (A* in Python)



yet another 15-step (A* in Python)

one more 15-step (A* in Python)

last 15-step (A* in Python)


沒有留言:

張貼留言