官术网_书友最值得收藏!

Creating an MDP

Developed upon the Markov chain, an MDP involves an agent and a decision-making process. Let's go ahead with developing an MDP and calculating the value function under the optimal policy.

Besides a set of possible states, S = {s0, s1, ... , sm}, an MDP is defined by a set of actions, A = {a0, a1, ... , an}; a transition model, T(s, a, s'); a reward function, R(s); and a discount factor, ??. The transition matrix, T(s, a, s'), contains the probabilities of taking action a from state s then landing in s'. The discount factor, ??, controls the tradeoff between future rewards and immediate ones.

To make our MDP slightly more complicated, we extend the study and sleep process with one more state, s2 play games. Let's say we have two actions, a0 work and a1 slack. The 3 * 2 * 3 transition matrix T(s, a, s') is as follows:

This means, for example, that when taking the a1 slack action from state s0 study, there is a 60% chance that it will become s1 sleep (maybe getting tired ) and a 30% chance that it will become s2 play games (maybe wanting to relax ), and that there is a 10% chance of keeping on studying (maybe a true workaholic ). We define the reward function as [+1, 0, -1] for three states, to compensate for the hard work. Obviously, the optimal policy, in this case, is choosing a0 work for each step (keep on studying – no pain no gain, right?). Also, we choose 0.5 as the discount factor, to begin with. In the next section, we will compute the state-value function (also called the value function, just the value for short, or expected utility) under the optimal policy.

主站蜘蛛池模板: 梧州市| 温州市| 香河县| 长沙县| 南通市| 金昌市| 宁德市| 太保市| 绵阳市| 广州市| 白山市| 阿拉尔市| 富平县| 独山县| 凌海市| 名山县| 奈曼旗| 咸丰县| 罗平县| 会东县| 新营市| 乌鲁木齐市| 邵东县| 项城市| 昌邑市| 平原县| 新兴县| 莆田市| 沽源县| 金溪县| 聂拉木县| 丰顺县| 鲁山县| 潼关县| 新安县| 牙克石市| 岳阳市| 勐海县| 时尚| 桃园市| 于都县|