Using AI to self piloting X-wing in Star wars battlefront (with howto and code)
gaming·@jimsparkle·
0.000 HBDUsing AI to self piloting X-wing in Star wars battlefront (with howto and code)
<html> <p><strong>Can the force be with AI to destroy death star by deep learning? This is a test of using supervised machine learning to self-pilot X-wing and travel back and forth in the battlefront.</strong></p> <p>Model developed using Tensorflow. Check out the code in my ->[<a href="https://github.com/Jimsparkle/AI_Starwars_X-wing">Github Repo]</a><- </p> <p><br></p> <p><strong>**Highlight**</strong></p> <p>X-wing entering the battle</p> <p><img src="https://giant.gfycat.com/OnlyVengefulGelada.gif" width="445" height="250"/></p> <p>Manoeuvre and auto balancing</p> <p><img src="https://giant.gfycat.com/HorribleFixedEidolonhelvum.gif" width="445" height="250"/></p> <p>Evading Tie fighter</p> <p><img src="https://giant.gfycat.com/PastWelcomeArcherfish.gif" width="445" height="250"/></p> <p><br></p> <p>[<a href="https://www.youtube.com/watch?v=NMZph_X9e8o">Youtube video</a>]</p> <p><strong>**Model / howto**</strong></p> <p>The AI has been provided with only 1 hour of video of actual game play together with the corresponding keypress, and trained by tensorflow for 8 hours to pilot a X-Wing just by itself.</p> <p><img src="http://imgur.com/DXWrQq2.jpg" width="1040" height="800"/></p> <p>All of the code can be found in github repo. </p> <p><em>Convolution and Maxpool</em>: Technique used in image processing (applications including Alpha Go) to parse an image into a smaller frame. This enable the model to consider fewer pixels for decision making while keeping a good result (In most case even better).</p> <p><br></p> <p><em>Hidden layer</em>: Classic hidden layer is similar to linear regression, while deep learning generally add an activation function to help the model to consider non-linearity.</p> <p><br></p> <p><strong>**Citation here**</strong></p> <p>The idea and model are largely inspired by <a href="https://github.com/sentdex/pygta5/">Sentdex self-driving programme.</a></p> <p>Screen capture code is developed by Frannecklp.</p> <p>Key input tracking code is developed by <a href="https://github.com/Box-Of-Hats">Box Of Hats</a>.</p> <p><br></p> <p><strong>**Important disclaimer**</strong></p> <p>This model is only tested in skirmish (single player mode) and will never be tested / play in any multi-play session.</p> <p><br></p> <p><strong>**Summary**</strong></p> <p>The AI achieves satisfactory result in preventing plane crash accident, while lacking capacity to deal effective damage to Imperial Tie fighter. This is far from perfect.</p> <p>The model is still in development and expected to have a large change in the future.</p> <p><br></p> <p>Follow me for more projects and experiments in deep learning application in gaming / natural language processing.</p> </html>