def __init__(self, expert, **kwargs):
"""
expert: an Agent implementing the policy-to-be-imitated
The Imitator will sometimes call expert.act() in order to get training data
We promise that the number of calls to expert.act() will be sublinear
in the number of calls to Imitator.act().
Note that each Agent has immutable state,
but calling methods on an Imitator may cause updates to external parameters,
and these parameters may affect the behavior of existing Agent objects
"""
super(Imitator, self).__init__(**kwargs)
self.expert = expert
#the act method is responsible for sometimes calling expert.act() to gather training data
#it is also responsible for updating the agent's parameters
评论列表
文章目录