วันพฤหัสบดีที่ 3 มีนาคม พ.ศ. 2565

Reinforcement learning

There are many algorithms for reinforcement learning, please see https://en.wikipedia.org/wiki/Reinforcement_learning 

Well-known algorithm is Q-learning.







Reinforcement learning involves an agent, a set of states , and a set  of actions per state. By performing an action , the agent transitions from state to state. Executing an action in a specific state provides the agent with a reward (a numerical score).

Algorithm

After  steps into the future the agent will decide some next step. The weight for this step is calculated as , where  (the discount factor) is a number between 0 and 1 () and has the effect of valuing rewards received earlier higher than those received later (reflecting the value of a "good start").  may also be interpreted as the probability to succeed (or survive) at every step .

The algorithm, therefore, has a function that calculates the quality of a state–action combination:

.

Before learning begins,  is initialized to a possibly arbitrary fixed value (chosen by the programmer). Then, at each time  the agent selects an action , observes a reward , enters a new state  (that may depend on both the previous state  and the selected action), and  is updated. The core of the algorithm is a Bellman equation as a simple value iteration update, using the weighted average of the current value and the new information.

Cf. https://en.wikipedia.org/wiki/Q-learning#Deep_Q-learning