ca7a5e9a39478054dbdfbfba9963b13c80b768f8,ch18/telegram-bot.py,Session,move_bot,#Session#,54
Before Change
state_list = game.decode_binary(self.state)
batch_v = model.state_lists_to_batch([state_list], [self.BOT_PLAYER])
logits_v, values_v = self.model(batch_v)
probs_v = F.softmax(logits_v)
probs = probs_v[0].data.cpu().numpy()
self.value = values_v.data.cpu().numpy()[0]
while True:
action = np.random.choice(game.GAME_COLS, p=probs)
if action in game.possible_moves(self.state):
After Change
def move_bot(self):
self.mcts_store.search_batch(MCTS_SEARCHES, MCTS_BATCH_SIZE, self.state, self.BOT_PLAYER, self.model)
probs, values = self.mcts_store.get_policy_value(self.state, tau=0)
action = np.random.choice(game.GAME_COLS, p=probs)
self.value = values[action]
self.moves.append(action)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: ca7a5e9a39478054dbdfbfba9963b13c80b768f8
Time: 2018-03-14
Author: max.lapan@gmail.com
File Name: ch18/telegram-bot.py
Class Name: Session
Method Name: move_bot
Project Name: wenwei202/iss-rnns
Commit Name: b9b992e52fb42f137e6aa0de6e9f201ef0140571
Time: 2016-10-21
Author: seominjoon@gmail.com
File Name: basic/model.py
Class Name:
Method Name: bi_attention
Project Name: chainer/chainercv
Commit Name: 5173f180d75df1e751689d37692e729f45e416a6
Time: 2017-05-18
Author: yuyuniitani@gmail.com
File Name: chainercv/links/model/faster_rcnn/region_proposal_network.py
Class Name: RegionProposalNetwork
Method Name: __call__