Answers.Body: <p>If the program is a black box - that is, it actually computes its output from the values of the inputs within its own code (which means, it does not, for example, go out and read values off some device, or rely on some external service whose results are not predictable) - then, yes, you can write an AI that emulates the program.   Unless the program is fairly trivial, however, the emulation will be approximate - that is, for at least some inputs, the output will not be correct.   How close you can get to adequate emulation will depend on the details of how the inputs are processed, and how much training effort you are will and able to afford.</p>
  <p>If you want to do this, you should probably start learning about reinforcement learning toolkits.   Rllib is one popular such tool set, if you're using (as I would assume you are) Python for your experiments.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-24T16:09:38.697Z
Answers.LastActivityDate: 2022-03-24T16:09:38.697Z
Answers.UserDisplayName: Walnut Close
Body: <p>I have an exe file but no access to its source code. It takes as input a list of 8 parameters and prints text files containing the output. I was wondering if it is possible to write an AI-based program that (given that I am a newbie with IA) can &quot;train&quot; a neural network using the input and output of my exe file to kind of create a black box that emulate the given exe file.</p>
  
Tags: <neural-networks><python>
Title: Emulate program behavior using neural network
UserDisplayName: drSlump
ThreadText: # Emulate program behavior using neural network
  
  (Asked by: username_0 on 2022-03-24)
  
  I have an exe file but no access to its source code. It takes as input a list of 8 parameters and prints text files containing the output. I was wondering if it is possible to write an AI-based program that (given that I am a newbie with IA) can "train" a neural network using the input and output of my exe file to kind of create a black box that emulate the given exe file.
  
  **Tags:** neural-networks, python
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-03-24. Score: 1
  
  If the program is a black box - that is, it actually computes its output from the values of the inputs within its own code (which means, it does not, for example, go out and read values off some device, or rely on some external service whose results are not predictable) - then, yes, you can write an AI that emulates the program. Unless the program is fairly trivial, however, the emulation will be approximate - that is, for at least some inputs, the output will not be correct. How close you can get to adequate emulation will depend on the details of how the inputs are processed, and how much training effort you are will and able to afford.
  
  If you want to do this, you should probably start learning about reinforcement learning toolkits. Rllib is one popular such tool set, if you're using (as I would assume you are) Python for your experiments.
  
  
  ---
  
  