# Google Dino AI Google Dino AI cheat code ## 方案一 1. 複製此網址至網址列:***chrome://dino***,並按下【Enter】。 2. 按下【F12】開啟「**開發人員工具**」。 3. 選擇「**Console**」選項。 4. 複製並貼上以下程式碼: ```javascript= function dinoAI() { if (Runner.instance_.horizon.obstacles.length > 0) { let dist = Runner.instance_.horizon.obstacles[0].xPos; let obj = Runner.instance_.horizon.obstacles[0]; let type = obj.typeConfig.type; let speed = Runner.instance_.currentSpeed; if (dist < speed * 22) { if (type === 'PTERODACTYL' && obj.yPos < 60) { if(!Runner.instance_.tRex.ducking) Runner.instance_.tRex.setDuck(true); } else { if(Runner.instance_.tRex.ducking) Runner.instance_.tRex.setDuck(false); Runner.instance_.tRex.startJump(Runner.instance_.currentSpeed); } } } requestAnimationFrame(dinoAI); } dinoAI(); ``` 5. 再按一次 F12 關閉「**開發人員工具**」。 6. 按下【空白鍵】開始遊戲。 ## 方案二: 1. 進入這個[網站](https://abhilol123.github.io/DinoGameAI/)。 2. 按下【空白鍵】開始動作。 ## 同場加映: * [Genetic Car](https://rednuht.org/genetic_cars_2/) * [ConvNetJS Deep Q Learning Demo](https://cs.stanford.edu/people/karpathy/convnetjs/demo/rldemo.html) * [Multi-Agent Hide and Seek](https://youtu.be/kopoLzvh5jY) * [We made the same game as “Free Guy" - rct AI early stage technical demo](https://youtu.be/lGg46DopDSQ) 來源: 1. https://github.com/BadassBison/chrome-dino- 2. https://github.com/tw666/auto-t-rex 3. https://github.com/wayou/t-rex-runner 4. https://github.com/Abhilol123/DinoGameAI 5. https://github.com/MdTeach/AI_Learns_Playing_Dino_Game