[範例] Tetrix Ai by GA

看板Python作者 (Ar藤)時間12年前 (2012/06/21 01:27), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
http://kitty.2y.idv.tw/~arton36/TetrixAi/TetrixAi2.ziphttps://github.com/arton0306/TetrixAi.git 最近用 python 寫了一個 tetrix 的 ai (用基因演算法算權重) 進入點在 TetrixAiMultiBlock.py 因為我策略沒做得很好 結果很普通 如果 combo n 得 n 分 (如3個連續方塊 都消掉1行 分別是 combo 1 combo 2 combo 3 共得6分) 平均1000個方塊 得500分左右(其實非常少) 如果有人單純想看看GA怎麼做可以參考看看 GA的部份主要就在TetrixAiMultiBlock.py 才212行 我寫這個GA的參考資料在 http://luckytoilet.wordpress.com/2011/05/27/coding-a-tetris-ai-using-a-genetic-algorithm/ http://tinyurl.com/3k3j6zh 縮址 希望能拋磚引玉 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.42.62.239 ※ 編輯: Arton0306 來自: 114.42.62.239 (06/21 01:28)
文章代碼(AID): #1FuWWFHP (Python)