Answers.Body: <p>It seems like what you need is reinforcement learning method rather than AE / unsupervised. Method has to be like
  Input -> CNN Feature Extractor (encode side of AE, i.e. VGG) -> Classifier (i.e. DNN) -> Choose one of the actions -> Observe change in the game and check if it was a wrong (like character is dying) or good (character is moving forward) and give a rating to action (feedback of decision). </p>
  
  <p>After a while, AI will learn how to jump over obstacles, avoid stuff etc. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-15T01:11:38.733Z
Answers.LastActivityDate: 2017-11-15T01:11:38.733Z
Answers.UserDisplayName: Deniz Beker
Body: <p>I wish to write a bot that can use screen footage to play a game, specifically for the game 'Nidhogg'.</p>
  
  <p>To that end I have determined that a CNN should do the feature detection and a feedforward neural network should determine the action to take.</p>
  
  <p>For this question I wish to focus on the CNN.</p>
  
  <p>My idea was to first train the CNN as an autoencoder to aid in unsupervised pattern recognition and to add hidden layers after every epoch, but I am unsure whether this would actually be faster or lead to higher accuracy (as opposed to immediately training all hidden layers at once).</p>
  
  <p>The reason I am unsure is because I imagined the following scenario:</p>
  
  <pre><code>Input &gt; Hidden1 &gt; Output
  </code></pre>
  
  <p>If the output layer needs to approximate the input layer is it not wasteful to let it have its own weights backpropagated when it actually tries to determine the 'inverse' function of the hidden layer? Is it possible to 'directly' determine an inverse function for a layer even if consists of multiple filters?</p>
  
  <p>If so, say I've trained my first hidden layer so that the error is minimal and use it as an input layer whilst I add another hidden layer; can I repeat my strategy?</p>
  
  <pre><code>Input &gt; Hidden1 &gt; Output
      Input(Hidden1) &gt; Hidden2 &gt; Output
  </code></pre>
  
Tags: <convolutional-neural-networks>
Title: Can CNN autoencoders be improved by treating the output layer as an inverted hidden layer?
UserDisplayName: Joshua de Haan
ThreadText: # Can CNN autoencoders be improved by treating the output layer as an inverted hidden layer?
  
  (Asked by: username_0 on 2017-11-13)
  
  I wish to write a bot that can use screen footage to play a game, specifically for the game 'Nidhogg'.
  
  To that end I have determined that a CNN should do the feature detection and a feedforward neural network should determine the action to take.
  
  For this question I wish to focus on the CNN.
  
  My idea was to first train the CNN as an autoencoder to aid in unsupervised pattern recognition and to add hidden layers after every epoch, but I am unsure whether this would actually be faster or lead to higher accuracy (as opposed to immediately training all hidden layers at once).
  
  The reason I am unsure is because I imagined the following scenario:
  
  ```
  Input > Hidden1 > Output
  
  ```
  
  If the output layer needs to approximate the input layer is it not wasteful to let it have its own weights backpropagated when it actually tries to determine the 'inverse' function of the hidden layer? Is it possible to 'directly' determine an inverse function for a layer even if consists of multiple filters?
  
  If so, say I've trained my first hidden layer so that the error is minimal and use it as an input layer whilst I add another hidden layer; can I repeat my strategy?
  
  ```
  Input > Hidden1 > Output
      Input(Hidden1) > Hidden2 > Output
  
  ```
  
  **Tags:** convolutional-neural-networks
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-11-15. Score: 1
  
  It seems like what you need is reinforcement learning method rather than AE / unsupervised. Method has to be like
  Input -> CNN Feature Extractor (encode side of AE, i.e. VGG) -> Classifier (i.e. DNN) -> Choose one of the actions -> Observe change in the game and check if it was a wrong (like character is dying) or good (character is moving forward) and give a rating to action (feedback of decision).
  
  After a while, AI will learn how to jump over obstacles, avoid stuff etc.
  
  
  ---
  
  