資源簡介
python強化學習(基于matplotlib)
代碼片段和文件信息
#######################################################################
#?Copyright?(C)???????????????????????????????????????????????????????#
#?2016-2018?Shangtong?Zhang(zhangshangtong.cpp@gmail.com)?????????????#
#?2016?Tian?Jun(tianjun.cpp@gmail.com)????????????????????????????????#
#?2016?Artem?Oboturov(oboturov@gmail.com)?????????????????????????????#
#?2016?Kenta?Shimada(hyperkentakun@gmail.com)?????????????????????????#
#?Permission?given?to?modify?the?code?as?long?as?you?keep?this????????#
#?declaration?at?the?top??????????????????????????????????????????????#
#######################################################################
import?matplotlib
import?matplotlib.pyplot?as?plt
import?numpy?as?np
from?tqdm?import?trange
matplotlib.use(‘Agg‘)
class?Bandit:
????#?@k_arm:?#?of?arms
????#?@epsilon:?probability?for?exploration?in?epsilon-greedy?algorithm
????#?@initial:?initial?estimation?for?each?action
????#?@step_size:?constant?step?size?for?updating?
評論
共有 條評論