agent.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:smartcab 作者: martinbede 项目源码 文件源码
def run():
    """Run the agent for a finite number of trials."""

    # Set up environment and agent
    e = Environment()  # create environment (also adds some dummy traffic)
    a = e.create_agent(LearningAgent)  # create agent
    e.set_primary_agent(a, enforce_deadline=True)  # set agent to track

    # Now simulate it
    sim = Simulator(e, update_delay=1.0)  # reduce update_delay to speed up simulation
    sim.run(n_trials=200)  # press Esc or close pygame window to quit
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号