def test_multi_agent_dqn(): s = socketClient() s.accessToServer() trainer = MultiAgentTrainer(s, algorithm='DQN', very_fast=False, visualize = True, max_iterate=500, file_or_folder_to_load='../modeldata/deep_q_3G_3Z_5000_times_2019_01_27_08_00.h5', mode='evaluate', epsilon_decrease='LINEAR', map_name='3G_3Z', layers=[100,100]) trainer.train()
def train_multi_agent2(): s = socketClient() s.accessToServer() trainer = MultiAgentTrainer(s, algorithm='DeepSarsa', very_fast=True, visualize = False, max_iterate=3000, mode='train',epsilon_decrease='INVERSE_SQRT',map_name='3G_4Z',layers=[100,100], export_per=1000,last_action_state_also_state=False) trainer.train()
def train_multi_agent(): s = socketClient() s.accessToServer() trainer = MultiAgentTrainer(s, epsilon_decay=InvSqrtDecay(1.0), algorithm='DeepSarsa', very_fast=True, visualize = False, max_iterate=5000, #file_to_load='../modeldata/DeepSarsa3G5Z/deep_sarsa_3G_5Z_5000_times_2019_01_31_08_54.h5', mode='train',map_name='3G_4Z',layers=[100,100], export_per=1000,last_action_state_also_state=True) trainer.train()
def train_multi_agent_dqn(): s = socketClient() s.accessToServer() trainer = MultiAgentTrainer(s, algorithm='DQN', very_fast=True, visualize = False, max_iterate=5000, #file_to_load='../modeldata/deep_q_3G_3Z_500_times_2019_01_26_23_12.h5', mode='train',epsilon_decrease='LINEAR',map_name='3G_4Z',layers=[100,100], export_per=250) trainer.train()
def test_multi_agent(): s = socketClient() s.accessToServer() trainer = MultiAgentTrainer(s, algorithm='DeepSarsa', very_fast=False, visualize = True, max_iterate=100, file_or_folder_to_load='../modeldata/deep_sarsa_3G_6Z_2019_02_06_00_48/deep_sarsa_3G_6Z_4000_times_2019_02_06_11_31.h5', mode='evaluate', epsilon_decrease='LINEAR', map_name='3G_6Z', layers=[100,100] , last_action_state_also_state = False) trainer.train()
def train_multi_agent_a2c_eligibility(): s = socketClient() s.accessToServer() trainer = MultiAgentTrainer(s, epsilon_decay=ConstantEpsilon(0.0), algorithm='A2C', very_fast=True, visualize = False, max_iterate=50000, mode='train',map_name='3G_6Z', actor_layers=[100, 100], critic_layers=[100, 100], export_per=1000,last_action_state_also_state=False, eligibility_trace=True) trainer.train(do_test_during_train=False)
def train_multi_agent_with_eligibility(): s = socketClient() s.accessToServer() trainer = MultiAgentTrainer(s, epsilon_decay=InvSqrtDecay(1.0), algorithm='DeepSarsa', very_fast=True, visualize = False, max_iterate=5000, mode='train',map_name='3G_6Z',layers=[100, 100], export_per=500,last_action_state_also_state=False, eligibility_trace=True) trainer.train(do_test_during_train=False)
def test_multi_agent_multiple_models(): s = socketClient() s.accessToServer() trainer = MultiAgentTrainer(s, epsilon_decay=ConstantEpsilon(0.0), algorithm='DeepSarsa', very_fast=True, visualize=False, max_iterate=100, file_or_folder_to_load='../modeldata/multi_test', mode='evaluate_multiple_models', map_name='3G_6Z', layers=[100, 100] , last_action_state_also_state=False) trainer.evaluate_multiple(test_file_path="deep_sarsa_3G_6Z_2019_02_06_23_53", test_zero=True, test_iter=100)
def test_multi_agent(): s = socketClient() s.accessToServer() trainer = MultiAgentTrainer(s, epsilon_decay=ConstantEpsilon(0.0), algorithm='DeepSarsa', very_fast=True, visualize = False, max_iterate=100, file_or_folder_to_load='../modeldata/deep_sarsa_3G_6Z_2019_02_06_23_53/deep_sarsa_3G_6Z_4000_times_2019_02_07_08_54.h5', mode='evaluate', map_name='3G_6Z', layers=[100,100] , last_action_state_also_state = False) #trainer.evaluate(100) trainer.train()