Reinforcement learning program, information processing apparatus and reinforcement learning method
The reinforcement learning program dynamically adjusts the KL distance threshold during policy optimization, addressing inefficiencies in existing methods by automatically optimizing the upper limit value, thereby enhancing learning efficiency and stability.
Patent Information
- Application Number
- JP2023024535
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-02-20
- Publication Date
- 2024-08-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing reinforcement learning methods, such as TRPO and CPO, face inefficiencies due to the difficulty in automatically adjusting the optimal upper limit value for the KL distance, leading to prolonged learning times and suboptimal performance.
A reinforcement learning program that dynamically adjusts the upper limit value of the KL distance during policy optimization by observing policy differences and adjusting the threshold of the trust region based on algorithm operations, such as line search success or failure, to maintain the policy within a certain range.
Enables automatic adjustment of the optimal upper limit value for reinforcement learning, improving learning efficiency and stability by optimizing the learning process.
Smart Images

Figure 2024118220000001
Abstract
Description
[Technical field]
[0001] The present invention relates to a reinforcement learning program and the like. [Background technology]
[0002] Conventionally, there is a technique called reinforcement learning in which actions are determined based on a policy for a certain environment, and the policy is updated (improved) based on the resulting reward, thereby optimizing the reward.
[0003] As a method for updating a policy, for example, Trust Region Policy Optimization (TRPO) is known. As shown in the following formula (1), TRPO considers policy updates in reinforcement learning as an optimization problem with constraints on the KL distance (Kullback-Leibler divergence) between policies before and after the update. Note that π old ,π new are the policies (probability distributions) before and after the update. J(·) is the expected reward. E[D KL (π new ||π old )] is the expected value of the KL distance between the policies before and after the update.
number
[0004] D KL (π new ||π old ) is an index that represents the difference between two probability distributions. Therefore, TRPO is a policy π that maximizes the improvement in the expected reward value by setting an upper limit δ on the difference between the policies before and after the update. new In fact, the expected reward value J(·) and the expected value of the KL distance E[D KL (π new ||π oldSince it is difficult to calculate ) exactly, the expected reward value and the expected KL distance are calculated using an approximation of the policy using data collected with the policy before the update. In this case, if the policies before and after the update are significantly different, the approximation cannot be used, so an upper limit δ is set on the KL distance as a reliable region.
[0005] In addition, there is CPO (Constrained Policy Optimization), an algorithm derived from TRPO. CPO is an algorithm used when considering physical constraints on policies. Like TRPO, CPO also considers optimization problems with an upper limit on the KL distance and updates the policy.
[0006] Furthermore, techniques related to improving policies in reinforcement learning have been disclosed (see, for example, Patent Documents 1 and 2). [Prior art documents] [Patent documents]
[0007] [Patent Document 1] Patent Publication No. 2021-064222 [Patent Document 2] Patent Publication No. 2021-033332 Summary of the Invention [Problem to be solved by the invention]
[0008] By the way, in reinforcement learning with an upper limit on the KL distance, such as trust region policy optimization (TRPO), it is known that the progress of learning changes depending on the value of the upper limit δ of the KL distance. However, since learning takes a lot of time, it is inefficient to learn with various values of the upper limit δ and find the optimal value among the various values of the upper limit δ. In other words, there is a problem that it is difficult to automatically adjust the optimal upper limit δ for learning.
[0009] In one aspect, the present invention aims to automatically adjust the upper limit value that is optimal for learning in reinforcement learning in which an upper limit is set for the KL distance. [Means for solving the problem]
[0010] In one aspect, a reinforcement learning program causes a computer to execute a process in which, in a policy optimization problem in reinforcement learning, when a trust region is set and a policy is updated, the difference in the policy before and after the update is observed, and a threshold value of the trust region is adjusted according to the operation of the algorithm that leads to the policy update so that the observed difference remains within a certain range of the trust region. Effect of the Invention
[0011] According to one embodiment, in reinforcement learning in which an upper limit is set for the KL distance, the upper limit value that is optimal for learning can be automatically adjusted. [Brief description of the drawings]
[0012] [Figure 1] FIG. 1 is a diagram illustrating an example of a functional configuration of an information processing device according to a first embodiment. [Diagram 2] FIG. 2 is a diagram illustrating a policy update performed in the learning according to the first embodiment. [Diagram 3] FIG. 3 is a diagram illustrating the adjustment of δ according to the first embodiment. [Figure 4] FIG. 4 is a diagram illustrating an example of a flowchart of the reinforcement learning process according to the first embodiment. [Diagram 5] FIG. 5 is a diagram illustrating an example of a flowchart of the adjustment process according to the first embodiment. [Figure 6] FIG. 6 is a diagram illustrating an example of a flowchart of the adjustment process according to the second embodiment. [Figure 7] FIG. 7 is a diagram illustrating an example of a flowchart of an adjustment process according to the third embodiment. [Figure 8] FIG. 8 is a diagram illustrating an example of a verification result of the reinforcement learning process according to the first to third embodiments. [Figure 9]FIG. 9 is a diagram illustrating an example of a computer that executes a reinforcement learning program. [Figure 10] FIG. 10 is a graph showing how learning progresses when the upper limit δ is changed. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, embodiments of the reinforcement learning program, the information processing device, and the reinforcement learning method disclosed in the present application will be described in detail with reference to the accompanying drawings. Note that the present invention is not limited to the embodiments.
[0014] First, we will explain reinforcement learning. In reinforcement learning, actions are determined based on a policy for a certain environment, and the policy is updated based on the reward obtained as a result, so that the policy is updated to optimize the reward. In other words, reinforcement learning learns to update to a better policy based on the history of actions, rewards, etc.
[0015] There is a method called trust region policy optimization (TRPO) in reinforcement learning. The TRPO method regards policy updates in reinforcement learning as a constrained optimization problem of the KL distance between the policies before and after the update. TRPO is an algorithm that uses the above-mentioned formula (1). In other words, TRPO is an algorithm that finds a policy that maximizes the improvement in the expected reward value (J(·) in formula (1)) after setting an upper limit (δ in formula (1)) on the difference between the policies before and after the update.
[0016] In fact, the expected reward (J(·) in equation (1)) and the expected KL distance (E[D KL (π new ||π old Since it is difficult to calculate σ(σ) exactly, TRPO calculates the expected reward and KL distance using an approximation of the policy using data collected with the policy before the update. In this case, if the policies before and after the update are significantly different, approximation cannot be used, so an upper limit δ is set on the KL distance as a reliable region.
[0017] Here, in reinforcement learning with an upper limit on the KL distance such as TRPO, it is known that the way in which learning progresses changes depending on the value of the upper limit δ of the KL distance.
[0018] Figure 10 is a graph showing the progress of learning by changing the upper limit δ. -1 ", "10 -2 ", "10 -3 ", "10 -4 ", "10 -5 " are the learning results. In each graph, the horizontal axis represents the number of policy updates, and the vertical axis represents the reward. Each graph shows the results of performing the same learning three times, and the average and variance are shown. The solid black line indicates the average.
[0019] According to this, the reward increases quickly (with fewer policy updates) and stably when the upper limit δ is 10 -3 ". The upper limit δ is "10 -1 For δ, the reward is increasing but is unstable. -2 " The reward is increasing, but the variance is large. Also, the upper limit δ is "10 -4 " or "10 -5 For ", the reward increases little by little, but the learning speed is slow. Thus, it is suggested that there is an optimal value for the upper bound δ for policy optimization learning. In addition, the upper bound δ is expected to be different for each target problem.
[0020] In general, since learning takes a lot of time, it is inefficient to perform learning with various values of the upper limit δ and find the optimal value of the upper limit δ. In other words, it is difficult to automatically adjust the optimal value of the upper limit δ for learning.
[0021] Therefore, in the following embodiment, a method will be described in which the upper limit δ of the difference between pre-update and post-update policies is dynamically adjusted in parallel with policy optimization learning to search for an optimal upper limit. EXAMPLES
[0022] Fig. 1 is a block diagram showing an example of a functional configuration of an information processing device according to an embodiment. When setting a trust region and updating a policy in reinforcement learning, the information processing device 1 shown in Fig. 1 observes the difference between the policy before and after the update, and adjusts the threshold (upper limit value δ) of the trust region so that the observed difference remains within a certain range of the trust region. That is, the information processing device 1 dynamically adjusts the upper limit value δ of the difference between the policy before and after the update in parallel with learning of policy optimization.
[0023] The information processing device 1 includes a control unit 10 and a storage unit 20. The control unit 10 includes a learning unit 11 and an adjustment unit 12. The storage unit 20 includes learning data 21. The learning unit 11 is an example of an observation unit. The adjustment unit 12 is an example of an adjustment unit.
[0024] The learning data 21 stores data used in learning. The learning data 21 is log data that stores actions taken based on a policy, the state of the environment when the action was taken, and the reward obtained for each policy. The learning data 21 is sometimes called a trajectory.
[0025] The learning unit 11 sets a trust region and updates the policy. For example, the learning unit 11 collects trajectories based on the current policy from the learning data 21. Then, the learning unit 11 uses the collected trajectories to update the policy so as to satisfy the optimization problem of equation (1). That is, the learning unit 11 calculates the difference D KL (π||π old ) (KL distance) is constrained to be less than or equal to the upper limit δ, and the policy π new is calculated and updated. The constraint condition (see the right-hand equation of equation (1)) is an example of a trust region. The upper limit value δ of the constraint condition is an example of a threshold value of the trust region.
[0026] In an actual algorithm, it is difficult to obtain an exact solution of the policy π of the optimization problem of the formula (1). For this reason, the learning unit 11 obtains an approximate solution π of the optimization problem that can be solved.* new Then, the learning unit 11 performs the following process. * new is the solution before the update, π old In other words, the learning unit 11 determines whether the approximate solution π * new and the solution before the update, π old The learning unit 11 then determines whether the approximate solution π * new is the solution before the update, π old If the constraints of the optimization problem are not satisfied in relation to * new The solution before updating is π old Then, the learning unit 11 performs the determination process again by bringing the approximate solution π * new is the solution before the update, π old If the constraints of the optimization problem are satisfied in relation to * new That is, the learning unit 11 repeats the determination process to ensure that the constraints of the optimization problem of the formula (1) are satisfied. Note that the number of iterations varies depending on the value of δ. In this way, the solution before the update π old and the approximate solution π * new The process of searching for an approximate solution that satisfies the constraints between the lines is called "line search."
[0027] Here, the policy update performed by the learning unit 11 in learning will be described with reference to Fig. 2. Fig. 2 is a diagram for explaining the policy update performed in learning according to the first embodiment. old is the policy before the update. * new is π new (For example, see the left equation of equation (1)). Note that π * new is π according to the line search old This is an approximate solution that maximizes the improvement in expected reward value in relation to
[0028] Under such circumstances, the learning unit 11 * new is the original π old The learning unit 11 determines whether the approximate solution π satisfies the constraints of the optimization problem (see, for example, the right-hand equation of equation (1)). * new is the solution before the update, π old If the constraints of the optimization problem are not satisfied in relation to the approximate solution π * new The solution before updating is π old (symbol a1), and a new π * new is the original π old Then, the learning unit 11 performs a process of determining whether the approximate solution π satisfies the constraint condition of the optimization problem (see, for example, the right-hand equation of equation (1)). * new If satisfies the constraints, we can convert the policy to the approximate solution π * new The learning unit 11 updates the approximate solution π * new If does not satisfy the constraints, the approximate solution π * new The line search is repeated until satisfies the constraint condition (symbol a2). * new is the original π old If the constraints of the optimization problem are satisfied in relation to * new to update.
[0029] 1, the adjustment unit 12 adjusts the threshold of the trust region based on one policy update. For example, the adjustment unit 12 adjusts the upper limit δ of the constraint condition by focusing on the operation of the line search.
[0030] As an example, when the adjustment unit 12 updates the policy without entering the line search (in the first determination process), it increases the upper limit value δ by a predetermined value. *new Since it can be said that the accuracy of the approximation is sufficient if the value of δ can be updated, the upper limit value δ is increased to improve the learning speed. Note that the predetermined value may be defined in advance according to the magnitude of the upper limit value δ, for example.
[0031] In addition, when the line search is started and the policy update is successful, the adjustment unit 12 reduces the upper limit value δ by a predetermined value. * new Since the fact that δ is updated means that the accuracy of the approximation is insufficient, the upper limit δ is reduced in order to improve the accuracy of the approximation and perform accurate policy updating.
[0032] Furthermore, if the line search fails to update the policy, the adjuster 12 increases the upper limit δ by a predetermined value. * new is the original π old Since no good policy was found, the upper limit δ is increased to expand the search range of the line search.
[0033] Here, the adjustment of the upper limit value δ will be described with reference to FIG. 3. FIG. 3 is a diagram for explaining the adjustment of δ according to the first embodiment. As shown in FIG. 3, the adjustment unit 12 adjusts the upper limit value δ each time the learning unit 11 performs one policy update. That is, the adjustment unit 12 dynamically adjusts the upper limit value δ in parallel with the learning to search for an optimal value. Here, the left side of FIG. 3 is a graph in the case where the policy is updated without changing the predetermined upper limit value δ. In contrast, the right side of FIG. 3 is a graph in the case where the upper limit value δ is dynamically adjusted based on the result of one policy update. When the upper limit value δ is dynamically adjusted, the upper limit value δ is adjusted toward the optimal value as the number of policy updates increases.
[0034] 4 is a diagram illustrating an example of a flowchart of the reinforcement learning process according to the first embodiment. In FIG. 4, the learning unit 11 sets π old Assume that the following is accepted.
[0035] Then, the learning unit 11 collects trajectories from the learning data 21 based on the policy before the update (step S11). Then, the learning unit 11 formulates an optimization problem (1') (step S12). For example, the learning unit 11 formulates the optimization problem using the collected trajectories and equation (1).
[0036] Then, the learning unit 11 obtains the solution π of the optimization problem (1'). * new (Step S13). For example, the learning unit 11 uses the left equation of equation (1) to obtain π old The approximate solution π that maximizes the improvement in the expected reward value in relation to * new Request.
[0037] Then, the learning unit 11 executes a line search and updates the policy (step S14). For example, the learning unit 11 searches the approximate solution π * new and the solution before the update, π old The learning unit 11 then determines whether the approximate solution π * new is the solution before the update, π old If the constraints of the optimization problem are not satisfied in relation to * new The solution before updating is π old Then, the learning unit 11 performs the determination process again by bringing the approximate solution π * new is the solution before the update, π old If the constraints of the optimization problem are satisfied in relation to * new to update.
[0038] Next, the adjustment unit 12 adjusts the value of δ, which indicates the upper limit (step S15). Note that the process of adjusting the value of δ will be described later.
[0039] Then, the learning unit 11 judges whether the policy update count is the maximum or not (step S16). If it is judged that the policy update count is not the maximum (step S16; No), the learning unit 11 proceeds to step S11 to process the next policy update.
[0040] On the other hand, if it is determined that the number of policy updates is maximum (step S16; Yes), the learning unit 11 ends the reinforcement learning process.
[0041] Fig. 5 is a diagram illustrating an example of a flowchart of an adjustment process according to the first embodiment. As illustrated in Fig. 5, the adjustment unit 12 judges whether or not a line search has been entered for a policy update by the learning unit 11 (step S21). That is, the adjustment unit 12 judges whether or not a policy update has been performed by entering a line search.
[0042] When it is determined that the line search is not in progress (step S21; No), the adjustment unit 12 increases the upper limit value δ by a predetermined value (step S22). * new Since it can be said that the accuracy of the approximation is sufficient if δ has been updated, the upper limit value δ is increased to improve the learning speed. Then, the adjustment unit 12 ends the adjustment process.
[0043] On the other hand, if it is determined that the line search has started (step S21; Yes), the adjustment unit 12 determines whether or not the policy update in the line search has been successful (step S23). If it is determined that the policy update in the line search has not been successful (has failed) (step S23; No), the adjustment unit 12 increases the upper limit value δ by a predetermined value (step S24). This is because the result π of repeated line searches * new is the original π old Since no good policy was found, the upper limit δ is increased to widen the search range of the line search. Then, the adjustment unit 12 ends the adjustment process.
[0044] On the other hand, if it is determined that the policy update has been successful in the line search (step S23; Yes), the adjuster 12 reduces the upper limit value δ by a predetermined value (step S25). * new Since updating δ indicates that the accuracy of the approximation is insufficient, the upper limit value δ is reduced in order to improve the accuracy of the approximation and perform accurate policy updating. Then, the adjustment unit 12 ends the adjustment process.
[0045] [Effects of Example 1] According to the above-mentioned first embodiment, when performing one policy update by setting a trust region in a policy optimization problem in reinforcement learning, the information processing device 1 observes the difference between the policy before and after the update. The information processing device 1 adjusts the threshold of the trust region according to the operation of the algorithm leading to the policy update so that the observed difference remains within a certain range of the trust region. With this configuration, the information processing device 1 can automatically adjust the threshold of the trust region that is optimal for reinforcement learning.
[0046] Furthermore, according to the above-mentioned first embodiment, in the information processing device 1, the process of adjusting the threshold value determines whether or not the constraint condition that the difference between the approximation solution of the policy and the policy before the update is equal to or less than the threshold value is satisfied. If the process of adjusting the threshold value determines that the constraint condition is not satisfied, the process of adjusting the threshold value brings the approximation solution of the policy closer to the policy before the update and repeats the determination process. If the process of adjusting the threshold value determines that the constraint condition is satisfied, the process of adjusting the threshold value updates the approximation solution of the policy. The process of adjusting the threshold value adjusts the threshold value based on the operation of the algorithm. With this configuration, the information processing device 1 can adjust the threshold value of the trust region by focusing on the operation of the algorithm that updates the policy.
[0047] Also, according to the above-mentioned first embodiment, in the information processing device 1, the process of adjusting the threshold value increases the threshold value by a predetermined value when it is determined in the first determination process that the constraint condition is satisfied. The process of adjusting the threshold value decreases the threshold value by a predetermined value when it is determined in the second or subsequent determination processes that the constraint condition is satisfied even when it is determined in the first determination process that the constraint condition is not satisfied. The process of adjusting the threshold value increases the threshold value when it is determined in the second or subsequent determination processes that the constraint condition is not satisfied. With this configuration, the information processing device 1 can adjust the threshold value of the optimal trust region based on the operation of the algorithm that updates the policy. EXAMPLES
[0048] Incidentally, in the information processing device 1 according to the first embodiment, the adjustment unit 12 adjusts the upper limit value δ of the constraint condition by focusing on the operation (process) of the line search during one policy update. However, the adjustment unit 12 is not limited to this, and may adjust the upper limit value δ of the constraint condition by focusing on the difference (KL distance) between the updated policy obtained by the operation of the line search during one policy update and the policy before the update.
[0049] In the second embodiment, the adjustment unit 12 in the information processing device 1 adjusts the upper limit δ of the constraint condition by focusing on the difference (KL distance) between the updated policy obtained by the line search operation at the time of one policy update and the policy before the update. Note that the functional configuration of the information processing device 1 according to the second embodiment is the same as that of the information processing device 1 shown in FIG. 1, and therefore the description thereof will be omitted.
[0050] The adjustment unit 12 according to the second embodiment adjusts the threshold of the trust region based on one policy update. For example, the adjustment unit 12 adjusts the upper limit δ of the constraint condition by focusing on the difference (KL distance) between the updated policy obtained by the line search operation and the policy before the update.
[0051] As an example, the adjustment unit 12 calculates the difference between the updated policy obtained by the line search operation and the policy before the update, which is the difference with respect to the upper limit value δ of the constraint condition used in the line search. That is, the adjustment unit 12 calculates E[D KL (π * new ||π old )] / δ.
[0052] If the calculated value is equal to or smaller than the first reference value, the adjustment unit 12 reduces the upper limit value δ by a predetermined value. This is because the actual update width is small relative to the upper limit value δ, and in order to perform an accurate policy update, it is considered necessary to perform the update with a smaller width, so the upper limit value δ is reduced. Note that the predetermined value may be defined in advance according to, for example, the magnitude of the upper limit value δ. Also, the first reference value may be defined in advance according to, for example, the magnitude of the upper limit value δ and the magnitude of the KL distance.
[0053] Furthermore, when the calculated value is greater than the first reference value, the adjustment unit 12 increases the upper limit value δ by a predetermined value. This is because the actual update width is greater than the upper limit value δ and the current upper limit value δ is considered to be sufficient for updating the policy accurately, so the upper limit value δ is increased to improve the learning speed.
[0054] Here, a description will be given of a flowchart of an adjustment process according to Example 2. Note that the flowchart of the reinforcement learning process according to Example 2 is the same as the flowchart of the reinforcement learning process shown in Fig. 4, and therefore the description thereof will be omitted.
[0055] 6 is a diagram illustrating an example of a flowchart of the adjustment process according to the second embodiment. Note that the adjustment process by the adjustment unit 12 is performed by adjusting the policy π * new Assume that the following is accepted.
[0056] As shown in FIG. 6, the adjustment unit 12 calculates E[D KL (π * new||π old )] / δ is calculated (step S31). Then, the adjustment unit 12 judges whether the calculated value is equal to or less than the reference value (step S32). If it is judged that the calculated value is equal to or less than the reference value (step S32; Yes), the adjustment unit 12 reduces the upper limit value δ by a predetermined value (step S33). This is because the actual update width is small compared to the upper limit value δ, and it is considered that the update needs to be performed with a smaller width in order to perform an accurate policy update, so the upper limit value δ is reduced. Then, the adjustment unit 12 ends the adjustment process.
[0057] On the other hand, if it is determined that the calculated value is not equal to or less than the reference value (step S32; No), the adjustment unit 12 increases the upper limit value δ by a predetermined value (step S34). This is because the actual update range is larger than the upper limit value δ and the current upper limit value δ is considered to be sufficient for updating the policy accurately, so the upper limit value δ is increased to improve the learning speed. Then, the adjustment unit 12 ends the adjustment process.
[0058] [Effects of Example 2] According to the above-mentioned second embodiment, in the information processing device 1, the process of adjusting the threshold observes the difference between the policy before and after the update when a trust region is set and one policy update is performed in a policy optimization problem in reinforcement learning. The information processing device 1 adjusts the threshold based on the difference between the policy before and after the update with respect to the threshold of the trust region obtained by the operation of the algorithm leading to the policy update so that the observed difference remains within a certain range of the trust region. With this configuration, the information processing device 1 can automatically adjust the threshold of the trust region by using the difference between the policy before and after the update with respect to the threshold of the trust region.
[0059] According to the second embodiment, the information processing device 1 adjusts the threshold by increasing the threshold by a predetermined value when the difference between the policies before and after the update with respect to the threshold is equal to or greater than a first reference value, and decreases the threshold by a predetermined value when the difference between the policies before and after the update with respect to the threshold is less than the first reference value. With this configuration, the information processing device 1 can adjust the optimal threshold of the trusted region by using the difference between the policies before and after the update with respect to the trusted region threshold. EXAMPLES
[0060] Incidentally, in the information processing device 1 according to the first embodiment, the adjustment unit 12 adjusts the upper limit value δ of the constraint condition by focusing on the update operation in the line search during one policy update. However, the adjustment unit 12 is not limited to this, and may adjust the upper limit value δ of the constraint condition by focusing on the number of iterations in the line search during one policy update. The number of iterations in the line search referred to here is the number of iterations of the solution π performed in the line search. * new This refers to the number of times the determination process is repeated until the constraint condition is satisfied.
[0061] In the third embodiment, the adjustment unit 12 in the information processing device 1 adjusts the upper limit δ of the constraint condition by focusing on the number of iterations of the line search until one policy update. Note that the functional configuration of the information processing device 1 according to the third embodiment is the same as that of the information processing device 1 shown in FIG. 1, and therefore the description thereof will be omitted.
[0062] The adjustment unit 12 according to the third embodiment adjusts the threshold of the trust region based on one policy update. For example, the adjustment unit 12 adjusts the upper limit δ of the constraint condition by focusing on the number of repetitions of the line search until one policy update.
[0063] As an example, when the number of repetitions in the line search until one policy update is reached is equal to or greater than a second reference value, the adjustment unit 12 reduces the upper limit value δ by a predetermined value. This is because it can be said that the accuracy of the approximation is insufficient, and so the upper limit value δ is reduced in order to improve the accuracy of the approximation and perform an accurate policy update. Note that the predetermined value may be defined in advance according to, for example, the magnitude of the upper limit value δ. Also, the second reference value may be, for example, the solution π performed when repeating the determination process in the line search. * new to π old It is sufficient that the value be defined in advance according to the approach value by which the value approaches the value of the
[0064] Furthermore, when the number of iterations of the line search until one policy update is less than a second reference value, the adjustment unit 12 increases the upper limit value δ by a predetermined value, which means that the accuracy of the approximation is sufficient, and therefore increases the upper limit value δ to improve the learning speed.
[0065] Here, a description will be given of a flowchart of an adjustment process according to Example 3. Note that the flowchart of the reinforcement learning process according to Example 3 is the same as the flowchart of the reinforcement learning process shown in FIG. 4, and therefore the description thereof will be omitted.
[0066] 7 is a diagram illustrating an example of a flowchart of the adjustment process according to the embodiment 2. Note that, in the adjustment process by the adjustment unit 12, it is assumed that the number of repetitions of the line search in one policy update is received from the reinforcement learning process by the learning unit 11.
[0067] As shown in Fig. 6, the adjustment unit 12 judges whether the number of times the line search is repeated is equal to or greater than a second reference value (step S41). If it is judged that the number of times the line search is repeated is equal to or greater than the second reference value (step S41; Yes), the adjustment unit 12 reduces the upper limit value δ by a predetermined value (step S42). This means that the accuracy of the approximation is insufficient, so the upper limit value δ is reduced in order to improve the accuracy of the approximation and perform accurate policy update. Then, the adjustment unit 12 ends the adjustment process.
[0068] On the other hand, if it is determined that the number of iterations of the line search is less than the second reference value (step S41; No), the adjustment unit 12 increases the upper limit value δ by a predetermined value (step S43). Since this means that the accuracy of the approximation is sufficient, the upper limit value δ is increased to improve the learning speed. Then, the adjustment unit 12 ends the adjustment process.
[0069] [Effects of Example 3] According to the above-mentioned third embodiment, in the information processing device 1, the process of adjusting the threshold value determines whether or not the constraint condition that the difference between the approximation solution of the policy and the policy before the update is equal to or less than the threshold value is satisfied, and if it is determined that the constraint condition is not satisfied, the approximation solution of the policy is brought closer to the policy before the update and the determination process is repeated, and if it is determined that the constraint condition is satisfied, the approximation solution of the policy is updated, and the threshold value is adjusted based on the number of iterations until the update in the algorithm. With this configuration, the information processing device 1 can automatically adjust the threshold value of the trust region by using the number of iterations of the algorithm until the policy is updated.
[0070] According to the third embodiment, the information processing device 1 adjusts the threshold by decreasing the threshold by a predetermined value when the number of repetitions is equal to or greater than the second reference value, and increases the threshold by a predetermined value when the number of repetitions is less than the second reference value. With this configuration, the information processing device 1 can adjust the threshold of the optimal trust region by using the number of repetitions of the algorithm that leads to the policy update.
[0071] Here, an example of a verification result of the reinforcement learning process according to the first to third embodiments will be described with reference to Fig. 8. Fig. 8 is a diagram showing an example of a verification result of the reinforcement learning process according to the first to third embodiments. In Fig. 8, when the upper limit value δ is not adjusted, δ is set to a fixed value of 10 -1 If δ is a fixed value of 10 -3 In addition, in the case where the upper limit value δ is adjusted, the reinforcement learning in the case where the upper limit value δ is adjusted by the adjustment process according to the second embodiment is verified.
[0072] Under these circumstances, the above figure shows a graph that shows the upper limit δ corresponding to the number of policy updates in each case. That is, each graph shows the number of policy updates on the horizontal axis and the upper limit δ on the vertical axis. The left side of the figure shows the case where the upper limit δ is a fixed value of 10 -1 This is a graph without adjustment in the case of . In this case, even if the number of policy updates increases, the upper limit δ is 10 -1 In the above figure, the upper limit δ is fixed at 10 -3 This is a graph without adjustment in the case of . In this case, even if the number of policy updates increases, the upper limit δ is 10 -3 The graph on the right above shows the result after adjusting the upper limit δ. Here, the upper limit δ fluctuates. The upper limit δ decreases after convergence (after 20,000 policy updates). Note that since learning was performed three times for the same case, the graph contains three upper limits for the same number of policy updates.
[0073] The figure below shows a graph showing the reward corresponding to the number of policy updates in each case. That is, each graph shows the number of policy updates on the horizontal axis and the reward on the vertical axis. Note that the learning was performed three times for the same case, and each graph shows the average and standard deviation. The solid black line is the average.
[0074] The left figure below shows the upper limit δ set to a fixed value of 10 -1 In the figure below, the upper limit δ is a fixed value of 10 -3 Here, the graph shows the unadjusted case of a fixed value of 10 -3 The graph without adjustment has a fixed value of 10 -1 From the graph without adjustment, we can see that the reward increases as the number of policy updates increases. In contrast, the graph on the right below shows the graph with adjustment, where the upper limit δ is adjusted. Here, the graph with adjustment is a fixed value of 10 -3 As in the graph without adjustment in the case of , it can be seen that the reward increases as the number of policy updates increases. In other words, the information processing device 1 can automatically adjust the upper limit value δ to an optimal value for learning by using the mechanism for adjusting the upper limit value δ.
[0075] In addition, the graph with adjustments has a fixed value of 10 -3 It can be seen that the variance for each learning is suppressed compared to the graph without adjustment in the case of . In particular, δ is reduced after the policy update count reaches 20,000 steps (see the right side of the figure above), and the variance for each learning is suppressed. In other words, the information processing device 1 can suppress the variance for each learning by adjusting the upper limit value δ. Furthermore, the information processing device 1 can also fine-tune δ by reducing the change range (predetermined value) of the upper limit value δ.
[0076] In addition, in the early stages of learning, i.e. when the number of policy updates is small, the reward decreases. This is because verification is performed using constrained reinforcement learning. In the early stages of learning, constrained reinforcement learning has the characteristic of proceeding in the direction of observing the constraints even if it means lowering the reward.
[0077] [others] Note that each component of the illustrated information processing device 1 does not necessarily have to be physically configured as illustrated. In other words, the specific form of distribution / integration of the information processing device 1 is not limited to that shown in the figure, and all or part of it can be functionally or physically distributed / integrated in any unit according to various loads, usage conditions, etc. Also, the storage unit 20 may be connected as an external device of the information processing device 1 via a network.
[0078] Moreover, the various processes described in the above embodiments can be realized by executing a prepared program on a computer such as a personal computer or a workstation. Hereinafter, an example of a computer that executes a reinforcement learning program that realizes the same functions as the information processing device 1 shown in Fig. 1 will be described. Here, a reinforcement learning program that realizes the same functions as the information processing device 1 will be described as an example. Fig. 9 is a diagram showing an example of a computer that executes a reinforcement learning program.
[0079] 9, the computer 200 includes a CPU (Central Processing Unit) 203 that executes various arithmetic processes, an input device 215 that accepts data input from a user, and a display device 209. The computer 200 also includes a drive device 213 that reads programs and the like from a storage medium, and a communication I / F (Interface) 217 that transmits and receives data to and from other computers via a network. The computer 200 also includes a memory 201 that temporarily stores various information, and a HDD (Hard Disk Drive) 205. The memory 201, the CPU 203, the HDD 205, the display control unit 207, the display device 209, the drive device 213, the input device 215, and the communication I / F 217 are connected by a bus 219.
[0080] The drive device 213 is, for example, a device for the removable disk 211. The HDD 205 stores a reinforcement learning program 205a and reinforcement learning processing related information 205b. The communication I / F 217 manages the interface between the network and the inside of the device, and controls input and output of data from other computers. For example, a modem or a LAN adapter can be used as the communication I / F 217.
[0081] The display device 209 is a display device that displays a cursor, an icon, a tool box, and data such as documents, images, function information, etc. The display device 209 can be, for example, a liquid crystal display or an organic EL (Electroluminescence) display.
[0082] The CPU 203 reads out the reinforcement learning program 205a, expands it in the memory 201, and executes it as a process. Such a process corresponds to each functional unit of the information processing device 1. The reinforcement learning process related information 205b includes, for example, the learning data 21. Then, for example, a removable disk 211 stores each piece of information such as the reinforcement learning program 205a.
[0083] It should be noted that the reinforcement learning program 205a does not necessarily have to be stored in the HDD 205 from the beginning. For example, the program may be stored in a "portable physical medium" such as a flexible disk (FD), a CD-ROM, a DVD disk, a magneto-optical disk, or an IC card that is inserted into the computer 200. Then, the computer 200 may read out the reinforcement learning program 205a from these and execute it.
[0084] Further, the reinforcement learning process performed by the information processing device 1 described in the above first to third embodiments can be applied to sleep control of a mobile base station for power saving of the mobile base station, for example. The reinforcement learning process can be applied to constrained policy optimization (CPO) that saves power while ensuring the communication quality of the mobile base station. [Explanation of symbols]
[0085] 1. Information processing device 10 Control section 11 Learning Department 12 Adjustment part 20 Memory section 21 Training Data
Claims
1. In the optimization problem of the policy in reinforcement learning, When setting the trust region and updating the policy, the difference between the policy before and after the update is observed. Adjusting the threshold of the trust region so that the observed difference remains within a certain range of the trust region depending on the operation of the algorithm that leads to the update of the policy. A reinforcement learning program that causes a computer to execute a process.
2. The process of adjusting the threshold value includes: The threshold is adjusted based on the operation of the algorithm, which determines whether a constraint condition that a difference between the approximation solution of the policy and the policy before the update is equal to or less than the threshold condition is satisfied, and if it is determined that the constraint condition is not satisfied, the approximation solution of the policy is brought closer to the policy before the update and the determination process is repeated, and if it is determined that the constraint condition is satisfied, the approximation solution of the policy is updated.
2. The reinforcement learning program according to claim 1 .
3. The process of adjusting the threshold value is such that, if it is determined in the first determination process that the constraint condition is satisfied, the threshold value is increased; if it is determined in the second or subsequent determination processes that the constraint condition is satisfied even if it is determined in the first determination process that the constraint condition is not satisfied, the threshold value is decreased by a predetermined value; if it is determined in the second or subsequent determination processes that the constraint condition is not satisfied, the threshold value is increased by the predetermined value.
3. The reinforcement learning program according to claim 2,
4. The process of adjusting the threshold value adjusts the threshold value based on a difference between policies before and after the update for the threshold value, which is obtained by the operation of the algorithm.
2. The reinforcement learning program according to claim 1 .
5. The process of adjusting the threshold value is to increase the threshold value by a predetermined value when a difference between the policy before and after the update with respect to the threshold value is equal to or greater than a first reference value, and to decrease the threshold value by the predetermined value when a difference between the policy before and after the update with respect to the threshold value is less than the first reference value.
5. The reinforcement learning program according to claim 4.
6. The process of adjusting the threshold value includes: The threshold is adjusted based on the number of iterations until an update in the algorithm is reached, in which it is determined whether or not a constraint condition that a difference between the approximation solution of the policy and the policy before the update is equal to or less than the threshold is satisfied, and if it is determined that the constraint condition is not satisfied, the approximation solution of the policy is brought closer to the policy before the update and the determination process is repeated, and if it is determined that the constraint condition is satisfied, the approximation solution of the policy is updated.
2. The reinforcement learning program according to claim 1 .
7. The process of adjusting the threshold value is to decrease the threshold value by a predetermined value when the number of repetitions is equal to or greater than a second reference value, and to increase the threshold value by the predetermined value when the number of repetitions is less than the second reference value.
7. The reinforcement learning program according to claim 6,
8. In the optimization problem of the policy in reinforcement learning, An observation unit that observes the difference between the policy before and after the update when updating the policy by setting a trust region; an adjustment unit for adjusting a threshold of the trust region in response to the operation of an algorithm leading to an update of the policy, so that the difference observed by the observation unit remains within a certain range of the trust region; 13. An information processing device comprising:
9. In the optimization problem of the policy in reinforcement learning, When setting the trust region and updating the policy, the difference between the policy before and after the update is observed. Adjusting the threshold of the trust region so that the observed difference remains within a certain range of the trust region depending on the operation of the algorithm that leads to the update of the policy. A reinforcement learning method characterized in that processing is executed by a computer.
Citation Information
Patent Citations
Strategy improvement method, strategy improvement programs, and strategy improvement devices
JP2021033332A
Measure improvement method, measure improvement program, and measure improvement device
JP2021064222A
