ccc112b / ai

課程:人工智慧 -- 筆記、習題與報告
3 stars 53 forks source link

習題8: 請自己設計一個固定的策略(不需要學習)解決 CartPole 問題,讓你的竿子盡量撐得久不會倒下來 #10

Open ccckmit opened 2 months ago

ccckmit commented 2 months ago

建議

  1. 不要用機器學習,神經網路,直接用手寫固定策略來解決
  2. 記得先了解 Observation 與 Action ,再開始寫程式

參考

  1. https://gymnasium.farama.org/environments/classic_control/cart_pole/
  2. cartpole_human_run.py
import gymnasium as gym
env = gym.make("CartPole-v1", render_mode="human") # 若改用這個,會畫圖
# env = gym.make("CartPole-v1", render_mode="rgb_array")
observation, info = env.reset(seed=42)
for _ in range(100):
   env.render()
   action = env.action_space.sample()  # 把這裡改成你的公式,看看能撐多久
   observation, reward, terminated, truncated, info = env.step(action)
   print('observation=', observation)
   if terminated or truncated: # 這裡要加入程式,紀錄你每次撐多久
      observation, info = env.reset()
      print('done')
env.close()
wrr606 commented 2 months ago

資工二 111110517 范揚玄

https://github.com/wrr606/ai/blob/master/homework/8/CartPole.py

測出的數據: https://github.com/wrr606/ai/blob/master/homework/8/Readme.txt

LeeYi-user commented 2 months ago

資工三 李易 111010512 https://github.com/LeeYi-user/ai/blob/master/homework/08/cartpole.py 執行結果可到200步

KiuBios commented 2 months ago

資工二 胡劭家 111110519 https://github.com/KiuBios/ai/tree/master/hw8

dallas145 commented 2 months ago

資工三 蔡松宏 111010511 習題8
(執行結果在影片裡)

weilunh7 commented 1 month ago

資工三 黃威綸 1110514 https://github.com/weilunh7/ai/tree/master/HW8

senxichicken commented 1 month ago

資工三 陳冠恩 111010567 作業八

asd1389271903 commented 1 month ago

資工三 侯皓騰 111010509 https://github.com/asd1389271903/ai/tree/master/homework/8

ctfpanda17 commented 3 weeks ago

電三甲 111010148 林晏霆 https://github.com/ctfpanda17/ai/blob/master/hw8.py

111010557 commented 3 weeks ago

資工三 111010557 楊欣潔 https://github.com/111010557/ai/blob/master/hw/08

kingpider123 commented 3 weeks ago

資工三 111010552 阮銘福 https://github.com/kingpider123/ai/blob/master/homework/8/cartPole.py

Ellinaa commented 3 weeks ago

資工四110910558陳玟卉 習題8

Tzuan1020 commented 3 weeks ago

資工三 111010517 蘇子安 習題8

tom71012 commented 3 weeks ago

資工三 吳承泰 111010505 習題8

lkhagvaa2444 commented 3 weeks ago

資工二 李荷葦 111110544 https://github.com/lkhagvaa2444/ai/tree/master/HW8

siyu0927 commented 3 weeks ago

資工三 葉思妤 111010508 https://github.com/siyu0927/ai/blob/master/HW/hw8.py

weixiang0470 commented 3 weeks ago

資工三 黃偉祥 111010550 Homework 8

Kruez0 commented 2 weeks ago

資工二劉佩芬111110541 https://github.com/Kruez0/ai/tree/master/h8

jiajianong commented 2 weeks ago

資工四 110910535 呂嘉融 習題八

ali1234-56 commented 2 weeks ago

資工三 111010536 林家成 hk8

Jung217 commented 2 weeks ago

資工三 簡志融 111010501 習題八

rossen1020 commented 2 weeks ago

111010516 資工三 賴映羽 08

sam00002135 commented 2 weeks ago

資工三 111010574 白和鑫 https://github.com/sam00002135/ai/blob/master/home8.py

yihsien924 commented 2 weeks ago

資工三 林羿嫻 111010555 hw8

ruoxin030704 commented 2 weeks ago

資工三 111010576 王若馨 https://github.com/ruoxin030704/ai/tree/master/8

henk3520 commented 2 weeks ago

資工三 古莛禾 111010573 https://github.com/henk3520/ai/blob/main/hw8/%E7%BF%92%E9%A1%8C8.py

byby9527 commented 2 weeks ago

111010540 資工三 陳先正 https://github.com/byby9527/ai/tree/master/08

weichen11011 commented 2 weeks ago

資工三 顏瑋成 111010529 習題8

Chieh0622 commented 2 weeks ago

資工三 111010515 林弘杰 HW8

Remilia517 commented 2 weeks ago

資工三 111010532 李昱宏 習題8

a920217 commented 2 weeks ago

資工三 111010538 陳紹恩 hw8

mimmm4308 commented 2 weeks ago

資工三 111010525 林品翔 HW8

MitanEXE commented 1 week ago

資工三 111010544 陳彬彬 HW8

RogerChen530 commented 1 week ago

資工三 111010530 陳樂融 Week8

gakuplusq commented 1 week ago

110910530 資工四 黃劭騏

XaioYue commented 1 week ago

資工二 111110555 董翔宇 https://github.com/XaioYue/ai/tree/master/H8

patrick0516 commented 1 week ago

資工三 111010575 周辰恩 hw8

yehchen0328 commented 1 week ago

資工三 111010535 葉哲辰 https://github.com/yehchen0328/ai/blob/master/hw8.py

guangbo1110105228 commented 1 week ago

資工三 111010528 冉光博 https://github.com/guangbo1110105228/ai/blob/master/hw8.py

nelson023 commented 1 week ago

資工四 110910523張繼光 https://github.com/nelson023/ai/blob/master/hw/hw8.py

HuangAlvin commented 1 week ago

資工三 111010526 黃俊皓 https://github.com/HuangAlvin/ai/tree/master/E8