750aa623cb885d273d52c85da3cfc4a958ec836f,ch05/02_frozenlake_q_learning.py,,value_iteration,#Any#Any#,52
Before Change
for state in range(agent.env.observation_space.n):
for action in range(agent.env.action_space.n):
action_value = 0.0
target_counts = agent.transits[TransitKey(state, action)]
total = sum(target_counts.values())
for tgt_state, count in target_counts.items():
reward = agent.rewards[RewardKey(state, action, tgt_state)]
best_action = agent.select_action(tgt_state, values)
action_value += (count / total) * (reward + GAMMA * values[ValueKey(tgt_state, best_action)])
values[ValueKey(state, action)] = action_value
After Change
for state in range(agent.env.observation_space.n):
for action in range(agent.env.action_space.n):
action_value = 0.0
target_counts = agent.transits[(state, action)]
total = sum(target_counts.values())
for tgt_state, count in target_counts.items():
reward = agent.rewards[(state, action, tgt_state)]
best_action = agent.select_action(tgt_state, values)
action_value += (count / total) * (reward + GAMMA * values[(tgt_state, best_action)])
values[(state, action)] = action_value
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 750aa623cb885d273d52c85da3cfc4a958ec836f
Time: 2017-10-12
Author: max.lapan@gmail.com
File Name: ch05/02_frozenlake_q_learning.py
Class Name:
Method Name: value_iteration
Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 750aa623cb885d273d52c85da3cfc4a958ec836f
Time: 2017-10-12
Author: max.lapan@gmail.com
File Name: ch05/02_frozenlake_q_learning.py
Class Name:
Method Name: value_iteration
Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 750aa623cb885d273d52c85da3cfc4a958ec836f
Time: 2017-10-12
Author: max.lapan@gmail.com
File Name: ch05/01_frozenlake_v_learning.py
Class Name:
Method Name: value_iteration
Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 750aa623cb885d273d52c85da3cfc4a958ec836f
Time: 2017-10-12
Author: max.lapan@gmail.com
File Name: ch05/01_frozenlake_v_learning.py
Class Name: Agent
Method Name: select_action