Answers.Body: <p>In order to have anything resembling <a href="https://en.wikipedia.org/wiki/Reinforcement_learning" rel="nofollow noreferrer">reinforcement learning</a> you <strong>must</strong> at the very least have a set of states <span class="math-container">$S$</span> and a set of actions <span class="math-container">$A$</span>.</p>
  <p>In your formulation I can vaguely identify the set of states <span class="math-container">$S$</span> as all possible <span class="math-container">$(x,y,z)$</span> triplets. But don't see anything in your description that could be interpreted as a set of actions <span class="math-container">$A$</span>. You either oversimplified the description of your problem or reinforcement learning is not applicable here by lack of very basic ingredients for it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-08T16:38:16.693Z
Answers.LastActivityDate: 2021-04-08T16:38:16.693Z
Answers.UserDisplayName: Kostya
Body: <p>I want to use RL instead of genetic or any other evolutionary algorithm in order to find the best parameter for a function.</p>
  <p>Here is the problem:</p>
  <p>Given a function <span class="math-container">$$f(x,y,z, \text{data}),$$</span>
  where <span class="math-container">$x$</span>, <span class="math-container">$y$</span> and <span class="math-container">$z$</span> are some integers from 1 to 50.</p>
  <p>So I can say I have a 3-dimensional array which is a way to save fitness values:</p>
  <p><span class="math-container">$$\text{parameters} = [[1..50], [1..50], [1..50]]$$</span></p>
  <p>The <span class="math-container">$$\text{data}$$</span> is another input which is the <span class="math-container">$f$</span> needed to do some calculation on.</p>
  <p>Currently, I am optimizing it using a genetic algorithm with <span class="math-container">$$\text{cost}(\text{fitness}) = f(x,y,z,data)$$</span> which is a customized cost function.</p>
  <p>Any value for <span class="math-container">$x$</span>, <span class="math-container">$y$</span>, and <span class="math-container">$z$</span> will result in a cost for example:</p>
  <p><span class="math-container">$$f(1, 5, 8, X) = 15$$</span></p>
  <p><span class="math-container">$$\text{parameters}: [1, 5, 8] = 15$$</span></p>
  <p>or</p>
  <p><span class="math-container">$$ \text{parameters}: [2, 9, 11] = 30$$</span></p>
  <p>In the provided example 2, 9, and 11 is a better set of parameters.</p>
  <p>So I run a genetic algorithm and make some children with a sequence of x,y, and z. Then I calculate the cost(fitness) and then select them and so on.</p>
  <p><strong>I want to know is there any alternative or method in reinforcement learning which I can use instead of a genetic algorithm?</strong> If yes, please provide the name or any helpful link.</p>
  <p>Note that F is completely defined by the user and should be changed in other contexts.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-04-07T20:04:03.407Z
Comments.Text: Reinforcement learning is not an optimization method, it's a data driven approach to optimal control. There is no notion of state or action in your problem nor there is sequential decision making involved. It's a wrong tool to use here.
Comments.UserDisplayName: Brale
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-04-08T08:22:15.997Z
Comments.Text: @Brale yeah I know it's not right, but I want to know if there any way to solve this problem in a some customized approach.
Comments.UserDisplayName: Arta Asadi
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-22T08:01:00.123Z
Comments.Text: if you insist on using RL, maybe adaptive operator selection of GA (or population metaheuristic in general) using RL?
Comments.UserDisplayName: Sanyou
Tags: <reinforcement-learning><optimization><genetic-algorithms><algorithm-request><fitness-functions>
Title: Is it possible to optimize a multi-variable function with a reinforcement learning method?
UserDisplayName: Arta Asadi
ThreadText: # Is it possible to optimize a multi-variable function with a reinforcement learning method?
  
  (Asked by: username_0 on 2021-04-07)
  
  I want to use RL instead of genetic or any other evolutionary algorithm in order to find the best parameter for a function.
  
  Here is the problem:
  
  Given a function $$f(x,y,z, \text{data}),$$
  where $x$, $y$ and $z$ are some integers from 1 to 50.
  
  So I can say I have a 3-dimensional array which is a way to save fitness values:
  
  $$\text{parameters} = [[1..50], [1..50], [1..50]]$$
  
  The $$\text{data}$$ is another input which is the $f$ needed to do some calculation on.
  
  Currently, I am optimizing it using a genetic algorithm with $$\text{cost}(\text{fitness}) = f(x,y,z,data)$$ which is a customized cost function.
  
  Any value for $x$, $y$, and $z$ will result in a cost for example:
  
  $$f(1, 5, 8, X) = 15$$
  
  $$\text{parameters}: [1, 5, 8] = 15$$
  
  or
  
  $$ \text{parameters}: [2, 9, 11] = 30$$
  
  In the provided example 2, 9, and 11 is a better set of parameters.
  
  So I run a genetic algorithm and make some children with a sequence of x,y, and z. Then I calculate the cost(fitness) and then select them and so on.
  
  **I want to know is there any alternative or method in reinforcement learning which I can use instead of a genetic algorithm?** If yes, please provide the name or any helpful link.
  
  Note that F is completely defined by the user and should be changed in other contexts.
  
  **Tags:** reinforcement-learning, optimization, genetic-algorithms, algorithm-request, fitness-functions
  
  > **Comments:**
  > **username_1**: Reinforcement learning is not an optimization method, it's a data driven approach to optimal control. There is no notion of state or action in your problem nor there is sequential decision making involved. It's a wrong tool to use here.  
  > **username_0**: @username_1 yeah I know it's not right, but I want to know if there any way to solve this problem in a some customized approach.  
  > **username_2**: if you insist on using RL, maybe adaptive operator selection of GA (or population metaheuristic in general) using RL?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2021-04-08. Score: 0 | Accepted answer
  
  In order to have anything resembling [reinforcement learning](https://en.wikipedia.org/wiki/Reinforcement_learning) you **must** at the very least have a set of states $S$ and a set of actions $A$.
  
  In your formulation I can vaguely identify the set of states $S$ as all possible $(x,y,z)$ triplets. But don't see anything in your description that could be interpreted as a set of actions $A$. You either oversimplified the description of your problem or reinforcement learning is not applicable here by lack of very basic ingredients for it.
  
  
  ---
  
  