3552d25e57159d4684f73ef62bbf9335cd8b4f36,chapter10/AccessControl.py,,getAction,#Any#Any#Any#,98

Before Change


    if np.random.binomial(1, EPSILON) == 1:
        return np.random.choice(ACTIONS)
    values = [valueFunction.value(freeServers, priority, action) for action in ACTIONS]
    return np.argmax(values)

// take an action
def takeAction(freeServers, priority, action):
    if freeServers > 0 and action == ACCEPT:

After Change


    if np.random.binomial(1, EPSILON) == 1:
        return np.random.choice(ACTIONS)
    values = [valueFunction.value(freeServers, priority, action) for action in ACTIONS]
    return np.random.choice([action_ for action_, value_ in enumerate(values) if value_ == np.max(values)])

// take an action
def takeAction(freeServers, priority, action):
    if freeServers > 0 and action == ACCEPT:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 9

Instances


Project Name: ShangtongZhang/reinforcement-learning-an-introduction
Commit Name: 3552d25e57159d4684f73ef62bbf9335cd8b4f36
Time: 2017-10-28
Author: zhangshangtong.cpp@icloud.com
File Name: chapter10/AccessControl.py
Class Name:
Method Name: getAction


Project Name: ShangtongZhang/reinforcement-learning-an-introduction
Commit Name: 3552d25e57159d4684f73ef62bbf9335cd8b4f36
Time: 2017-10-28
Author: zhangshangtong.cpp@icloud.com
File Name: chapter10/MountainCar.py
Class Name:
Method Name: getAction


Project Name: ShangtongZhang/reinforcement-learning-an-introduction
Commit Name: 3552d25e57159d4684f73ef62bbf9335cd8b4f36
Time: 2017-10-28
Author: zhangshangtong.cpp@icloud.com
File Name: chapter06/CliffWalking.py
Class Name:
Method Name: chooseAction


Project Name: ShangtongZhang/reinforcement-learning-an-introduction
Commit Name: 3552d25e57159d4684f73ef62bbf9335cd8b4f36
Time: 2017-10-28
Author: zhangshangtong.cpp@icloud.com
File Name: chapter06/MaximizationBias.py
Class Name:
Method Name: chooseAction