Answers.Body: <p>Methods such as <a href="http://www.gp-field-guide.org.uk/?m=1" rel="nofollow noreferrer">Genetic Programming</a> can induce symbolic expressions from observations. Indeed, such methods can be used as an alternative to neural (or other nonsymbolic) approaches when the goal is not merely to find a function that fits the data well, but which also has a chance of giving a human-readable description of the learned function in terms of whatever mathematical functions the user chooses to supply the learning method with.</p>
  
  <p>These methods are even <a href="https://link.springer.com/content/pdf/10.1023/A:1011516717456.pdf" rel="nofollow noreferrer">used commercially</a> for knowledge discovery.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-26T17:35:55.770Z
Answers.LastActivityDate: 2018-02-26T17:41:03.490Z
Answers.LastEditDate: 2018-02-26T17:41:03.490Z
Answers.UserDisplayName: NietzscheanAI
Answers.Body: <p>This answer mostly assumes you are referring to computer-game-playing bots that learn through experiencing play, such as Deep Mind's DQN as used for playing Atari console games. State of the art for these are typically <a href="https://en.wikipedia.org/wiki/Reinforcement_learning" rel="nofollow noreferrer">Reinforcement Learning</a> algorithms, used with neural networks to process input and estimate results of next actions. There are other competitive AI technologies too, and the answer applies generally to most learning or evolving optimisers that would learn through trial and error by playing the game.</p>
  
  <blockquote>
    <p>If the game had a variable speed and was essential in evolution/gaining score(IDK AI terminologies). Would the AI be able to figure out when to slow down and speed up?</p>
  </blockquote>
  
  <p>Yes, as long as the game allowed control of something that influenced acceleration, then a learning agent can figure out the consequences of accelerating and braking and use them appropriately within the game.</p>
  
  <p>A well-known toy example that can challenge learning agents is called <a href="https://en.wikipedia.org/wiki/Mountain_car_problem" rel="nofollow noreferrer">Mountain Car</a>. In that game, the agent has to learn to accelerate in the correct direction (which is not always towards its objective), in order to escape an area. It is considered challenging because the reward (for escaping) can be significantly delayed compared to the action that best enables it. </p>
  
  <p>One popular proving ground for learning agents is OpenAI gym. This includes several game environments with a physical model of acceleration included, such as <a href="https://gym.openai.com/envs/LunarLander-v2/" rel="nofollow noreferrer">Lunar Lander</a>. </p>
  
  <blockquote>
    <p>If it is able to solve the problem or complete the level, will it have an equation to relating acceleration?</p>
  </blockquote>
  
  <p>In general, no. The agent will learn to respond to certain stimulus, by taking an action that accelerates or decelerates the game piece that it controls. There will not be any concept like $s = ut + \frac{1}{2} at^2$ encoded in the agent's parameters.</p>
  
  <blockquote>
    <p>or perhaps a number on when to speed up and down? </p>
  </blockquote>
  
  <p>Typically the agent will learn which stimuli should be responded to by accelerating. For instance, in a game where the agent's game piece is being chased by an enemy piece and the enemy piece is getting closer, the agent should learn that it will get a better reward if it accelerates away from the enemy. </p>
  
  <blockquote>
    <p>What if the game environment was dynamic?</p>
  </blockquote>
  
  <p>Most game environments are dynamic, as in the state changes over time. If you mean would anything change if the game rules themselves varied over time, then this may cause interesting problems for some learning algorithms, but should not change anything about learning use of controls that affect acceleration in a virtual world.</p>
  
  <blockquote>
    <p>Can you even teach math to an AI?</p>
  </blockquote>
  
  <p>Generally, no you cannot teach math to the kind of system that plays games, or interacts with real world objects. These kind of learning systems are not yet advanced enough to learn concepts or establish game world logic from interactions. Instead, they work more akin to perception, muscle memory and either inherent or learned reflexes. Exceptions to this will generally have a world model (with the necessary equations) built in or made available to the agent without it needing to learn anything.</p>
  
  <p>However, there are AI systems that use formal logic that can work on mathematical theories. Some have performed interesting feats such as "discovering" prime numbers, given formal definitions of integers and basic arithmetic. An example of this kind of system is the <a href="https://en.wikipedia.org/wiki/Automated_Mathematician" rel="nofollow noreferrer">Automated Mathematician</a>.</p>
  
  <p>There is an intermediate possibility: Some learning agents not only learn the <em>value</em> or <em>best policy</em> for certain actions, they also learn to predict what should happen next to the state of the environment. Such an agent would include a model that could observe objects that were accelerating and predict their future positions. In some ways this <em>is</em> a learned concept of acceleration, although it would not be expressed mathematically like Newton's laws of motion, and is more akin to the kind of intuition that allows a person to track, anticipate and catch a thrown ball.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-02-25T22:22:46.847Z
Answers.LastActivityDate: 2018-09-10T11:11:24.163Z
Answers.LastEditDate: 2018-09-10T11:11:24.163Z
Answers.UserDisplayName: Neil Slater
Body: <p>If the game had a variable speed and was essential in evolution/gaining score(IDK AI terminologies). Would the AI be able to figure out when to slow down and speed up?</p>
  
  <p>If it is able to solve the problem or complete the level, will it have an equation to relating acceleration, or perhaps a number on when to speed up and down. What if the game environment was dynamic?</p>
  
  <p>Can you even teach math to an AI?</p>
  
  <p>PS: I'm not sure if I should ask separate question?</p>
  
Tags: <machine-learning><game-ai>
Title: Can a game AI learn the concept of acceleration?
UserDisplayName: Finnick Odair
ThreadText: # Can a game AI learn the concept of acceleration?
  
  (Asked by: username_0 on 2018-02-25)
  
  If the game had a variable speed and was essential in evolution/gaining score(IDK AI terminologies). Would the AI be able to figure out when to slow down and speed up?
  
  If it is able to solve the problem or complete the level, will it have an equation to relating acceleration, or perhaps a number on when to speed up and down. What if the game environment was dynamic?
  
  Can you even teach math to an AI?
  
  PS: I'm not sure if I should ask separate question?
  
  **Tags:** machine-learning, game-ai
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2018-02-25. Score: 3 | Accepted answer
  
  This answer mostly assumes you are referring to computer-game-playing bots that learn through experiencing play, such as Deep Mind's DQN as used for playing Atari console games. State of the art for these are typically [Reinforcement Learning](https://en.wikipedia.org/wiki/Reinforcement_learning) algorithms, used with neural networks to process input and estimate results of next actions. There are other competitive AI technologies too, and the answer applies generally to most learning or evolving optimisers that would learn through trial and error by playing the game.
  
  > If the game had a variable speed and was essential in evolution/gaining score(IDK AI terminologies). Would the AI be able to figure out when to slow down and speed up?
  
  Yes, as long as the game allowed control of something that influenced acceleration, then a learning agent can figure out the consequences of accelerating and braking and use them appropriately within the game.
  
  A well-known toy example that can challenge learning agents is called [Mountain Car](https://en.wikipedia.org/wiki/Mountain_car_problem). In that game, the agent has to learn to accelerate in the correct direction (which is not always towards its objective), in order to escape an area. It is considered challenging because the reward (for escaping) can be significantly delayed compared to the action that best enables it.
  
  One popular proving ground for learning agents is OpenAI gym. This includes several game environments with a physical model of acceleration included, such as [Lunar Lander](https://gym.openai.com/envs/LunarLander-v2/).
  
  > If it is able to solve the problem or complete the level, will it have an equation to relating acceleration?
  
  In general, no. The agent will learn to respond to certain stimulus, by taking an action that accelerates or decelerates the game piece that it controls. There will not be any concept like $s = ut + \frac{1}{2} at^2$ encoded in the agent's parameters.
  
  > or perhaps a number on when to speed up and down?
  
  Typically the agent will learn which stimuli should be responded to by accelerating. For instance, in a game where the agent's game piece is being chased by an enemy piece and the enemy piece is getting closer, the agent should learn that it will get a better reward if it accelerates away from the enemy.
  
  > What if the game environment was dynamic?
  
  Most game environments are dynamic, as in the state changes over time. If you mean would anything change if the game rules themselves varied over time, then this may cause interesting problems for some learning algorithms, but should not change anything about learning use of controls that affect acceleration in a virtual world.
  
  > Can you even teach math to an AI?
  
  Generally, no you cannot teach math to the kind of system that plays games, or interacts with real world objects. These kind of learning systems are not yet advanced enough to learn concepts or establish game world logic from interactions. Instead, they work more akin to perception, muscle memory and either inherent or learned reflexes. Exceptions to this will generally have a world model (with the necessary equations) built in or made available to the agent without it needing to learn anything.
  
  However, there are AI systems that use formal logic that can work on mathematical theories. Some have performed interesting feats such as "discovering" prime numbers, given formal definitions of integers and basic arithmetic. An example of this kind of system is the [Automated Mathematician](https://en.wikipedia.org/wiki/Automated_Mathematician).
  
  There is an intermediate possibility: Some learning agents not only learn the *value* or *best policy* for certain actions, they also learn to predict what should happen next to the state of the environment. Such an agent would include a model that could observe objects that were accelerating and predict their future positions. In some ways this *is* a learned concept of acceleration, although it would not be expressed mathematically like Newton's laws of motion, and is more akin to the kind of intuition that allows a person to track, anticipate and catch a thrown ball.
  
  
  ---
  
  ### Answer by username_1 on 2018-02-26. Score: 2
  
  Methods such as [Genetic Programming](http://www.gp-field-guide.org.uk/?m=1) can induce symbolic expressions from observations. Indeed, such methods can be used as an alternative to neural (or other nonsymbolic) approaches when the goal is not merely to find a function that fits the data well, but which also has a chance of giving a human-readable description of the learned function in terms of whatever mathematical functions the user chooses to supply the learning method with.
  
  These methods are even [used commercially](https://link.springer.com/content/pdf/10.1023/A:1011516717456.pdf) for knowledge discovery.
  
  
  ---
  
  