def beam_lin(count, room_time_limit, seed): #beam parameters: init_width_domain = [20] growf_domain = [(2, 'lin'), (4, 'lin'), (8, 'lin'), (16, 'lin')] heuristic_s = [heuristics.PowerHeuristic2(), heuristics.LinearHeuristic()] #------------------ Create Agents ------------------ agent_list = [] for h in heuristic_s: for init_width in init_width_domain: for growf in growf_domain: algorithm = AnytimeBeamSearch(init_width, growf) agent = TestAgent(algorithm, h) agent_list.append(agent) #---------------- Create Roomsets -------------------- roomsets = [ c_roomsets.easy_roomset(count, seed), c_roomsets.mild_roomset(count, seed), c_roomsets.heavy_roomset(count, seed) ] #---------------- measure -------------------- dbs = ameasure(agent_list, roomsets, room_time_limit) return dbs
def beam(count, room_time_limit): #beam parametres: init_width_domain = [2, 6, 12] growf_domain = [(1.1, 'exp'), (1.3, 'exp'), (2, 'lin'), (4, 'lin')] heuristic_s = [heuristics.PowerHeuristic2(), heuristics.LinearHeuristic()] #------------------ Create Agents ------------------ agent_list = [] for h in heuristic_s: for init_width in init_width_domain: for growf in growf_domain: algorithm = AnytimeBeamSearch(init_width, growf) agent = TestAgent(algorithm, h) agent_list.append(agent) #---------------- Create Roomsets -------------------- roomsets = [ c_roomsets.easy_roomset(count), c_roomsets.heavy_roomset(count), c_roomsets.static_rooms() ] dbs = ameasure(agent_list, roomsets, room_time_limit) return dbs
def heavy_astar(count, room_time_limit, seed): heuristic_s = [heuristics.PowerHeuristic2()] # ------------------ Create Agents ------------------ agent_list = [] for h in heuristic_s: agent = TestAgent(LimitedTimeAStar(), h) agent_list.append(agent) # ---------------- Create Roomsets -------------------- roomsets = [c_roomsets.heavy_roomset(count, seed)] # ---------------- measure -------------------- dbs = ameasure(agent_list, roomsets, room_time_limit) return dbs
def best_first_depth(count, room_time_limit, seed): ''' @param count: number of rooms ''' #beam parametres: depths = [400] heuristic_s = [heuristics.PowerHeuristic2()] #------------------ Create Agents ------------------ agent_list = [] for h in heuristic_s: for depth in depths: algorithm = AnytimeBestFirstGraphSearch() #algorithm = AnytimeBeamSearch(100, (2,'lin')) agent = TestAgent(algorithm, h) agent_list.append(agent) #---------------- Create Roomsets -------------------- roomsets = [c_roomsets.static_rooms()] dbs = ameasure(agent_list, roomsets, room_time_limit) return dbs
def best_first_depth(count,room_time_limit, seed): ''' @param count: number of rooms ''' #beam parametres: depths = [400] heuristic_s = [heuristics.PowerHeuristic2()] #------------------ Create Agents ------------------ agent_list = [] for h in heuristic_s: for depth in depths: algorithm = AnytimeBestFirstGraphSearch() #algorithm = AnytimeBeamSearch(100, (2,'lin')) agent = TestAgent(algorithm, h) agent_list.append(agent) #---------------- Create Roomsets -------------------- roomsets = [ c_roomsets.static_rooms() ] dbs = ameasure(agent_list, roomsets, room_time_limit) return dbs
def beam(count,room_time_limit): #beam parametres: init_width_domain = [2,6,12] growf_domain =[ (1.1,'exp'),(1.3,'exp'),(2,'lin'),(4,'lin') ] heuristic_s = [heuristics.PowerHeuristic2(),heuristics.LinearHeuristic()] #------------------ Create Agents ------------------ agent_list = [] for h in heuristic_s: for init_width in init_width_domain: for growf in growf_domain: algorithm = AnytimeBeamSearch(init_width, growf) agent = TestAgent(algorithm, h) agent_list.append(agent) #---------------- Create Roomsets -------------------- roomsets = [c_roomsets.easy_roomset(count), c_roomsets.heavy_roomset(count), c_roomsets.static_rooms() ] dbs = ameasure(agent_list, roomsets, room_time_limit) return dbs
def beam_lin(count,room_time_limit, seed): #beam parameters: init_width_domain = [20] growf_domain =[ (2,'lin'),(4,'lin'),(8,'lin'),(16,'lin') ] heuristic_s = [heuristics.PowerHeuristic2(),heuristics.LinearHeuristic()] #------------------ Create Agents ------------------ agent_list = [] for h in heuristic_s: for init_width in init_width_domain: for growf in growf_domain: algorithm = AnytimeBeamSearch(init_width, growf) agent = TestAgent(algorithm, h) agent_list.append(agent) #---------------- Create Roomsets -------------------- roomsets = [c_roomsets.easy_roomset(count, seed), c_roomsets.mild_roomset(count, seed), c_roomsets.heavy_roomset(count, seed) ] #---------------- measure -------------------- dbs = ameasure(agent_list, roomsets, room_time_limit) return dbs
def best_first(count,room_time_limit): ''' @param count: number of rooms ''' #beam parametres: depths = [10,80,250,400] heuristic_s = [heuristics.PowerHeuristic2(),heuristics.LinearHeuristic()] #------------------ Create Agents ------------------ agent_list = [] for h in heuristic_s: for depth in depths: algorithm = AnytimeBestFirstGraphSearch(depth) agent = TestAgent(algorithm, h) agent_list.append(agent) #---------------- Create Roomsets -------------------- roomsets = [c_roomsets.easy_roomset(count), c_roomsets.heavy_roomset(count), c_roomsets.static_rooms() ] dbs = ameasure(agent_list, roomsets, room_time_limit) return dbs
def best_first(count, room_time_limit): ''' @param count: number of rooms ''' #beam parametres: depths = [10, 80, 250, 400] heuristic_s = [heuristics.PowerHeuristic2(), heuristics.LinearHeuristic()] #------------------ Create Agents ------------------ agent_list = [] for h in heuristic_s: for depth in depths: algorithm = AnytimeBestFirstGraphSearch(depth) agent = TestAgent(algorithm, h) agent_list.append(agent) #---------------- Create Roomsets -------------------- roomsets = [ c_roomsets.easy_roomset(count), c_roomsets.heavy_roomset(count), c_roomsets.static_rooms() ] dbs = ameasure(agent_list, roomsets, room_time_limit) return dbs
def best_first_depth(count, room_time_limit, seed): """ @param count: number of rooms """ # best first parameters: depths = [10, 80, 150, 250, 400, 1000] heuristic_s = [heuristics.PowerHeuristic2(), heuristics.LinearHeuristic()] # ------------------ Create Agents ------------------ agent_list = [] for h in heuristic_s: for depth in depths: algorithm = AnytimeBestFirstGraphSearch(depth) agent = TestAgent(algorithm, h) agent_list.append(agent) # ---------------- Create Roomsets -------------------- roomsets = [ c_roomsets.easy_roomset(count, seed), c_roomsets.mild_roomset(count, seed), c_roomsets.heavy_roomset(count, seed), ] dbs = ameasure(agent_list, roomsets, room_time_limit) return dbs