本文整理匯總了Python中Agent.Agent.run方法的典型用法代碼示例。如果您正苦於以下問題:Python Agent.run方法的具體用法?Python Agent.run怎麽用?Python Agent.run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Agent.Agent
的用法示例。
在下文中一共展示了Agent.run方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_room2
# 需要導入模塊: from Agent import Agent [as 別名]
# 或者: from Agent.Agent import run [as 別名]
return self.rooms[0]
def get_room2(self):
return self.rooms[1]
manual_world = input("Do you want to create the world manually? Y/n")
if(manual_world.capitalize() == "Y"):
a_state = input("Room A state... CLEAN/DIRTY")
b_state = input("Room B state... CLEAN/DIRTY")
steps = input("How many steps to run for... n")
sim = Simulator()
sim.rooms[0].state = a_state.upper()
sim.rooms[1].state = b_state.upper()
sim2 = sim;
a = Agent(sim.rooms)
b = Agent2(sim2.rooms)
a.run(int(steps))
b.run(int(steps))
else:
c1 = Simulator()
c2 = Simulator()
a = Agent(c1.rooms)
b = Agent2(c2.rooms)
a.run()
b.run()