def game(): query() sim = HurricaneSimulator(agents, K, config_file=config_file) while sim.ok(): if DEBUG: sim.print_all() print("=================================\n\n\n\n") action = sim.current_agent.choose_next_option(sim) sim.apply_action(action) print("\n\n\n-------------------------\n#### Final result ####\n\n") sim.print_all()
def game(): query() for agent in agents: sim = HurricaneSimulator(K, config_file=config_file) sim.state = agent.get_state() while sim.ok(): if DEBUG: sim.print_all() print("=================================\n\n\n\n") action = agent.choose_next_option(sim) sim.apply_action(action, agent.should_pick_and_drop) print("\n\n\n-------------------------\n#### Final result ####\n\n") sim.print_all() print("+++++ Agent expanded %d nodes +++++" % agent.expanded_nodes) P = sim.people_saved * f_value + agent.expanded_nodes print("##### Agent performance is %d #####" % P)