else: input_folder = "" #input_folder = "inputs/test/" input_folder = "inputs/FO_O_ABU/" if len(sys.argv) > 2: main_output_folder = sys.argv[2] else: main_output_folder = "" if len(sys.argv) > 3: config_file = input_folder + sys.argv[3] else: config_file = input_folder + 'config.csv' output_folder = log.create_output_folder(main_output_dir=main_output_folder) print 'output_folder', output_folder # ============= Read Configuration ============ # 1. Reading the sim configuration file info = defaultdict(list) with open(config_file) as info_read: for line in info_read: data = line.strip().split(',') key, val = data[0], data[1:] info[key].append(val) # 2. Getting the parameters for k, v in info.items(): if 'sim_path' in k:
reuse_tree = None mcts_mode = None PF_add_threshold = None PF_del_threshold = None PF_weight = 0.0 apply_adversary = False # ============= Set Input/Output ============ if len(sys.argv) > 1: input_folder = sys.argv[1] else: input_folder = log.get_input_folder() # input_folder = "inputs/adversary2/" output_folder = log.create_output_folder() # ============= Read Configuration ============ # 1. Reading the sim configuration file info = defaultdict(list) with open(input_folder + 'config.csv') as info_read: for line in info_read: data = line.strip().split(',') key, val = data[0], data[1:] info[key].append(val) # 2. Getting the parameters for k, v in info.items(): if 'sim_path' in k: sim_path = input_folder + str(v[0][0]).strip()