Answers.Body: <blockquote>
    <p>"if I had some simple enemy AI that I want to have adapt to the players play-style, is this a good opportunity to implement the AI as a Genetic-Algorithm combined with a Neural Network"</p>
  </blockquote>
  
  <p>Sure. Just provide a quality measure for the GA that's related in some manner to the effect of the player's actions on the game state/opponent(s). </p>
  
  <p>For example, if defining an opponent's intelligence, one of the conceptually simplest things would be to give a GA population member a fitness that's inversely proportional to the increase in the player's score over some period of time.</p>
  
  <blockquote>
    <p>are Neural Networks always designed as on off signals?)?</p>
  </blockquote>
  
  <p>No. In general, they can be considered to perform <em>nonlinear regression</em>, i.e. a mapping from a vector of real numbers of length n to another of length m. Classification (i.e. 0/1 outputs can be seen as a restricted case of this).</p>
  
  <p>As per my answer to <a href="https://ai.stackexchange.com/questions/1618/what-are-the-practical-considerations-of-using-a-genetic-algorithm-to-decide-the/1626#1626">this AI SE question</a>, there is a large body of literature (and mature software libraries) for using evolutionary computation to encode neural nets.</p>
  
  <p>More generally, some early work in 'online adaptivity using GA-encoded NNs' appeared in the Creatures <a href="http://creatures.wikia.com/wiki/Creatures_Wikia_Homepage" rel="nofollow noreferrer">http://mrl.snu.ac.kr/courses/CourseSyntheticCharacter/grand96creatures.pdf</a> series of games by Steve Grand <a href="http://mrl.snu.ac.kr/courses/CourseSyntheticCharacter/grand96creatures.pdf" rel="nofollow noreferrer">(details)</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-19T06:56:10.607Z
Answers.LastActivityDate: 2016-10-19T07:02:55.260Z
Answers.LastEditDate: 2017-04-13T12:53:10.013Z
Answers.UserDisplayName: NietzscheanAI
Answers.Body: <p>Without going in too much detail on how exactly Neural Networks and Generic Algorithms work, I can tell you that both the algorithms are not good candidates for computer games.  They work well in scientific environments where the system is "trained" on a huge data set to adjust the "weights" (variables) for a given problem.  This "training" process requires a lot of processing power, time and a large data set.</p>
  
  <p>Computer games, however either needs to run in real-time (no time for training) or turn-based (not enough data for training).</p>
  
  <p>Another problem is that computer games need to free up as much as possible system resources for physics, graphics, sounds and the user interface to improve the player's experience so game developers usually use other lighter techniques (like a rule-based system) to create the illusion of an AI player.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-19T07:03:35.853Z
Answers.LastActivityDate: 2016-10-19T08:52:59.793Z
Answers.LastEditDate: 2016-10-19T08:52:59.793Z
Answers.UserDisplayName: Jasper Citi
Answers.Body: <p>For your question there's a brilliant playground emerging!<br><br>
  Go to <a href="https://gym.openai.com/" rel="nofollow">https://gym.openai.com/</a> and explore!<br>
  You'll get interfaces to games if you want to try applying your machine learning skills and compare the performances of your trained AIs with others. And you can let yourself be inspired by the ideas discussed in the community.<br>
  If you're especially into Genetic Algorithms you'll find dicussions there too but I'd suggest digging deeper into Reinforcement Learning.<br><br>
  If you look at what Google Deep Mind accomplished playing</p>
  
  <ul>
  <li>Breakout</li>
  <li>Montezumas Revenge</li>
  <li>various other Atari Games ..</li>
  </ul>
  
  <p>and obviously !</p>
  
  <ul>
  <li><a href="http://www.theverge.com/google-deepmind" rel="nofollow">the sensational victory at Go</a></li>
  </ul>
  
  <p>you can say that Reinforcement Learning with (Deep) Neural Networks can be a very promising approach when it comes to training an AI to master games!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-19T19:50:09.807Z
Answers.Text: Welcome to AI SE! Thanks for the interesting pointer, but what we're really looking for here are direct answers to the OP's question.
Answers.UserDisplayName: NietzscheanAI
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-19T14:34:23.680Z
Answers.LastActivityDate: 2016-10-19T14:34:23.680Z
Answers.UserDisplayName: lwohlhart
Body: <p>I'm interested mostly in the application of AI in gaming; in case this adjusts the way you answer, but general answers are more than welcome as well.</p>
  <p>I was reading up on Neural Networks and combining them with Genetic Algorithms; my high-level understanding is that the Neural Networks are used to produce a result from the inputs, and the Genetic Algorithm is employed to constantly adjust the weights in the Neural Network until a good answer is found.</p>
  <p>The concept of a Genetic Algorithm randomly mutating the weights on the inputs to a Neural Network makes sense to me, but I don't understand where this would be applied with respect to gaming.</p>
  <p>For example, if I had some simple enemy AI that I want to have adapted to the player's play-style, is this a good opportunity to implement the AI as a Genetic-Algorithm combined with a Neural Network?</p>
  <p>With these different suitable applications, how does one go about deciding how to encode the problem in such a way that it can be mutated by the Genetic Algorithm and serve as suitable on/off inputs to a Neural Network (actually, are Neural Networks always designed as on-off signals?)?</p>
  
Tags: <neural-networks><game-ai><genetic-algorithms><gaming>
Title: What sort of game problems can neural networks trained/evolved with evolutionary algorithms solve, and how are they typically implemented?
UserDisplayName: NeomerArcana
ThreadText: # What sort of game problems can neural networks trained/evolved with evolutionary algorithms solve, and how are they typically implemented?
  
  (Asked by: username_0 on 2016-10-11)
  
  I'm interested mostly in the application of AI in gaming; in case this adjusts the way you answer, but general answers are more than welcome as well.
  
  I was reading up on Neural Networks and combining them with Genetic Algorithms; my high-level understanding is that the Neural Networks are used to produce a result from the inputs, and the Genetic Algorithm is employed to constantly adjust the weights in the Neural Network until a good answer is found.
  
  The concept of a Genetic Algorithm randomly mutating the weights on the inputs to a Neural Network makes sense to me, but I don't understand where this would be applied with respect to gaming.
  
  For example, if I had some simple enemy AI that I want to have adapted to the player's play-style, is this a good opportunity to implement the AI as a Genetic-Algorithm combined with a Neural Network?
  
  With these different suitable applications, how does one go about deciding how to encode the problem in such a way that it can be mutated by the Genetic Algorithm and serve as suitable on/off inputs to a Neural Network (actually, are Neural Networks always designed as on-off signals?)?
  
  **Tags:** neural-networks, game-ai, genetic-algorithms, gaming
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2016-10-19. Score: -1 | Accepted answer
  
  > "if I had some simple enemy AI that I want to have adapt to the players play-style, is this a good opportunity to implement the AI as a Genetic-Algorithm combined with a Neural Network"
  
  Sure. Just provide a quality measure for the GA that's related in some manner to the effect of the player's actions on the game state/opponent(s).
  
  For example, if defining an opponent's intelligence, one of the conceptually simplest things would be to give a GA population member a fitness that's inversely proportional to the increase in the player's score over some period of time.
  
  > are Neural Networks always designed as on off signals?)?
  
  No. In general, they can be considered to perform *nonlinear regression*, i.e. a mapping from a vector of real numbers of length n to another of length m. Classification (i.e. 0/1 outputs can be seen as a restricted case of this).
  
  As per my answer to [this AI SE question](https://ai.stackexchange.com/questions/1618/what-are-the-practical-considerations-of-using-a-genetic-algorithm-to-decide-the/1626#1626), there is a large body of literature (and mature software libraries) for using evolutionary computation to encode neural nets.
  
  More generally, some early work in 'online adaptivity using GA-encoded NNs' appeared in the Creatures [http://mrl.snu.ac.kr/courses/CourseSyntheticCharacter/grand96creatures.pdf](http://creatures.wikia.com/wiki/Creatures_Wikia_Homepage) series of games by Steve Grand [(details)](http://mrl.snu.ac.kr/courses/CourseSyntheticCharacter/grand96creatures.pdf).
  
  
  ---
  
  ### Answer by username_2 on 2016-10-19. Score: 1
  
  Without going in too much detail on how exactly Neural Networks and Generic Algorithms work, I can tell you that both the algorithms are not good candidates for computer games. They work well in scientific environments where the system is "trained" on a huge data set to adjust the "weights" (variables) for a given problem. This "training" process requires a lot of processing power, time and a large data set.
  
  Computer games, however either needs to run in real-time (no time for training) or turn-based (not enough data for training).
  
  Another problem is that computer games need to free up as much as possible system resources for physics, graphics, sounds and the user interface to improve the player's experience so game developers usually use other lighter techniques (like a rule-based system) to create the illusion of an AI player.
  
  
  ---
  
  ### Answer by username_3 on 2016-10-19. Score: 0
  
  For your question there's a brilliant playground emerging!  
    
  Go to <https://gym.openai.com/> and explore!  
  You'll get interfaces to games if you want to try applying your machine learning skills and compare the performances of your trained AIs with others. And you can let yourself be inspired by the ideas discussed in the community.  
  If you're especially into Genetic Algorithms you'll find dicussions there too but I'd suggest digging deeper into Reinforcement Learning.  
    
  If you look at what Google Deep Mind accomplished playing
  
  * Breakout
  * Montezumas Revenge
  * various other Atari Games ..
  
  and obviously !
  
  * [the sensational victory at Go](http://www.theverge.com/google-deepmind)
  
  you can say that Reinforcement Learning with (Deep) Neural Networks can be a very promising approach when it comes to training an AI to master games!
  
  > **Comments:**
  > **username_1**: Welcome to AI SE! Thanks for the interesting pointer, but what we're really looking for here are direct answers to the OP's question.  
  
  ---
  
  