def get_SmartAgents() -> List[SmartAgent]: agents: SmartAgent = [] agent_0 = SmartAgent(index=0, moves=[((9, 2), (21, 2), (27, 17)), ((21, 20), (27, 20), (9, 2)), ((27, 17), (9, 17), (21, 20))], local_phase_sections=[2, 20, 17], curve_densities={(9, 2): 0.7, (21, 2): 0.3, (21, 20): 0.7, (27, 20): 0.3, (27, 17): 0.7, (9, 17): 0.3}, sections_9_indexes=[0, 1, 2, 18, 19, 20, 15, 16, 17]) agent_1 = SmartAgent(index=1, moves=[((12, 11), (30, 11), (18, 26)), ((12, 5), (18, 5), (30, 11)), ((18, 26), (30, 26), (12, 5))], local_phase_sections=[5, 11, 26], curve_densities={(12, 5): 0.7, (18, 5): 0.3, (30, 11): 0.7, (12, 11): 0.3, (18, 26): 0.7, (30, 26): 0.3}, sections_9_indexes=[3, 4, 5, 24, 25, 26, 9, 10, 11]) agent_2 = SmartAgent(index=2, moves=[((33, 14), (15, 14), (24, 23)), ((24, 8), (15, 8), (33, 14)), ((24, 23), (33, 23), (15, 8))], local_phase_sections=[8, 14, 23], curve_densities={(15, 8): 0.7, (24, 8): 0.3, (33, 14): 0.7, (15, 14): 0.3, (24, 23): 0.7, (33, 23): 0.3}, sections_9_indexes=[6, 7, 8, 21, 22, 23, 12, 13, 14]) agents.append(agent_0) agents.append(agent_1) agents.append(agent_2) return agents
def get_SmartAgents_with_model(models) -> List[SmartAgent]: agents: SmartAgent = [] agent_0 = SmartAgent(index=0, moves=[((9, 2), (21, 2), (27, 17)), ((21, 20), (27, 20), (9, 2)), ((27, 17), (9, 17), (21, 20))], local_phase_sections=[2, 20, 17], curve_densities={ (9, 2): 0.7, (21, 2): 0.3, (21, 20): 0.7, (27, 20): 0.3, (27, 17): 0.7, (9, 17): 0.3 }, model=models[0], outflow_section=27) agent_1 = SmartAgent(index=1, moves=[((12, 11), (30, 11), (18, 26)), ((12, 5), (18, 5), (30, 11)), ((18, 26), (30, 26), (12, 5))], local_phase_sections=[5, 26, 11], curve_densities={ (12, 5): 0.7, (18, 5): 0.3, (30, 11): 0.7, (12, 11): 0.3, (18, 26): 0.7, (30, 26): 0.3 }, model=models[1], outflow_section=30) # blad agent_2 = SmartAgent(index=2, moves=[((33, 14), (15, 14), (24, 23)), ((24, 8), (15, 8), (33, 14)), ((24, 23), (33, 23), (15, 8))], local_phase_sections=[8, 14, 23], curve_densities={ (15, 8): 0.7, (24, 8): 0.3, (33, 14): 0.7, (15, 14): 0.3, (24, 23): 0.7, (33, 23): 0.3 }, model=models[2], outflow_section=33) agents.append(agent_0) agents.append(agent_1) agents.append(agent_2) return agents
def deep_copy_agent(agent): new_agent = SmartAgent(index=agent.index, moves=agent.moves, local_phase_sections=agent.local_phase_sections, curve_densities=agent.curve_densities, sections_9_indexes=agent.sections_9_indexes) new_agent.local_state = agent.local_state new_agent.orange_phase_duration = agent.orange_phase_duration new_agent.pending_phase = agent.pending_phase new_agent.rewards = agent.rewards new_agent.actual_phase = agent.actual_phase new_agent.starting_actual_phase = agent.starting_actual_phase new_agent.action = agent.action return new_agent
def get_SmartAgents() -> List[SmartAgent]: agents: SmartAgent = [] agent_0 = SmartAgent(index=0, moves=[ ((2, 1), (404, 404)), ((4, 1), (404, 404)), ], local_phase_sections=[0], curve_densities={ (2, 1): 0.3, (4, 1): 0.7 }) agents.append(agent_0) return agents
def get_SmartAgents_with_model(models) -> List[SmartAgent]: agents: SmartAgent = [] agent_0 = SmartAgent(index=0, moves=[ ((1, 0), (404, 404)), ((2, 0), (404, 404)), ], local_phase_sections=[0], curve_densities={ (2, 0): 0.7, (1, 0): 0.3 }, sections_9_indexes=[0]) agents.append(agent_0) return agents
def get_SmartAgents_with_model(models) -> List[SmartAgent]: agents: SmartAgent = [] agent_0 = SmartAgent(index=0, moves=[ ((4, 1), (404, 404)), ((4, 3), (404, 404)), ], local_phase_sections=[0, 1, 2, 3], curve_densities={ (4, 1): 1, (4, 3): 1 }, model=models[0]) agents.append(agent_0) return agents
def get_SmartAgents() -> List[SmartAgent]: agents: SmartAgent = [] agent_0 = SmartAgent( index=0, moves=[ ((2, 1), (404, 404)), # (404,404) musi byc, bo ((2,1)) python parsuje na (2,1) ((4, 1), (404, 404)), ], local_phase_sections=[1], curve_densities={ (2, 1): 0.25, (4, 1): 0.75 }) agents.append(agent_0) return agents
def get_SmartAgents() -> List[SmartAgent]: agents: SmartAgent = [] agent_0 = SmartAgent( index=0, moves=[ ((4, 1), (404, 404)), # 404 musi byc, bo python parsuje samo ((4,1)) na (4,1) ((4, 3), (404, 404)), ], local_phase_sections=[0, 1, 2, 3], curve_densities={ (4, 1): 1, (4, 3): 1 }) agents.append(agent_0) return agents
def get_SmartAgents() -> List[SmartAgent]: agents: SmartAgent = [] agent_0 = SmartAgent(index=0, all_phases=[ Phase(index=0, moves=()), Phase(index=1, moves=((9, 2), (21, 2), (27, 17))), Phase(index=2, moves=((21, 20), (27, 20), (9, 2))), Phase(index=3, moves=((27, 17), (9, 17), (21, 20))) ], local_phase_sections=[2, 20, 17], curve_densities={ (9, 2): 0.7, (21, 2): 0.3, (21, 20): 0.7, (27, 20): 0.3, (27, 17): 0.7, (9, 17): 0.3 }) agent_1 = SmartAgent(index=1, all_phases=[ Phase(index=0, moves=()), Phase(index=1, moves=((12, 11), (30, 11), (18, 26))), Phase(index=2, moves=((12, 5), (18, 5), (30, 11))), Phase(index=3, moves=((18, 26), (30, 26), (12, 5))) ], local_phase_sections=[5, 11, 26], curve_densities={ (12, 5): 0.7, (18, 5): 0.3, (30, 11): 0.7, (12, 11): 0.3, (18, 26): 0.7, (30, 26): 0.3 }) agent_2 = SmartAgent(index=2, all_phases=[ Phase(index=0, moves=()), Phase(index=1, moves=((33, 14), (15, 14), (24, 23))), Phase(index=2, moves=((24, 8), (15, 8), (33, 14))), Phase(index=3, moves=((24, 23), (33, 23), (15, 8))) ], local_phase_sections=[8, 14, 23], curve_densities={ (15, 8): 0.7, (24, 8): 0.3, (33, 14): 0.7, (15, 14): 0.3, (24, 23): 0.7, (33, 23): 0.3 }) agents.append(agent_0) agents.append(agent_1) agents.append(agent_2) return agents
def get_SmartAgents() -> List[SmartAgent]: agents: SmartAgent = [] agent_0 = SmartAgent(index=0, moves=[((1, 0), (2, 28)), ((4, 37), (29, 21)), ((4, 0), (2, 0), (29, 28), (1, 28)), ((2, 37), (29, 37), (1, 21), (4, 21))], local_phase_sections=[0, 21, 28, 37], curve_densities={ (4, 0): 0.5, (2, 0): 0.3, (1, 0): 0.2, (2, 37): 0.5, (29, 37): 0.3, (4, 37): 0.2, (2, 37): 0.5, (29, 37): 0.3, (4, 37): 0.2, (29, 28): 0.5, (1, 28): 0.3, (2, 28): 0.2, (1, 21): 0.5, (4, 21): 0.3, (29, 21): 0.2, }, outflow_section=27) agent_1 = SmartAgent(index=1, moves=[((20, 30), (32, 17)), ((20, 17), (19, 17), (33, 30), (32, 30)), ((33, 18), (20, 18), (19, 18)), ((33, 3), (32, 3), (19, 3))], local_phase_sections=[30, 18, 17, 3], curve_densities={ (33, 30): 0.5, (32, 30): 0.3, (20, 30): 0.2, (32, 3): 0.5, (19, 3): 0.3, (33, 3): 0.2, (20, 18): 0.5, (33, 18): 0.3, (19, 18): 0.2, (19, 17): 0.5, (20, 17): 0.3, (32, 17): 0.2, }, outflow_section=30) agent_2 = SmartAgent(index=2, moves=[((8, 7), (10, 24)), ((9, 31), (25, 23)), ((9, 7), (10, 7), (8, 24), (25, 24)), ((9, 23), (8, 23), (10, 31), (25, 31))], local_phase_sections=[7, 23, 24, 31], curve_densities={ (9, 7): 0.5, (10, 7): 0.3, (8, 7): 0.2, (8, 23): 0.5, (9, 23): 0.3, (25, 23): 0.2, (25, 24): 0.5, (8, 24): 0.3, (10, 24): 0.2, (10, 31): 0.5, (25, 31): 0.3, (9, 31): 0.2, }, outflow_section=33) agent_3 = SmartAgent(index=3, moves=[((22, 36), (13, 38)), ((12, 11), (14, 39)), ((13, 36), (12, 36), (14, 38), (22, 38)), ((13, 11), (14, 11), (12, 39), (22, 39))], local_phase_sections=[11, 36, 38, 39], curve_densities={ (12, 36): 0.5, (13, 36): 0.3, (22, 36): 0.2, (22, 39): 0.5, (12, 39): 0.3, (14, 39): 0.2, (14, 38): 0.5, (22, 38): 0.3, (13, 38): 0.2, (13, 11): 0.5, (14, 11): 0.3, (12, 11): 0.2, }, outflow_section=33) agents.append(agent_0) agents.append(agent_1) agents.append(agent_2) agents.append(agent_3) return agents