Answers.Body: <p>AI is trained to predict such thing because that is their purpose, they are given almost all possibilities of move they can do to current state of the game and chose the best possible outcome of the possible move, but not only that the AI also predict what happens after that and predict the outcome of that prediction, just like a chess AI that can predict how to checkmate a player just by one move made by the player, so they did not just predict what move to do now but also what move to do after that move has been done</p>
  
  <p>this can be done with deep learning as you can read here : <a href="https://towardsdatascience.com/predicting-professional-players-chess-moves-with-deep-learning-9de6e305109e" rel="nofollow noreferrer">https://towardsdatascience.com/predicting-professional-players-chess-moves-with-deep-learning-9de6e305109e</a>
  <a href="https://electronics.howstuffworks.com/chess1.htm" rel="nofollow noreferrer">https://electronics.howstuffworks.com/chess1.htm</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T08:24:34.907Z
Answers.LastActivityDate: 2020-04-21T08:24:34.907Z
Answers.UserDisplayName: Supra Yogi
Answers.Body: <p>In video games, usually the developer spend an dedicated time to train their AI by feeding them with learning data, provided by either the developer itself or the feedback from open/closed beta tester that participated, and from that data, the developer can model the learning pattern for the algorithm and proceed to train them with some sets of goal.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T08:29:40.603Z
Answers.LastActivityDate: 2020-04-21T08:29:40.603Z
Answers.UserDisplayName: Arbi Nourman
Answers.Body: <p>Artificial Intelligence can predict such a thing because before they release the game, the train the BOT or AI to play the game million times so they have a model or BOT that can predict every next move or combo that they can do or predict all moves that can finish the game.
  for example snake game. what they do to predict moves is train the model or bot to play the game when the snake perform some action . the snake got reward which can be positive or negative reward. the goal of the snake is to learn what action that maximize the reward, given every possible state. States are the observations that the agent receives at each iteration from the environment</p>
  
  <p>this is the link that can give you the detail : <a href="https://towardsdatascience.com/how-to-teach-an-ai-to-play-games-deep-reinforcement-learning-28f9b920440a" rel="nofollow noreferrer">https://towardsdatascience.com/how-to-teach-an-ai-to-play-games-deep-reinforcement-learning-28f9b920440a</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T08:15:52.780Z
Answers.LastActivityDate: 2020-04-21T08:32:44.620Z
Answers.LastEditDate: 2020-04-21T08:32:44.620Z
Answers.UserDisplayName: Gery Nugroho
Answers.Body: <p>AI can predict such thing by reading a data that they previously store by play the game many times. Using the data the AI can learn which is the best action to do. For example AI can find the best path to evade all incoming bullet while shooting down all the enemies in bullet hell game.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-21T10:22:16.533Z
Answers.LastActivityDate: 2020-04-21T10:22:16.533Z
Answers.UserDisplayName: Hafizh Fadhilah
Body: <p>When you play video games, sometimes there is an AI that attempts to predict what are you going to do. </p>
  
  <p>For example, in the Candy Crush game, if you finish the level and you still have moves remaining, you get to see fishes or other powers destroying the other candies, but, instead of watching 10 minutes of your combos without moving at all after accomplishing a level, like this <a href="https://www.youtube.com/watch?v=-_p8LZhIxtE" rel="nofollow noreferrer">Longest video game combo ever probably</a>, it tells an alert that says tap to skip, so basically the AI is predicting all the possible combos that will keep proceeding automatically and calculating every automatic move. </p>
  
  <p>How can artificial intelligence predict such a thing?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-23T22:03:23.977Z
Comments.Text: Welcome to SE:AI!  (Apologies that the answers are so generic.  My personal sense, in relation to this particular problem--producing the set of Candy Crush combos, is likely a combinatorial approach. In terms of prediction, my guess would be you train a reinforcement algorithm to identify the biases of the algorithm that is producing the combos in the game, and exploit the identification of those biases to more and more accurately predict the most likely next combo.)
Comments.UserDisplayName: DukeZhou
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-23T23:11:49.273Z
Comments.Text: However, if you're pressing "skip", and the AI is "predicting your next moves", that is likely a misrepresentation, unless *your gameplay specifically* has been observed and modeled sufficiently by a reinforcement learning algorithm.  This is unlikely due to the computational cost (time, space, energy) of training such algorithms.
Comments.UserDisplayName: DukeZhou
Tags: <machine-learning><game-ai><prediction>
Title: How can artificial intelligence predict the next possible moves of the player?
UserDisplayName: thegamerguy
ThreadText: # How can artificial intelligence predict the next possible moves of the player?
  
  (Asked by: username_0 on 2020-04-03)
  
  When you play video games, sometimes there is an AI that attempts to predict what are you going to do.
  
  For example, in the Candy Crush game, if you finish the level and you still have moves remaining, you get to see fishes or other powers destroying the other candies, but, instead of watching 10 minutes of your combos without moving at all after accomplishing a level, like this [Longest video game combo ever probably](https://www.youtube.com/watch?v=-_p8LZhIxtE), it tells an alert that says tap to skip, so basically the AI is predicting all the possible combos that will keep proceeding automatically and calculating every automatic move.
  
  How can artificial intelligence predict such a thing?
  
  **Tags:** machine-learning, game-ai, prediction
  
  > **Comments:**
  > **username_1**: Welcome to SE:AI!  (Apologies that the answers are so generic.  My personal sense, in relation to this particular problem--producing the set of Candy Crush combos, is likely a combinatorial approach. In terms of prediction, my guess would be you train a reinforcement algorithm to identify the biases of the algorithm that is producing the combos in the game, and exploit the identification of those biases to more and more accurately predict the most likely next combo.)  
  > **username_1**: However, if you're pressing "skip", and the AI is "predicting your next moves", that is likely a misrepresentation, unless *your gameplay specifically* has been observed and modeled sufficiently by a reinforcement learning algorithm.  This is unlikely due to the computational cost (time, space, energy) of training such algorithms.  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_2 on 2020-04-21. Score: 1
  
  AI is trained to predict such thing because that is their purpose, they are given almost all possibilities of move they can do to current state of the game and chose the best possible outcome of the possible move, but not only that the AI also predict what happens after that and predict the outcome of that prediction, just like a chess AI that can predict how to checkmate a player just by one move made by the player, so they did not just predict what move to do now but also what move to do after that move has been done
  
  this can be done with deep learning as you can read here : <https://towardsdatascience.com/predicting-professional-players-chess-moves-with-deep-learning-9de6e305109e>
  <https://electronics.howstuffworks.com/chess1.htm>
  
  
  ---
  
  ### Answer by username_3 on 2020-04-21. Score: 1
  
  In video games, usually the developer spend an dedicated time to train their AI by feeding them with learning data, provided by either the developer itself or the feedback from open/closed beta tester that participated, and from that data, the developer can model the learning pattern for the algorithm and proceed to train them with some sets of goal.
  
  
  ---
  
  ### Answer by username_4 on 2020-04-21. Score: 1
  
  Artificial Intelligence can predict such a thing because before they release the game, the train the BOT or AI to play the game million times so they have a model or BOT that can predict every next move or combo that they can do or predict all moves that can finish the game.
  for example snake game. what they do to predict moves is train the model or bot to play the game when the snake perform some action . the snake got reward which can be positive or negative reward. the goal of the snake is to learn what action that maximize the reward, given every possible state. States are the observations that the agent receives at each iteration from the environment
  
  this is the link that can give you the detail : <https://towardsdatascience.com/how-to-teach-an-ai-to-play-games-deep-reinforcement-learning-28f9b920440a>
  
  
  ---
  
  ### Answer by username_5 on 2020-04-21. Score: 0
  
  AI can predict such thing by reading a data that they previously store by play the game many times. Using the data the AI can learn which is the best action to do. For example AI can find the best path to evade all incoming bullet while shooting down all the enemies in bullet hell game.
  
  
  ---
  
  