From 77cf77a0587e0fdf51f4b7edffac840b9eec6185 Mon Sep 17 00:00:00 2001 From: Erik_L Date: Sun, 24 Mar 2024 05:00:29 -0700 Subject: [PATCH] Cube Solver Implemented --- astar.py | 25 +- beam_search.py | 43 +- cube.py | 5 +- methodology/AStar_Search/AStarList.csv | 44 + methodology/AStar_Search/AStarPQ.csv | 44 + results/AStar/list.txt | 1 - results/AStar/pq.txt | 4 - results/AStar/results.txt | 818 +++++++++++++++ results/Beam_Search/adaptive.txt | 347 +++++++ results/Beam_Search/list.txt | 116 --- results/Beam_Search/pq.txt | 605 ----------- results/Beam_Search/results.txt | 579 +++++++++++ solver.py | 12 + utils/cube_model.py | 36 - utils/cube_utils.py | 122 +++ utils/cube_widget.py | 1329 ++++++++++++++++++++++++ drafts.py => utils/drafts.py | 195 ++-- utils/settings_dialog.py | 179 ++++ utils/text_analysis.py | 387 +++++++ utils/widgets_utils.py | 111 ++ 20 files changed, 4114 insertions(+), 888 deletions(-) create mode 100644 methodology/AStar_Search/AStarList.csv create mode 100644 methodology/AStar_Search/AStarPQ.csv delete mode 100644 results/AStar/list.txt delete mode 100644 results/AStar/pq.txt create mode 100644 results/AStar/results.txt create mode 100644 results/Beam_Search/adaptive.txt delete mode 100644 results/Beam_Search/list.txt delete mode 100644 results/Beam_Search/pq.txt create mode 100644 results/Beam_Search/results.txt create mode 100644 solver.py delete mode 100644 utils/cube_model.py create mode 100644 utils/cube_utils.py create mode 100644 utils/cube_widget.py rename drafts.py => utils/drafts.py (72%) create mode 100644 utils/settings_dialog.py create mode 100644 utils/text_analysis.py create mode 100644 utils/widgets_utils.py diff --git a/astar.py b/astar.py index a731701..405dc33 100644 --- a/astar.py +++ b/astar.py @@ -31,7 +31,7 @@ def astar_search_pq(scrambled_cube : Cube, N, scale_factor = 0.6) -> dict: open_list = PriorityQueue() closed_list = set() - cube_to_node = {} + cube_to_fitness = {} initial_g = 0 initial_f = compute_fitness([scrambled_cube.state])[0] + (scale_factor * initial_g) @@ -39,9 +39,11 @@ def astar_search_pq(scrambled_cube : Cube, N, scale_factor = 0.6) -> dict: open_list.put((start_node.f, start_node)) - cube_to_node[scrambled_cube.__hash__()] = start_node.f + cube_to_fitness[scrambled_cube.__hash__()] = initial_f + iteration = 0 while not open_list.empty(): + best_nodes = [] batch_info = [] batch_states = [] @@ -55,8 +57,8 @@ def astar_search_pq(scrambled_cube : Cube, N, scale_factor = 0.6) -> dict: closed_list.add(current_node.cube) best_nodes.append(current_node) - # print(f"Best Fitness: {best_nodes[0].f}, Best Moves: {best_nodes[0].moves}") - + # print(f"Iteration: {iteration}, Node Explored: {node_explored}, Best F: {best_nodes[0].f}") + # Generate new states for the batch for node in best_nodes: allowed_moves = get_allowed_moves(node.moves) @@ -74,30 +76,27 @@ def astar_search_pq(scrambled_cube : Cube, N, scale_factor = 0.6) -> dict: batch_info.append((tempcube.to_string(), new_moves, node.g , tempcube.__hash__())) del tempcube - + # Convert batch_states to numpy array and compute fitness fitness_scores = compute_fitness(batch_states) - + for ((cube_str, new_moves, g, cube_hash), fitness) in zip(batch_info, fitness_scores): updated_g = g + 1 updated_f = (scale_factor * updated_g) + fitness new_node : Astar_Node = Astar_Node(cube_str, new_moves, updated_g, updated_f) - score = cube_to_node.get(cube_hash) + score = cube_to_fitness.get(cube_hash) if score and score <= new_node.f: continue - cube_to_node[cube_hash] = new_node.f + cube_to_fitness[cube_hash] = new_node.f open_list.put((new_node.f, new_node)) node_explored += 1 - - # print(f"Nodes Explored: {node_explored}") - + iteration += 1 + return {"success" : False, "solutions": None, "num_nodes": node_explored, "time_taken": time.time() - time_start} - - if __name__ == "__main__": from scramble100 import selected_scrambles diff --git a/beam_search.py b/beam_search.py index 277ed42..731c64f 100644 --- a/beam_search.py +++ b/beam_search.py @@ -1,8 +1,7 @@ import time import torch -from cube import Cube, load_model, get_allowed_moves, device +from cube import Cube, load_model, get_allowed_moves, device, Move import numpy as np -from queue import PriorityQueue from collections import namedtuple # import tracemalloc @@ -44,11 +43,10 @@ def generate_new_generation(generation: list[Beam_Node], seen_state): batch_states.append(tempcube.state) batch_info.append((tempcube.to_string(), new_moves)) + nodes_searched += 1 del tempcube - nodes_searched += 1 - fitness_scores = compute_fitness(batch_states) for (cube_str, new_moves), fitness in zip(batch_info, fitness_scores): new_generation.append(Beam_Node(cube_str, new_moves, fitness, False)) @@ -57,7 +55,7 @@ def generate_new_generation(generation: list[Beam_Node], seen_state): new_generation.sort(key=lambda x: x.fitness) return new_generation, nodes_searched, False -def beam_search(scrambled_cube : Cube, beam_width = 1024, max_depth = 100) -> dict: +def beam_search(scrambled_cube : Cube, beam_width = 3000, max_depth = 100, adaptive = False) -> dict: root_fitness = compute_fitness([scrambled_cube.state])[0] root = Beam_Node(scrambled_cube.to_string(), [], root_fitness, scrambled_cube.is_solved()) @@ -77,16 +75,22 @@ def beam_search(scrambled_cube : Cube, beam_width = 1024, max_depth = 100) -> di return {"success" : False, "solutions": None, "num_nodes": node_searched, "time_taken": time.time() - start_time} new_generation, searched_nodes, success = generate_new_generation(generation, seen_state) - + if success: return {"success" : True, "solutions": new_generation[0].moves, "num_nodes": node_searched + searched_nodes, "time_taken": time.time() - start_time} node_searched += searched_nodes - generation = new_generation[: beam_width] + + adaptive_beam_width = beam_width + + if adaptive: + adaptive_beam_width = int(beam_width * (1 + (depth/26))) + + generation = new_generation[: adaptive_beam_width] for node in generation: seen_state.add(node.cube) - + return {"success" : False, "solutions": None, "num_nodes": node_searched, "time_taken": time.time() - start_time} if __name__ == "__main__": @@ -96,33 +100,14 @@ def beam_search(scrambled_cube : Cube, beam_width = 1024, max_depth = 100) -> di total_sol_length = 0 total_nodes = 0 total_time = 0 - - # limit = 39000 - """ - 1024 => - Success Rate: 0.68, Avg Sol Length: 25.235294117647058, Avg Num Nodes: 298359.92647058825, Avg Time Taken: 61.83388700204737 - - 1911 => - Success Rate: 0.85, Avg Sol Length: 25.0, Avg Num Nodes: 541414.0352941176, Avg Time Taken: 116.34260092623093 - - 2048 => - Success Rate: 0.88, Avg Sol Length: 24.59090909090909, Avg Num Nodes: 566032.8863636364, Avg Time Taken: 110.20973552898927 - - 4096 => - Success Rate: 0.98, Avg Sol Length: 24.183673469387756, Avg Num Nodes: 1087275.0204081633, Avg Time Taken: 214.24532394506494 - - Memory Usage: - 3000 => Peak memory usage: 400 ~ 500MB - - """ - + for i, scramble in enumerate(selected_scrambles): print(f"Test {i + 1}") cube = Cube() cube.move_list(cube.convert_move(scramble)) # tracemalloc.start() - result = beam_search(cube, 3000, 100) + result = beam_search(cube, 1000, 100, adaptive = False) # _, max_mem = tracemalloc.get_traced_memory() # print(f"Peak memory usage: {max_mem / 10**6}MB") diff --git a/cube.py b/cube.py index c4e1ef6..74f88d7 100644 --- a/cube.py +++ b/cube.py @@ -238,6 +238,9 @@ def get_allowed_moves(move_sequence): return allowed_moves last_move = get_last_move(move_sequence) + + allowed_moves.remove(inverse_moves[last_move]) + allowed_moves = prevent_moves_pre(move_sequence, last_move, allowed_moves) return allowed_moves @@ -420,7 +423,7 @@ def randomize_n(self, n): scramble_string = "" for move in scramble_move: scramble_string += move_dict[move] + " " - return scramble_string + return scramble_string, scramble_move def from_state(self, state): self.state = state diff --git a/methodology/AStar_Search/AStarList.csv b/methodology/AStar_Search/AStarList.csv new file mode 100644 index 0000000..633cfdd --- /dev/null +++ b/methodology/AStar_Search/AStarList.csv @@ -0,0 +1,44 @@ +Iteration Open List Size Batch Time Prepare Time Compute Time Check Time Total Time + 1 1 1.2874603271484375e-05 0.0007798671722412109 0.003116130828857422 0.00012636184692382812 0.004035234451293945 + 2 12 3.6716461181640625e-05 0.006631135940551758 0.007340192794799805 0.00040793418884277344 0.014415979385375977 + 4 1068 0.004849672317504883 0.671586275100708 0.17975521087646484 0.028857707977294922 0.8850488662719727 + 6 36920 0.23144936561584473 1.690781831741333 0.3628866672515869 0.1231529712677002 2.408270835876465 + 8 93355 0.35564255714416504 1.6938610076904297 0.3495781421661377 0.16141366958618164 2.560495376586914 + 10 149951 0.4654395580291748 1.679875135421753 0.4209473133087158 0.19761109352111816 2.7638731002807617 + 12 206186 0.5880885124206543 1.810049295425415 0.34201478958129883 0.08222842216491699 2.822381019592285 + 14 262281 0.7002136707305908 1.704401969909668 0.3449845314025879 0.08631253242492676 2.8359127044677734 + 16 318469 0.8099842071533203 1.7322185039520264 0.34914731979370117 0.08891177177429199 2.98026180267334 + 18 374667 0.874018669128418 1.7077486515045166 0.33286142349243164 0.08222293853759766 2.996851682662964 + 20 430699 1.591015338897705 1.7348651885986328 0.34294843673706055 0.0897054672241211 3.7585344314575195 + 22 486887 1.267815351486206 1.7408347129821777 0.3266618251800537 0.08802628517150879 3.4233381748199463 + 24 543007 1.8767430782318115 2.129680633544922 0.3870420455932617 0.08708047866821289 4.480546236038208 + 26 598970 1.8500094413757324 1.704484462738037 0.34801268577575684 0.10614800453186035 4.008654594421387 + 28 654998 2.1778852939605713 1.7195298671722412 0.4274563789367676 0.09143400192260742 4.4163055419921875 + 30 710977 2.6661698818206787 1.7319281101226807 0.36532139778137207 0.08448529243469238 4.847904682159424 + 32 767090 2.7307910919189453 1.7268695831298828 0.33415865898132324 0.08444046974182129 4.876259803771973 + 34 823105 2.755009889602661 1.719940423965454 0.32895874977111816 0.08394598960876465 4.887855052947998 + 36 879097 3.0496931076049805 1.6962742805480957 0.3492298126220703 0.08265113830566406 5.1778483390808105 + 38 935259 3.4862442016601562 1.7083566188812256 0.34024882316589355 0.08401823043823242 5.618867874145508 + 40 991280 3.7823922634124756 1.7168302536010742 0.3424086570739746 0.6499359607696533 6.491567134857178 + 42 1047269 4.222656726837158 1.9512357711791992 0.42587947845458984 0.09067320823669434 6.690445184707642 + 44 1103382 4.441939830780029 1.7261991500854492 0.33483099937438965 0.0838630199432373 6.5868330001831055 + 46 1159344 4.22368597984314 2.501943349838257 0.35712575912475586 0.09401965141296387 7.176774740219116 + 48 1215400 5.344472885131836 1.7433505058288574 0.33666539192199707 0.08915400505065918 7.51364278793335 + 50 1271555 4.831951856613159 1.801839828491211 0.33130669593811035 0.08500838279724121 7.050106763839722 + 52 1327598 5.550878524780273 1.9555716514587402 0.42690515518188477 0.09193658828735352 8.025291919708252 + 54 1383648 5.289432048797607 1.7284605503082275 0.34327077865600586 0.08337736129760742 7.444540739059448 + 56 1439596 5.425415515899658 1.7883963584899902 0.35346078872680664 0.0860595703125 7.653332233428955 + 58 1495587 5.465919733047485 1.744382619857788 0.3475301265716553 0.08861994743347168 7.6464524269104 + 60 1551562 6.238528251647949 2.68929386138916 0.35859203338623047 0.0888361930847168 9.375250339508057 + 62 1607606 5.721263647079468 1.7094635963439941 0.35004687309265137 0.08289790153503418 7.8636720180511475 + 64 1663522 6.201148986816406 1.748889684677124 0.39062952995300293 0.08910441398620605 8.42977261543274 + 66 1719528 6.311014413833618 1.7154338359832764 0.34247565269470215 0.09274458885192871 8.461668491363525 + 68 1775441 6.404118776321411 1.6973848342895508 0.34423828125 1.1519861221313477 9.59772801399231 + 70 1831480 6.254588842391968 1.702868938446045 0.326946496963501 0.08402824401855469 8.368432521820068 + 72 1887477 7.120541095733643 1.7344017028808594 0.35193943977355957 0.09241795539855957 9.299300193786621 + 74 1943450 7.556537866592407 1.729332685470581 0.32794189453125 0.08573508262634277 9.699547529220581 + 76 1999451 6.9561333656311035 1.701998233795166 0.3881556987762451 0.08626055717468262 9.132547855377197 + 78 2055427 7.8917248249053955 1.7277023792266846 0.3438091278076172 1.4330663681030273 11.396302700042725 + 80 2111411 8.134589433670044 1.7268273830413818 0.41082048416137695 0.0859825611114502 10.358219861984253 + 82 2167337 8.918860912322998 1.7884159088134766 0.3848295211791992 0.08690881729125977 11.179015159606934 + 84 2223355 8.215734004974365 1.7715024948120117 0.48146963119506836 0.08950567245483398 10.55821180343628 diff --git a/methodology/AStar_Search/AStarPQ.csv b/methodology/AStar_Search/AStarPQ.csv new file mode 100644 index 0000000..18d58ad --- /dev/null +++ b/methodology/AStar_Search/AStarPQ.csv @@ -0,0 +1,44 @@ +Iteration Open List Size Batch Time Prepare Time Compute Time Check Time Total Time + 1 1 1.4543533325195312e-05 0.0006577968597412109 0.0029854774475097656 0.0001728534698486328 0.0038306713104248047 + 2 12 6.270408630371094e-05 0.006512880325317383 0.008498430252075195 0.0007536411285400391 0.015827655792236328 + 4 1068 0.01098775863647461 0.5886592864990234 0.17676091194152832 0.05528545379638672 0.8316934108734131 + 6 36920 0.06346869468688965 1.6688730716705322 0.3532249927520752 0.282928466796875 2.368495225906372 + 8 93355 0.07506108283996582 1.6437509059906006 0.33255577087402344 0.2939894199371338 2.3453571796417236 + 10 149951 0.07393789291381836 1.6431255340576172 0.35981154441833496 0.3134441375732422 2.3903191089630127 + 12 206186 0.09162473678588867 1.652564287185669 0.3479773998260498 0.19261956214904785 2.2847859859466553 + 14 262281 0.08398222923278809 1.7684094905853271 0.38457274436950684 0.20315885543823242 2.4401233196258545 + 16 318469 0.08505535125732422 1.6894094944000244 0.33210158348083496 0.1952831745147705 2.301849603652954 + 18 374667 0.09103560447692871 1.6891100406646729 0.43180394172668457 0.19951701164245605 2.411466598510742 + 20 430699 0.10103607177734375 1.729729175567627 0.3332352638244629 0.19923162460327148 2.363232135772705 + 22 486887 0.08878374099731445 2.0097827911376953 0.351548433303833 0.20556330680847168 2.6556782722473145 + 24 543016 0.09002208709716797 1.658433437347412 0.3463871479034424 0.22341394424438477 2.3182566165924072 + 26 598979 0.08973050117492676 1.6630170345306396 0.33231329917907715 0.1962888240814209 2.2813496589660645 + 28 655006 0.09130644798278809 1.6684367656707764 0.32857275009155273 0.6771993637084961 2.7655153274536133 + 30 711004 0.09205460548400879 1.678187370300293 0.3336818218231201 0.20012259483337402 2.304046392440796 + 32 767120 0.09268641471862793 1.6579351425170898 0.3325307369232178 0.19735097885131836 2.280503273010254 + 34 823135 0.0906982421875 1.6746482849121094 0.3481414318084717 0.19676733016967773 2.310255289077759 + 36 879124 0.09564042091369629 1.6633961200714111 0.3402431011199951 0.19683480262756348 2.296114444732666 + 38 935295 0.09408926963806152 2.3405728340148926 0.33390307426452637 0.2084958553314209 2.9770610332489014 + 40 991319 0.09325885772705078 1.6671440601348877 0.3332197666168213 0.19899463653564453 2.2926173210144043 + 42 1047308 0.09372830390930176 1.6509134769439697 0.35041213035583496 0.19898056983947754 2.294034481048584 + 44 1103417 0.09229469299316406 1.6651053428649902 0.3487377166748047 0.19862747192382812 2.304765224456787 + 46 1159383 0.09582829475402832 1.8120007514953613 0.4192647933959961 0.20562529563903809 2.532719135284424 + 48 1215440 0.09512853622436523 1.689972162246704 0.3664722442626953 0.2034749984741211 2.3550479412078857 + 50 1271594 0.09981989860534668 1.6943016052246094 0.42040038108825684 1.1418194770812988 3.3563413619995117 + 52 1327638 0.1006019115447998 1.6611344814300537 0.3500030040740967 0.1996016502380371 2.3113410472869873 + 54 1383684 0.09488344192504883 1.6533443927764893 0.359677791595459 0.19826817512512207 2.306173801422119 + 56 1439635 0.10381960868835449 1.6861624717712402 0.3618605136871338 0.22175097465515137 2.37359356880188 + 58 1495624 0.0975644588470459 1.6814050674438477 0.3454618453979492 1.3409852981567383 3.465416669845581 + 60 1551600 0.09600567817687988 1.6592497825622559 0.34392714500427246 0.20180487632751465 2.300987482070923 + 62 1607654 0.09742522239685059 1.690631628036499 0.357022762298584 0.20169377326965332 2.346773386001587 + 64 1663569 0.09876847267150879 1.6715137958526611 0.34674525260925293 0.20252323150634766 2.3195507526397705 + 66 1719572 0.09837746620178223 1.6722192764282227 0.3562045097351074 0.20132112503051758 2.32812237739563 + 68 1775485 0.09799981117248535 1.6804049015045166 0.3349905014038086 0.20202898979187012 2.3154242038726807 + 70 1831529 0.09859490394592285 1.7130811214447021 0.423480749130249 0.20534300804138184 2.440499782562256 + 72 1887536 0.10100364685058594 1.6683061122894287 0.3361082077026367 0.20173382759094238 2.3071517944335938 + 74 1943508 0.09908914566040039 1.667468786239624 0.3513200283050537 0.1995697021484375 2.3174476623535156 + 76 1999506 0.10095000267028809 1.679269790649414 0.3563113212585449 0.20444917678833008 2.340980291366577 + 78 2055485 0.10066890716552734 3.359379291534424 0.3349740505218506 0.1998903751373291 3.994912624359131 + 80 2111470 0.10191869735717773 1.671790599822998 0.43301939964294434 0.21356487274169922 2.4202935695648193 + 82 2167394 0.10184025764465332 1.6666595935821533 0.3399839401245117 0.20217442512512207 2.3106582164764404 + 84 2223412 0.10227036476135254 1.6812617778778076 0.334200382232666 0.2029426097869873 2.3206751346588135 diff --git a/results/AStar/list.txt b/results/AStar/list.txt deleted file mode 100644 index 0105a50..0000000 --- a/results/AStar/list.txt +++ /dev/null @@ -1 +0,0 @@ -0.6 3000 (RTX 2060) diff --git a/results/AStar/pq.txt b/results/AStar/pq.txt deleted file mode 100644 index ff2c3e1..0000000 --- a/results/AStar/pq.txt +++ /dev/null @@ -1,4 +0,0 @@ -0.6 3000 (RTX 2060) - - -0.6 10000 (RTX 3090) \ No newline at end of file diff --git a/results/AStar/results.txt b/results/AStar/results.txt new file mode 100644 index 0000000..d4e119b --- /dev/null +++ b/results/AStar/results.txt @@ -0,0 +1,818 @@ +0.2 3000 (RTX 2060) +Test 1 +Success: 1, Sol Length: 24, Num Nodes: 595725, Time Taken: 49.210636615753174, Check: True +Test 2 +Success: 2, Sol Length: 24, Num Nodes: 596107, Time Taken: 47.872358560562134, Check: True +Test 3 +Success: 3, Sol Length: 24, Num Nodes: 596165, Time Taken: 48.03159165382385, Check: True +Test 4 +Success: 4, Sol Length: 23, Num Nodes: 564236, Time Taken: 44.56811285018921, Check: True +Test 5 +Success: 5, Sol Length: 20, Num Nodes: 472846, Time Taken: 38.00411653518677, Check: True +Test 6 +Success: 6, Sol Length: 23, Num Nodes: 565312, Time Taken: 44.43145155906677, Check: True +Test 7 +Success: 7, Sol Length: 24, Num Nodes: 596352, Time Taken: 48.04544949531555, Check: True +Test 8 +Success: 8, Sol Length: 22, Num Nodes: 535305, Time Taken: 42.761945486068726, Check: True +Test 9 +Success: 9, Sol Length: 23, Num Nodes: 565499, Time Taken: 44.91258788108826, Check: True +Test 10 +Success: 10, Sol Length: 26, Num Nodes: 658583, Time Taken: 52.6117377281189, Check: True +Test 11 +Success: 11, Sol Length: 20, Num Nodes: 472201, Time Taken: 37.49414944648743, Check: True +Test 12 +Success: 12, Sol Length: 26, Num Nodes: 657330, Time Taken: 52.55101490020752, Check: True +Test 13 +Success: 13, Sol Length: 24, Num Nodes: 595504, Time Taken: 47.27788257598877, Check: True +Test 14 +Success: 14, Sol Length: 25, Num Nodes: 626951, Time Taken: 50.127707719802856, Check: True +Test 15 +Success: 15, Sol Length: 22, Num Nodes: 532753, Time Taken: 42.584322929382324, Check: True +Test 16 +Success: 16, Sol Length: 22, Num Nodes: 533082, Time Taken: 42.28865909576416, Check: True +Test 17 +Success: 17, Sol Length: 26, Num Nodes: 656868, Time Taken: 52.63308548927307, Check: True +Test 18 +Success: 18, Sol Length: 23, Num Nodes: 565049, Time Taken: 45.02819633483887, Check: True +Test 19 +Success: 19, Sol Length: 21, Num Nodes: 503921, Time Taken: 40.359578132629395, Check: True +Test 20 +Success: 20, Sol Length: 23, Num Nodes: 564995, Time Taken: 45.10300660133362, Check: True +Test 21 +Success: 21, Sol Length: 23, Num Nodes: 566125, Time Taken: 45.12605023384094, Check: True +Test 22 +Success: 22, Sol Length: 23, Num Nodes: 565329, Time Taken: 44.99783658981323, Check: True +Test 23 +Success: 23, Sol Length: 24, Num Nodes: 596165, Time Taken: 47.755757093429565, Check: True +Test 24 +Success: 24, Sol Length: 25, Num Nodes: 626795, Time Taken: 49.68552780151367, Check: True +Test 25 +Success: 25, Sol Length: 22, Num Nodes: 534338, Time Taken: 42.42151761054993, Check: True +Test 26 +Success: 26, Sol Length: 24, Num Nodes: 594946, Time Taken: 47.713812828063965, Check: True +Test 27 +Success: 27, Sol Length: 24, Num Nodes: 591922, Time Taken: 47.54754710197449, Check: True +Test 28 +Success: 28, Sol Length: 23, Num Nodes: 565810, Time Taken: 44.84437918663025, Check: True +Test 29 +Success: 29, Sol Length: 23, Num Nodes: 564599, Time Taken: 45.38255858421326, Check: True +Test 30 +Success: 30, Sol Length: 24, Num Nodes: 595395, Time Taken: 46.97152233123779, Check: True +Test 31 +Success: 31, Sol Length: 25, Num Nodes: 627453, Time Taken: 49.77735757827759, Check: True +Test 32 +Success: 32, Sol Length: 23, Num Nodes: 566157, Time Taken: 45.12846255302429, Check: True +Test 33 +Success: 33, Sol Length: 23, Num Nodes: 564503, Time Taken: 44.681143045425415, Check: True +Test 34 +Success: 34, Sol Length: 20, Num Nodes: 473430, Time Taken: 37.592568159103394, Check: True +Test 35 +Success: 35, Sol Length: 22, Num Nodes: 531686, Time Taken: 42.29419231414795, Check: True +Test 36 +Success: 36, Sol Length: 25, Num Nodes: 627465, Time Taken: 50.037092208862305, Check: True +Test 37 +Success: 37, Sol Length: 24, Num Nodes: 596501, Time Taken: 47.07396197319031, Check: True +Test 38 +Success: 38, Sol Length: 25, Num Nodes: 625810, Time Taken: 49.55501961708069, Check: True +Test 39 +Success: 39, Sol Length: 24, Num Nodes: 596165, Time Taken: 47.08980965614319, Check: True +Test 40 +Success: 40, Sol Length: 27, Num Nodes: 687447, Time Taken: 54.99706530570984, Check: True +Test 41 +Success: 41, Sol Length: 23, Num Nodes: 566006, Time Taken: 44.566197633743286, Check: True +Test 42 +Success: 42, Sol Length: 22, Num Nodes: 531178, Time Taken: 42.21716046333313, Check: True +Test 43 +Success: 43, Sol Length: 26, Num Nodes: 659274, Time Taken: 52.28715777397156, Check: True +Test 44 +Success: 44, Sol Length: 19, Num Nodes: 440398, Time Taken: 35.07123517990112, Check: True +Test 45 +Success: 45, Sol Length: 22, Num Nodes: 534226, Time Taken: 42.474971294403076, Check: True +Test 46 +Success: 46, Sol Length: 26, Num Nodes: 659473, Time Taken: 51.82436490058899, Check: True +Test 47 +Success: 47, Sol Length: 23, Num Nodes: 563075, Time Taken: 44.66767358779907, Check: True +Test 48 +Success: 48, Sol Length: 21, Num Nodes: 504020, Time Taken: 40.088716983795166, Check: True +Test 49 +Success: 49, Sol Length: 20, Num Nodes: 472896, Time Taken: 37.91185641288757, Check: True +Test 50 +Success: 50, Sol Length: 22, Num Nodes: 535101, Time Taken: 42.57687544822693, Check: True +Test 51 +Success: 51, Sol Length: 23, Num Nodes: 565671, Time Taken: 45.82513666152954, Check: True +Test 52 +Success: 52, Sol Length: 23, Num Nodes: 565446, Time Taken: 47.23107409477234, Check: True +Test 53 +Success: 53, Sol Length: 24, Num Nodes: 596396, Time Taken: 48.62981820106506, Check: True +Test 54 +Success: 54, Sol Length: 24, Num Nodes: 596504, Time Taken: 47.58890748023987, Check: True +Test 55 +Success: 55, Sol Length: 23, Num Nodes: 566005, Time Taken: 45.76999759674072, Check: True +Test 56 +Success: 56, Sol Length: 24, Num Nodes: 595496, Time Taken: 49.19694757461548, Check: True +Test 57 +Success: 57, Sol Length: 25, Num Nodes: 627001, Time Taken: 49.858494997024536, Check: True +Test 58 +Success: 58, Sol Length: 23, Num Nodes: 565509, Time Taken: 45.1061372756958, Check: True +Test 59 +Success: 59, Sol Length: 22, Num Nodes: 533123, Time Taken: 42.47499966621399, Check: True +Test 60 +Success: 60, Sol Length: 25, Num Nodes: 625594, Time Taken: 53.615626096725464, Check: True +Test 61 +Success: 61, Sol Length: 22, Num Nodes: 533762, Time Taken: 44.02671551704407, Check: True +Test 62 +Success: 62, Sol Length: 24, Num Nodes: 594782, Time Taken: 49.18489098548889, Check: True +Test 63 +Success: 63, Sol Length: 19, Num Nodes: 440726, Time Taken: 35.686355113983154, Check: True +Test 64 +Success: 64, Sol Length: 24, Num Nodes: 595395, Time Taken: 49.03306746482849, Check: True +Test 65 +Success: 65, Sol Length: 22, Num Nodes: 536005, Time Taken: 42.06157684326172, Check: True +Test 66 +Success: 66, Sol Length: 24, Num Nodes: 596574, Time Taken: 47.26136112213135, Check: True +Test 67 +Success: 67, Sol Length: 23, Num Nodes: 565312, Time Taken: 44.65460205078125, Check: True +Test 68 +Success: 68, Sol Length: 23, Num Nodes: 564627, Time Taken: 45.398155212402344, Check: True +Test 69 +Success: 69, Sol Length: 23, Num Nodes: 564415, Time Taken: 46.45763301849365, Check: True +Test 70 +Success: 70, Sol Length: 24, Num Nodes: 595297, Time Taken: 47.98496985435486, Check: True +Test 71 +Success: 71, Sol Length: 24, Num Nodes: 596135, Time Taken: 47.50831151008606, Check: True +Test 72 +Success: 72, Sol Length: 23, Num Nodes: 564835, Time Taken: 45.27605152130127, Check: True +Test 73 +Success: 73, Sol Length: 25, Num Nodes: 628171, Time Taken: 49.7583065032959, Check: True +Test 74 +Success: 74, Sol Length: 23, Num Nodes: 564121, Time Taken: 45.04454231262207, Check: True +Test 75 +Success: 75, Sol Length: 20, Num Nodes: 472896, Time Taken: 37.62457776069641, Check: True +Test 76 +Success: 76, Sol Length: 24, Num Nodes: 595885, Time Taken: 47.70147180557251, Check: True +Test 77 +Success: 77, Sol Length: 20, Num Nodes: 472486, Time Taken: 37.331421852111816, Check: True +Test 78 +Success: 78, Sol Length: 22, Num Nodes: 534476, Time Taken: 42.479182720184326, Check: True +Test 79 +Success: 79, Sol Length: 23, Num Nodes: 565542, Time Taken: 45.14696645736694, Check: True +Test 80 +Success: 80, Sol Length: 25, Num Nodes: 627148, Time Taken: 49.90518307685852, Check: True +Test 81 +Success: 81, Sol Length: 24, Num Nodes: 597128, Time Taken: 48.30561661720276, Check: True +Test 82 +Success: 82, Sol Length: 24, Num Nodes: 594064, Time Taken: 48.426671743392944, Check: True +Test 83 +Success: 83, Sol Length: 21, Num Nodes: 505147, Time Taken: 40.6256000995636, Check: True +Test 84 +Success: 84, Sol Length: 24, Num Nodes: 594983, Time Taken: 47.64544939994812, Check: True +Test 85 +Success: 85, Sol Length: 21, Num Nodes: 502657, Time Taken: 40.1708550453186, Check: True +Test 86 +Success: 86, Sol Length: 22, Num Nodes: 534434, Time Taken: 42.797064781188965, Check: True +Test 87 +Success: 87, Sol Length: 23, Num Nodes: 565738, Time Taken: 44.9080593585968, Check: True +Test 88 +Success: 88, Sol Length: 25, Num Nodes: 626816, Time Taken: 49.49752902984619, Check: True +Test 89 +Success: 89, Sol Length: 26, Num Nodes: 658560, Time Taken: 52.12889766693115, Check: True +Test 90 +Success: 90, Sol Length: 25, Num Nodes: 626684, Time Taken: 49.59551405906677, Check: True +Test 91 +Success: 91, Sol Length: 21, Num Nodes: 503576, Time Taken: 39.80097484588623, Check: True +Test 92 +Success: 92, Sol Length: 22, Num Nodes: 535405, Time Taken: 44.451600790023804, Check: True +Test 93 +Success: 93, Sol Length: 23, Num Nodes: 564858, Time Taken: 46.01241135597229, Check: True +Test 94 +Success: 94, Sol Length: 23, Num Nodes: 565607, Time Taken: 47.038286447525024, Check: True +Test 95 +Success: 95, Sol Length: 25, Num Nodes: 626913, Time Taken: 50.049341678619385, Check: True +Test 96 +Success: 96, Sol Length: 21, Num Nodes: 503923, Time Taken: 40.78283953666687, Check: True +Test 97 +Success: 97, Sol Length: 27, Num Nodes: 687620, Time Taken: 54.20983910560608, Check: True +Test 98 +Success: 98, Sol Length: 23, Num Nodes: 562497, Time Taken: 45.06799006462097, Check: True +Test 99 +Success: 99, Sol Length: 24, Num Nodes: 594899, Time Taken: 47.705193281173706, Check: True +Test 100 +Success: 100, Sol Length: 22, Num Nodes: 534226, Time Taken: 41.7273907661438, Check: True +Success Rate: 1.0, Avg Sol Length: 23.21, Avg Num Nodes: 571495.42, Avg Time Taken: 45.760265910625456 + +0.4 3000 (RTX 2060) +Test 1 +Success: 1, Sol Length: 24, Num Nodes: 660498, Time Taken: 54.12089920043945, Check: True +Test 2 +Success: 2, Sol Length: 22, Num Nodes: 937702, Time Taken: 73.62849926948547, Check: True +Test 3 +Success: 3, Sol Length: 24, Num Nodes: 1060969, Time Taken: 83.61738991737366, Check: True +Test 4 +Success: 4, Sol Length: 23, Num Nodes: 566962, Time Taken: 44.369248151779175, Check: True +Test 5 +Success: 5, Sol Length: 20, Num Nodes: 474603, Time Taken: 37.08611083030701, Check: True +Test 6 +Success: 6, Sol Length: 23, Num Nodes: 999178, Time Taken: 79.14424562454224, Check: True +Test 7 +Success: 7, Sol Length: 24, Num Nodes: 1122649, Time Taken: 89.63903427124023, Check: True +Test 8 +Success: 8, Sol Length: 22, Num Nodes: 536666, Time Taken: 41.893670320510864, Check: True +Test 9 +Success: 9, Sol Length: 23, Num Nodes: 567685, Time Taken: 44.48940587043762, Check: True +Test 10 +Success: 10, Sol Length: 24, Num Nodes: 1031922, Time Taken: 81.5141851902008, Check: True +Test 11 +Success: 11, Sol Length: 20, Num Nodes: 473936, Time Taken: 37.067662477493286, Check: True +Test 12 +Success: 12, Sol Length: 22, Num Nodes: 1000090, Time Taken: 79.46892881393433, Check: True +Test 13 +Success: 13, Sol Length: 24, Num Nodes: 598360, Time Taken: 46.66888380050659, Check: True +Test 14 +Success: 14, Sol Length: 23, Num Nodes: 1340353, Time Taken: 106.42452025413513, Check: True +Test 15 +Success: 15, Sol Length: 22, Num Nodes: 534729, Time Taken: 41.687095642089844, Check: True +Test 16 +Success: 16, Sol Length: 22, Num Nodes: 535702, Time Taken: 42.11336946487427, Check: True +Test 17 +Success: 17, Sol Length: 24, Num Nodes: 2113431, Time Taken: 169.0809075832367, Check: True +Test 18 +Success: 18, Sol Length: 25, Num Nodes: 629016, Time Taken: 48.79085946083069, Check: True +Test 19 +Success: 19, Sol Length: 21, Num Nodes: 505252, Time Taken: 39.656397104263306, Check: True +Test 20 +Success: 20, Sol Length: 23, Num Nodes: 567385, Time Taken: 44.90597081184387, Check: True +Test 21 +Success: 21, Sol Length: 23, Num Nodes: 567768, Time Taken: 45.06006836891174, Check: True +Test 22 +Success: 22, Sol Length: 23, Num Nodes: 628822, Time Taken: 49.60889410972595, Check: True +Test 23 +Success: 23, Sol Length: 24, Num Nodes: 1060969, Time Taken: 84.58350348472595, Check: True +Test 24 +Success: 24, Sol Length: 25, Num Nodes: 630269, Time Taken: 49.00762963294983, Check: True +Test 25 +Success: 25, Sol Length: 22, Num Nodes: 535546, Time Taken: 42.12762928009033, Check: True +Test 26 +Success: 26, Sol Length: 24, Num Nodes: 813729, Time Taken: 65.05494856834412, Check: True +Test 27 +Success: 27, Sol Length: 24, Num Nodes: 597562, Time Taken: 47.34687161445618, Check: True +Test 28 +Success: 28, Sol Length: 23, Num Nodes: 598718, Time Taken: 46.90085530281067, Check: True +Test 29 +Success: 29, Sol Length: 23, Num Nodes: 567098, Time Taken: 44.670305252075195, Check: True +Test 30 +Success: 30, Sol Length: 24, Num Nodes: 598281, Time Taken: 46.731491565704346, Check: True +Test 31 +Success: 31, Sol Length: 23, Num Nodes: 690854, Time Taken: 54.657867670059204, Check: True +Test 32 +Success: 32, Sol Length: 23, Num Nodes: 1093689, Time Taken: 86.68444037437439, Check: True +Test 33 +Success: 33, Sol Length: 23, Num Nodes: 689622, Time Taken: 54.20060873031616, Check: True +Test 34 +Success: 34, Sol Length: 20, Num Nodes: 474243, Time Taken: 36.84357023239136, Check: True +Test 35 +Success: 35, Sol Length: 22, Num Nodes: 532755, Time Taken: 42.096452474594116, Check: True +Test 36 +Success: 36, Sol Length: 21, Num Nodes: 690800, Time Taken: 54.54479765892029, Check: True +Test 37 +Success: 37, Sol Length: 26, Num Nodes: 1278973, Time Taken: 102.33612489700317, Check: True +Test 38 +Success: 38, Sol Length: 23, Num Nodes: 1771581, Time Taken: 140.1381630897522, Check: True +Test 39 +Success: 39, Sol Length: 24, Num Nodes: 1060969, Time Taken: 83.85617780685425, Check: True +Test 40 +Success: 40, Sol Length: 23, Num Nodes: 1338879, Time Taken: 106.28257393836975, Check: True +Test 41 +Success: 41, Sol Length: 23, Num Nodes: 567236, Time Taken: 43.99735713005066, Check: True +Test 42 +Success: 42, Sol Length: 22, Num Nodes: 534023, Time Taken: 42.07599663734436, Check: True +Test 43 +Success: 43, Sol Length: 24, Num Nodes: 1093144, Time Taken: 86.4551408290863, Check: True +Test 44 +Success: 44, Sol Length: 19, Num Nodes: 441411, Time Taken: 34.571250200271606, Check: True +Test 45 +Success: 45, Sol Length: 22, Num Nodes: 1860354, Time Taken: 148.50114679336548, Check: True +Test 46 +Success: 46, Sol Length: 24, Num Nodes: 1340760, Time Taken: 105.56573414802551, Check: True +Test 47 +Success: 47, Sol Length: 23, Num Nodes: 567232, Time Taken: 44.25568771362305, Check: True +Test 48 +Success: 48, Sol Length: 21, Num Nodes: 505662, Time Taken: 39.83819317817688, Check: True +Test 49 +Success: 49, Sol Length: 20, Num Nodes: 474178, Time Taken: 37.11998438835144, Check: True +Test 50 +Success: 50, Sol Length: 22, Num Nodes: 536685, Time Taken: 41.98147249221802, Check: True +Test 51 +Success: 51, Sol Length: 25, Num Nodes: 969220, Time Taken: 76.94552826881409, Check: True +Test 52 +Success: 52, Sol Length: 23, Num Nodes: 598267, Time Taken: 46.78448700904846, Check: True +Test 53 +Success: 53, Sol Length: 24, Num Nodes: 1000562, Time Taken: 79.1023907661438, Check: True +Test 54 +Success: 54, Sol Length: 24, Num Nodes: 1402662, Time Taken: 111.3119592666626, Check: True +Test 55 +Success: 55, Sol Length: 23, Num Nodes: 568098, Time Taken: 44.325891733169556, Check: True +Test 56 +Success: 56, Sol Length: 22, Num Nodes: 721120, Time Taken: 56.731507778167725, Check: True +Test 57 +Success: 57, Sol Length: 23, Num Nodes: 1370935, Time Taken: 108.44797468185425, Check: True +Test 58 +Success: 58, Sol Length: 23, Num Nodes: 567543, Time Taken: 44.167707204818726, Check: True +Test 59 +Success: 59, Sol Length: 22, Num Nodes: 536085, Time Taken: 42.28696155548096, Check: True +Test 60 +Success: 60, Sol Length: 25, Num Nodes: 1924105, Time Taken: 153.52097487449646, Check: True +Test 61 +Success: 61, Sol Length: 22, Num Nodes: 536044, Time Taken: 41.599409103393555, Check: True +Test 62 +Success: 62, Sol Length: 20, Num Nodes: 811079, Time Taken: 64.23910236358643, Check: True +Test 63 +Success: 63, Sol Length: 19, Num Nodes: 442452, Time Taken: 34.34903836250305, Check: True +Test 64 +Success: 64, Sol Length: 24, Num Nodes: 598281, Time Taken: 47.14922571182251, Check: True +Test 65 +Success: 65, Sol Length: 22, Num Nodes: 537115, Time Taken: 42.1269326210022, Check: True +Test 66 +Success: 66, Sol Length: 24, Num Nodes: 2111575, Time Taken: 169.11847758293152, Check: True +Test 67 +Success: 67, Sol Length: 23, Num Nodes: 999178, Time Taken: 78.9625563621521, Check: True +Test 68 +Success: 68, Sol Length: 23, Num Nodes: 721666, Time Taken: 57.336601972579956, Check: True +Test 69 +Success: 69, Sol Length: 23, Num Nodes: 597279, Time Taken: 47.015387773513794, Check: True +Test 70 +Success: 70, Sol Length: 22, Num Nodes: 1153453, Time Taken: 91.31060338020325, Check: True +Test 71 +Success: 71, Sol Length: 22, Num Nodes: 1555521, Time Taken: 124.09703087806702, Check: True +Test 72 +Success: 72, Sol Length: 21, Num Nodes: 567140, Time Taken: 44.33828353881836, Check: True +Test 73 +Success: 73, Sol Length: 25, Num Nodes: 908226, Time Taken: 71.58730244636536, Check: True +Test 74 +Success: 74, Sol Length: 23, Num Nodes: 690421, Time Taken: 54.50957751274109, Check: True +Test 75 +Success: 75, Sol Length: 20, Num Nodes: 474178, Time Taken: 37.5956072807312, Check: True +Test 76 +Success: 76, Sol Length: 20, Num Nodes: 628049, Time Taken: 49.59389328956604, Check: True +Test 77 +Success: 77, Sol Length: 20, Num Nodes: 474241, Time Taken: 37.38047456741333, Check: True +Test 78 +Success: 78, Sol Length: 22, Num Nodes: 535771, Time Taken: 42.18041968345642, Check: True +Test 79 +Success: 79, Sol Length: 23, Num Nodes: 567563, Time Taken: 44.68664813041687, Check: True +Test 80 +Success: 80, Sol Length: 23, Num Nodes: 783983, Time Taken: 61.90141701698303, Check: True +Test 81 +Success: 81, Sol Length: 24, Num Nodes: 722365, Time Taken: 56.71852517127991, Check: True +Test 82 +Success: 82, Sol Length: 24, Num Nodes: 598408, Time Taken: 47.219929933547974, Check: True +Test 83 +Success: 83, Sol Length: 21, Num Nodes: 506580, Time Taken: 39.7405047416687, Check: True +Test 84 +Success: 84, Sol Length: 24, Num Nodes: 1491492, Time Taken: 118.75642395019531, Check: True +Test 85 +Success: 85, Sol Length: 21, Num Nodes: 504648, Time Taken: 39.60441732406616, Check: True +Test 86 +Success: 86, Sol Length: 22, Num Nodes: 1061232, Time Taken: 83.97428917884827, Check: True +Test 87 +Success: 87, Sol Length: 23, Num Nodes: 568177, Time Taken: 44.739372968673706, Check: True +Test 88 +Success: 88, Sol Length: 25, Num Nodes: 2359778, Time Taken: 188.51980638504028, Check: True +Test 89 +Success: 89, Sol Length: 24, Num Nodes: 876784, Time Taken: 69.71576380729675, Check: True +Test 90 +Success: 90, Sol Length: 25, Num Nodes: 1000951, Time Taken: 78.63369154930115, Check: True +Test 91 +Success: 91, Sol Length: 21, Num Nodes: 505360, Time Taken: 39.62428641319275, Check: True +Test 92 +Success: 92, Sol Length: 22, Num Nodes: 537061, Time Taken: 42.49862790107727, Check: True +Test 93 +Success: 93, Sol Length: 23, Num Nodes: 567860, Time Taken: 44.65195393562317, Check: True +Test 94 +Success: 94, Sol Length: 23, Num Nodes: 813310, Time Taken: 64.00000238418579, Check: True +Test 95 +Success: 95, Sol Length: 25, Num Nodes: 2574233, Time Taken: 206.6214382648468, Check: True +Test 96 +Success: 96, Sol Length: 21, Num Nodes: 536800, Time Taken: 41.49776911735535, Check: True +Test 97 +Success: 97, Sol Length: 21, Num Nodes: 997420, Time Taken: 79.0131151676178, Check: True +Test 98 +Success: 98, Sol Length: 23, Num Nodes: 689690, Time Taken: 54.53061389923096, Check: True +Test 99 +Success: 99, Sol Length: 22, Num Nodes: 845277, Time Taken: 66.82950854301453, Check: True +Test 100 +Success: 100, Sol Length: 22, Num Nodes: 1860354, Time Taken: 148.33685898780823, Check: True +Success Rate: 1.0, Avg Sol Length: 22.69, Avg Num Nodes: 853684.92, Avg Time Taken: 67.52392493963242 + +0.5 3000 (RTX 2060) +Test 1 +Success: 1, Sol Length: 22, Num Nodes: 2026038, Time Taken: 164.83457207679749, Check: True +Test 2 +Success: 2, Sol Length: 22, Num Nodes: 1559134, Time Taken: 124.6903989315033, Check: True +Test 3 +Success: 3, Sol Length: 20, Num Nodes: 1931741, Time Taken: 156.7997329235077, Check: True +Test 4 +Success: 4, Sol Length: 23, Num Nodes: 1713197, Time Taken: 139.0677535533905, Check: True +Test 5 +Success: 5, Sol Length: 20, Num Nodes: 475440, Time Taken: 37.590252161026, Check: True +Test 6 +Success: 6, Sol Length: 23, Num Nodes: 2177601, Time Taken: 176.36510133743286, Check: True +Test 7 +Success: 7, Sol Length: 22, Num Nodes: 1897860, Time Taken: 151.65577125549316, Check: True +Test 8 +Success: 8, Sol Length: 22, Num Nodes: 538020, Time Taken: 43.23785901069641, Check: True +Test 9 +Success: 9, Sol Length: 23, Num Nodes: 2398120, Time Taken: 195.13632488250732, Check: True +Test 10 +Success: 10, Sol Length: 22, Num Nodes: 786840, Time Taken: 62.10068702697754, Check: True +Test 11 +Success: 11, Sol Length: 20, Num Nodes: 474899, Time Taken: 37.80392575263977, Check: True +Test 12 +Success: 12, Sol Length: 22, Num Nodes: 2924409, Time Taken: 238.1468620300293, Check: True +Test 13 +Success: 13, Sol Length: 24, Num Nodes: 2335999, Time Taken: 189.10819745063782, Check: True +Test 14 +Success: 14, Sol Length: 23, Num Nodes: 847898, Time Taken: 66.97019100189209, Check: True +Test 15 +Success: 15, Sol Length: 22, Num Nodes: 1862186, Time Taken: 150.99890613555908, Check: True +Test 16 +Success: 16, Sol Length: 22, Num Nodes: 1124692, Time Taken: 89.59213614463806, Check: True +Test 17 +Success: 17, Sol Length: 24, Num Nodes: 19824913, Time Taken: 1657.6651623249054, Check: True +Test 18 +Success: 18, Sol Length: 23, Num Nodes: 3017017, Time Taken: 232.5558204650879, Check: True +Test 19 +Success: 19, Sol Length: 21, Num Nodes: 506105, Time Taken: 40.41170287132263, Check: True +Test 20 +Success: 20, Sol Length: 23, Num Nodes: 1188591, Time Taken: 95.86321091651917, Check: True +Test 21 +Success: 21, Sol Length: 23, Num Nodes: 847573, Time Taken: 67.51679921150208, Check: True +Test 22 +Success: 22, Sol Length: 21, Num Nodes: 1157054, Time Taken: 92.85322213172913, Check: True +Test 23 +Success: 23, Sol Length: 20, Num Nodes: 1931741, Time Taken: 156.10313963890076, Check: True +Test 24 +Success: 24, Sol Length: 21, Num Nodes: 1313742, Time Taken: 105.76844120025635, Check: True +Test 25 +Success: 25, Sol Length: 22, Num Nodes: 1031626, Time Taken: 82.18596649169922, Check: True +Test 26 +Success: 26, Sol Length: 22, Num Nodes: 1123974, Time Taken: 90.84213089942932, Check: True +Test 27 +Success: 27, Sol Length: 22, Num Nodes: 3695253, Time Taken: 299.8226475715637, Check: True +Test 28 +Success: 28, Sol Length: 21, Num Nodes: 724470, Time Taken: 57.07584309577942, Check: True +Test 29 +Success: 29, Sol Length: 21, Num Nodes: 847304, Time Taken: 67.96141791343689, Check: True +Test 30 +Success: 30, Sol Length: 24, Num Nodes: 6142564, Time Taken: 501.936861038208, Check: True +Test 31 +Success: 31, Sol Length: 23, Num Nodes: 1807417, Time Taken: 143.64135336875916, Check: True +Test 32 +Success: 32, Sol Length: 23, Num Nodes: 3636492, Time Taken: 295.63919377326965, Check: True +Test 33 +Success: 33, Sol Length: 23, Num Nodes: 938833, Time Taken: 73.76608228683472, Check: True +Test 34 +Success: 34, Sol Length: 20, Num Nodes: 475230, Time Taken: 37.40741991996765, Check: True +Test 35 +Success: 35, Sol Length: 20, Num Nodes: 1086315, Time Taken: 87.42650771141052, Check: True +Test 36 +Success: 36, Sol Length: 21, Num Nodes: 1777445, Time Taken: 143.99440908432007, Check: True +Test 37 +Success: 37, Sol Length: 24, Num Nodes: 2212462, Time Taken: 178.44242238998413, Check: True +Test 38 +Success: 38, Sol Length: 23, Num Nodes: 5365754, Time Taken: 436.94662141799927, Check: True +Test 39 +Success: 39, Sol Length: 20, Num Nodes: 1931741, Time Taken: 155.25556445121765, Check: True +Test 40 +Success: 40, Sol Length: 21, Num Nodes: 2854982, Time Taken: 231.80247974395752, Check: True +Test 41 +Success: 41, Sol Length: 23, Num Nodes: 568753, Time Taken: 44.43713903427124, Check: True +Test 42 +Success: 42, Sol Length: 22, Num Nodes: 536407, Time Taken: 42.776610136032104, Check: True +Test 43 +Success: 43, Sol Length: 24, Num Nodes: 6024399, Time Taken: 489.6029269695282, Check: True +Test 44 +Success: 44, Sol Length: 19, Num Nodes: 441882, Time Taken: 34.91771149635315, Check: True +Test 45 +Success: 45, Sol Length: 22, Num Nodes: 6026344, Time Taken: 491.28927063941956, Check: True +Test 46 +Success: 46, Sol Length: 20, Num Nodes: 3172925, Time Taken: 257.2876214981079, Check: True +Test 47 +Success: 47, Sol Length: 23, Num Nodes: 1653202, Time Taken: 132.68025970458984, Check: True +Test 48 +Success: 48, Sol Length: 21, Num Nodes: 506303, Time Taken: 40.191994190216064, Check: True +Test 49 +Success: 49, Sol Length: 20, Num Nodes: 475300, Time Taken: 37.62935256958008, Check: True +Test 50 +Success: 50, Sol Length: 22, Num Nodes: 537634, Time Taken: 42.76522350311279, Check: True +Test 51 +Success: 51, Sol Length: 21, Num Nodes: 2799992, Time Taken: 225.7732057571411, Check: True +Test 52 +Success: 52, Sol Length: 23, Num Nodes: 1498085, Time Taken: 121.49756503105164, Check: True +Test 53 +Success: 53, Sol Length: 24, Num Nodes: 1934403, Time Taken: 155.00706815719604, Check: True +Test 54 +Success: 54, Sol Length: 22, Num Nodes: 1655950, Time Taken: 132.41284680366516, Check: True +Test 55 +Success: 55, Sol Length: 23, Num Nodes: 1250912, Time Taken: 100.46362400054932, Check: True +Test 56 +Success: 56, Sol Length: 22, Num Nodes: 1931175, Time Taken: 155.09077644348145, Check: True +Test 57 +Success: 57, Sol Length: 23, Num Nodes: 2118650, Time Taken: 170.90714168548584, Check: True +Test 58 +Success: 58, Sol Length: 23, Num Nodes: 2736532, Time Taken: 220.97872281074524, Check: True +Test 59 +Success: 59, Sol Length: 22, Num Nodes: 567957, Time Taken: 44.77780723571777, Check: True +Test 60 +Success: 60, Sol Length: 25, Num Nodes: 3633799, Time Taken: 294.6381981372833, Check: True +Test 61 +Success: 61, Sol Length: 22, Num Nodes: 1435211, Time Taken: 115.42229270935059, Check: True +Test 62 +Success: 62, Sol Length: 20, Num Nodes: 1458698, Time Taken: 117.40967416763306, Check: True +Test 63 +Success: 63, Sol Length: 19, Num Nodes: 443422, Time Taken: 35.12542223930359, Check: True +Test 64 +Success: 64, Sol Length: 24, Num Nodes: 6142564, Time Taken: 500.94135999679565, Check: True +Test 65 +Success: 65, Sol Length: 22, Num Nodes: 880177, Time Taken: 66.9182779788971, Check: True +Test 66 +Success: 66, Sol Length: 22, Num Nodes: 2366302, Time Taken: 191.06677389144897, Check: True +Test 67 +Success: 67, Sol Length: 23, Num Nodes: 2177601, Time Taken: 176.8616976737976, Check: True +Test 68 +Success: 68, Sol Length: 21, Num Nodes: 5918340, Time Taken: 481.9614300727844, Check: True +Test 69 +Success: 69, Sol Length: 23, Num Nodes: 3629231, Time Taken: 295.07087755203247, Check: True +Test 70 +Success: 70, Sol Length: 22, Num Nodes: 3074005, Time Taken: 249.37196016311646, Check: True +Test 71 +Success: 71, Sol Length: 22, Num Nodes: 1899444, Time Taken: 151.8556649684906, Check: True +Test 72 +Success: 72, Sol Length: 21, Num Nodes: 970146, Time Taken: 78.09128642082214, Check: True +Test 73 +Success: 73, Sol Length: 23, Num Nodes: 5127451, Time Taken: 416.867534160614, Check: True +Test 74 +Success: 74, Sol Length: 23, Num Nodes: 4406641, Time Taken: 357.3064601421356, Check: True +Test 75 +Success: 75, Sol Length: 20, Num Nodes: 475300, Time Taken: 37.80016851425171, Check: True +Test 76 +Success: 76, Sol Length: 20, Num Nodes: 877064, Time Taken: 70.09701943397522, Check: True +Test 77 +Success: 77, Sol Length: 20, Num Nodes: 475364, Time Taken: 37.49691343307495, Check: True +Test 78 +Success: 78, Sol Length: 22, Num Nodes: 1372807, Time Taken: 110.37932848930359, Check: True +Test 79 +Success: 79, Sol Length: 23, Num Nodes: 754739, Time Taken: 60.23416495323181, Check: True +Test 80 +Success: 80, Sol Length: 23, Num Nodes: 2088669, Time Taken: 168.1954414844513, Check: True +Test 81 +Success: 81, Sol Length: 22, Num Nodes: 1717402, Time Taken: 138.20886659622192, Check: True +Test 82 +Success: 82, Sol Length: 24, Num Nodes: 1219171, Time Taken: 98.3371045589447, Check: True +Test 83 +Success: 83, Sol Length: 21, Num Nodes: 507587, Time Taken: 39.915404319763184, Check: True +Test 84 +Success: 84, Sol Length: 20, Num Nodes: 5603246, Time Taken: 456.16609239578247, Check: True +Test 85 +Success: 85, Sol Length: 21, Num Nodes: 505973, Time Taken: 39.91900944709778, Check: True +Test 86 +Success: 86, Sol Length: 22, Num Nodes: 3163689, Time Taken: 256.7379596233368, Check: True +Test 87 +Success: 87, Sol Length: 23, Num Nodes: 569448, Time Taken: 44.84742450714111, Check: True +Test 88 +Success: 88, Sol Length: 23, Num Nodes: 3853584, Time Taken: 314.0444276332855, Check: True +Test 89 +Success: 89, Sol Length: 22, Num Nodes: 1375687, Time Taken: 109.12601089477539, Check: True +Test 90 +Success: 90, Sol Length: 23, Num Nodes: 3420964, Time Taken: 282.7411141395569, Check: True +Test 91 +Success: 91, Sol Length: 21, Num Nodes: 506766, Time Taken: 40.07580304145813, Check: True +Test 92 +Success: 92, Sol Length: 22, Num Nodes: 538035, Time Taken: 43.76602816581726, Check: True +Test 93 +Success: 93, Sol Length: 23, Num Nodes: 2614550, Time Taken: 212.38368916511536, Check: True +Test 94 +Success: 94, Sol Length: 21, Num Nodes: 1248925, Time Taken: 100.87862086296082, Check: True +Test 95 +Success: 95, Sol Length: 23, Num Nodes: 5678487, Time Taken: 464.90213322639465, Check: True +Test 96 +Success: 96, Sol Length: 21, Num Nodes: 723971, Time Taken: 56.72710108757019, Check: True +Test 97 +Success: 97, Sol Length: 21, Num Nodes: 1059865, Time Taken: 84.83587598800659, Check: True +Test 98 +Success: 98, Sol Length: 21, Num Nodes: 1124115, Time Taken: 90.85376787185669, Check: True +Test 99 +Success: 99, Sol Length: 22, Num Nodes: 1869585, Time Taken: 151.46839785575867, Check: True +Test 100 +Success: 100, Sol Length: 22, Num Nodes: 6026344, Time Taken: 503.5064675807953, Check: True +Success Rate: 1.0, Avg Sol Length: 21.95, Avg Num Nodes: 2198838.46, Avg Time Taken: 178.40023204803467 + +0.6 3000 (RTX 2060) + + +0.2 10000 +Test 1 +Success: 1, Sol Length: 24, Num Nodes: 1954299, Time Taken: 130.56117701530457, Check: True +Test 2 +Success: 2, Sol Length: 24, Num Nodes: 1951683, Time Taken: 131.2180690765381, Check: True +Test 3 +Success: 3, Sol Length: 22, Num Nodes: 1750345, Time Taken: 116.52505135536194, Check: True +Test 4 +Success: 4, Sol Length: 23, Num Nodes: 1849543, Time Taken: 123.34514212608337, Check: True +Test 5 +Success: 5, Sol Length: 20, Num Nodes: 1545210, Time Taken: 103.00037980079651, Check: True +Test 6 +Success: 6, Sol Length: 23, Num Nodes: 1850582, Time Taken: 125.2952139377594, Check: True +Test 7 +Success: 7, Sol Length: 24, Num Nodes: 1953389, Time Taken: 134.75501203536987, Check: True +Test 8 +Success: 8, Sol Length: 22, Num Nodes: 1751584, Time Taken: 120.07118535041809, Check: True +Test 9 +Success: 9, Sol Length: 23, Num Nodes: 1853108, Time Taken: 125.24101305007935, Check: True +Test 10 +Success: 10, Sol Length: 22, Num Nodes: 1752873, Time Taken: 118.19639563560486, Check: True +Test 11 +Success: 11, Sol Length: 20, Num Nodes: 1542349, Time Taken: 104.27077746391296, Check: True +Test 12 +Success: 12, Sol Length: 24, Num Nodes: 1956835, Time Taken: 132.51063466072083, Check: True +Test 13 +Success: 13, Sol Length: 24, Num Nodes: 1953635, Time Taken: 130.65593123435974, Check: True +Test 14 +Success: 14, Sol Length: 23, Num Nodes: 1853879, Time Taken: 123.18006753921509, Check: True +Test 15 +Success: 15, Sol Length: 22, Num Nodes: 1743118, Time Taken: 117.15958595275879, Check: True +Test 16 +Success: 16, Sol Length: 22, Num Nodes: 1746465, Time Taken: 116.49294590950012, Check: True +Test 17 +Success: 17, Sol Length: 24, Num Nodes: 1954919, Time Taken: 131.30917882919312, Check: True +Test 18 +Success: 18, Sol Length: 23, Num Nodes: 1852760, Time Taken: 123.40943956375122, Check: True +Test 19 +Success: 19, Sol Length: 21, Num Nodes: 1645823, Time Taken: 109.96892547607422, Check: True +Test 20 +Success: 20, Sol Length: 23, Num Nodes: 1851222, Time Taken: 124.24935626983643, Check: True +Test 21 +Success: 21, Sol Length: 23, Num Nodes: 1853549, Time Taken: 124.04614853858948, Check: True +Test 22 +Success: 22, Sol Length: 21, Num Nodes: 1648093, Time Taken: 110.22401165962219, Check: True +Test 23 +Success: 23, Sol Length: 22, Num Nodes: 1750345, Time Taken: 117.9047303199768, Check: True +Test 24 +Success: 24, Sol Length: 25, Num Nodes: 2055919, Time Taken: 137.89712715148926, Check: True +Test 25 +Success: 25, Sol Length: 22, Num Nodes: 1748782, Time Taken: 117.54858684539795, Check: True +Test 26 +Success: 26, Sol Length: 24, Num Nodes: 1953230, Time Taken: 131.11889052391052, Check: True +Test 27 +Success: 27, Sol Length: 24, Num Nodes: 1948373, Time Taken: 130.81550765037537, Check: True +Test 28 +Success: 28, Sol Length: 21, Num Nodes: 1648443, Time Taken: 110.00355052947998, Check: True +Test 29 +Success: 29, Sol Length: 23, Num Nodes: 1850029, Time Taken: 124.40859651565552, Check: True +Test 30 +Success: 30, Sol Length: 24, Num Nodes: 1953443, Time Taken: 131.61340069770813, Check: True +Test 31 +Success: 31, Sol Length: 23, Num Nodes: 1854287, Time Taken: 123.75036406517029, Check: True +Test 32 +Success: 32, Sol Length: 23, Num Nodes: 1853638, Time Taken: 123.9568600654602, Check: True +Test 33 +Success: 33, Sol Length: 23, Num Nodes: 1847760, Time Taken: 124.24459838867188, Check: True +Test 34 +Success: 34, Sol Length: 20, Num Nodes: 1545872, Time Taken: 103.71467757225037, Check: True +Test 35 +Success: 35, Sol Length: 20, Num Nodes: 1538159, Time Taken: 103.3219838142395, Check: True +Test 36 +Success: 36, Sol Length: 21, Num Nodes: 1649987, Time Taken: 110.12686657905579, Check: True +Test 37 +Success: 37, Sol Length: 24, Num Nodes: 1954215, Time Taken: 131.66331601142883, Check: True +Test 38 +Success: 38, Sol Length: 25, Num Nodes: 2051722, Time Taken: 137.5810387134552, Check: True +Test 39 +Success: 39, Sol Length: 22, Num Nodes: 1750345, Time Taken: 116.66295313835144, Check: True +Test 40 +Success: 40, Sol Length: 23, Num Nodes: 1849956, Time Taken: 123.88725781440735, Check: True +Test 41 +Success: 41, Sol Length: 23, Num Nodes: 1851911, Time Taken: 124.52520442008972, Check: True +Test 42 +Success: 42, Sol Length: 22, Num Nodes: 1740998, Time Taken: 117.31854033470154, Check: True +Test 43 +Success: 43, Sol Length: 24, Num Nodes: 1957878, Time Taken: 131.69878554344177, Check: True +Test 44 +Success: 44, Sol Length: 19, Num Nodes: 1436010, Time Taken: 97.71138548851013, Check: True +Test 45 +Success: 45, Sol Length: 22, Num Nodes: 1747328, Time Taken: 117.59480547904968, Check: True +Test 46 +Success: 46, Sol Length: 24, Num Nodes: 1955732, Time Taken: 130.9085693359375, Check: True +Test 47 +Success: 47, Sol Length: 23, Num Nodes: 1848583, Time Taken: 124.38288736343384, Check: True +Test 48 +Success: 48, Sol Length: 21, Num Nodes: 1647617, Time Taken: 109.94580864906311, Check: True +Test 49 +Success: 49, Sol Length: 20, Num Nodes: 1543806, Time Taken: 104.77269220352173, Check: True +Test 50 +Success: 50, Sol Length: 22, Num Nodes: 1749866, Time Taken: 118.63789176940918, Check: True +Test 51 +Success: 51, Sol Length: 23, Num Nodes: 1850223, Time Taken: 125.19903755187988, Check: True +Test 52 +Success: 52, Sol Length: 23, Num Nodes: 1850805, Time Taken: 124.22428917884827, Check: True +Test 53 +Success: 53, Sol Length: 24, Num Nodes: 1954472, Time Taken: 133.78520321846008, Check: True +Test 54 +Success: 54, Sol Length: 24, Num Nodes: 1956692, Time Taken: 131.9834225177765, Check: True +Test 55 +Success: 55, Sol Length: 23, Num Nodes: 1854703, Time Taken: 125.0616705417633, Check: True +Test 56 +Success: 56, Sol Length: 22, Num Nodes: 1749700, Time Taken: 118.64426970481873, Check: True +Test 57 +Success: 57, Sol Length: 25, Num Nodes: 2057504, Time Taken: 138.50551342964172, Check: True +Test 58 +Success: 58, Sol Length: 23, Num Nodes: 1850885, Time Taken: 125.02109122276306, Check: True +Test 59 +Success: 59, Sol Length: 22, Num Nodes: 1748229, Time Taken: 118.27261590957642, Check: True +Test 60 +Success: 60, Sol Length: 25, Num Nodes: 2050175, Time Taken: 139.31285786628723, Check: True +Test 61 +Success: 61, Sol Length: 22, Num Nodes: 1748047, Time Taken: 118.1424491405487, Check: True +Test 62 +Success: 62, Sol Length: 20, Num Nodes: 1541428, Time Taken: 103.39058542251587, Check: True +Test 63 +Success: 63, Sol Length: 19, Num Nodes: 1438327, Time Taken: 97.9203770160675, Check: True +Test 64 +Success: 64, Sol Length: 24, Num Nodes: 1953443, Time Taken: 131.83499789237976, Check: True +Test 65 +Success: 65, Sol Length: 22, Num Nodes: 1752498, Time Taken: 118.75171637535095, Check: True +Test 66 +Success: 66, Sol Length: 24, Num Nodes: 1955475, Time Taken: 133.2559518814087, Check: True +Test 67 +Success: 67, Sol Length: 23, Num Nodes: 1850582, Time Taken: 124.6159462928772, Check: True +Test 68 +Success: 68, Sol Length: 23, Num Nodes: 1849398, Time Taken: 124.73513102531433, Check: True +Test 69 +Success: 69, Sol Length: 23, Num Nodes: 1848648, Time Taken: 125.68108463287354, Check: True +Test 70 +Success: 70, Sol Length: 22, Num Nodes: 1748216, Time Taken: 119.54173278808594, Check: True +Test 71 +Success: 71, Sol Length: 22, Num Nodes: 1749741, Time Taken: 118.26614165306091, Check: True +Test 72 +Success: 72, Sol Length: 21, Num Nodes: 1647908, Time Taken: 112.07008266448975, Check: True +Test 73 +Success: 73, Sol Length: 25, Num Nodes: 2058411, Time Taken: 139.00275325775146, Check: True +Test 74 +Success: 74, Sol Length: 23, Num Nodes: 1850962, Time Taken: 125.33462715148926, Check: True +Test 75 +Success: 75, Sol Length: 20, Num Nodes: 1543806, Time Taken: 104.73007559776306, Check: True +Test 76 +Success: 76, Sol Length: 20, Num Nodes: 1544576, Time Taken: 103.58849787712097, Check: True +Test 77 +Success: 77, Sol Length: 20, Num Nodes: 1544117, Time Taken: 104.51683354377747, Check: True +Test 78 +Success: 78, Sol Length: 22, Num Nodes: 1747377, Time Taken: 117.78509712219238, Check: True +Test 79 +Success: 79, Sol Length: 23, Num Nodes: 1852881, Time Taken: 125.6800594329834, Check: True +Test 80 +Success: 80, Sol Length: 23, Num Nodes: 1853847, Time Taken: 125.2467429637909, Check: True +Test 81 +Success: 81, Sol Length: 22, Num Nodes: 1754015, Time Taken: 118.80145764350891, Check: True +Test 82 +Success: 82, Sol Length: 22, Num Nodes: 1749165, Time Taken: 119.1295554637909, Check: True +Test 83 +Success: 83, Sol Length: 21, Num Nodes: 1649294, Time Taken: 111.89020299911499, Check: True +Test 84 +Success: 84, Sol Length: 24, Num Nodes: 1947291, Time Taken: 133.76478099822998, Check: True +Test 85 +Success: 85, Sol Length: 21, Num Nodes: 1645348, Time Taken: 112.591135263443, Check: True +Test 86 +Success: 86, Sol Length: 22, Num Nodes: 1747181, Time Taken: 118.6870539188385, Check: True +Test 87 +Success: 87, Sol Length: 23, Num Nodes: 1853627, Time Taken: 126.40916848182678, Check: True +Test 88 +Success: 88, Sol Length: 25, Num Nodes: 2054377, Time Taken: 139.4127538204193, Check: True +Test 89 +Success: 89, Sol Length: 22, Num Nodes: 1751601, Time Taken: 118.81685090065002, Check: True +Test 90 +Success: 90, Sol Length: 25, Num Nodes: 2055406, Time Taken: 138.41240453720093, Check: True +Test 91 +Success: 91, Sol Length: 21, Num Nodes: 1646095, Time Taken: 110.7354154586792, Check: True +Test 92 +Success: 92, Sol Length: 22, Num Nodes: 1751638, Time Taken: 119.56121015548706, Check: True +Test 93 +Success: 93, Sol Length: 23, Num Nodes: 1851986, Time Taken: 125.90383720397949, Check: True +Test 94 +Success: 94, Sol Length: 21, Num Nodes: 1647298, Time Taken: 111.71027827262878, Check: True +Test 95 +Success: 95, Sol Length: 23, Num Nodes: 1851495, Time Taken: 126.403400182724, Check: True +Test 96 +Success: 96, Sol Length: 21, Num Nodes: 1648461, Time Taken: 111.83898568153381, Check: True +Test 97 +Success: 97, Sol Length: 23, Num Nodes: 1848613, Time Taken: 124.31250309944153, Check: True +Test 98 +Success: 98, Sol Length: 21, Num Nodes: 1643762, Time Taken: 113.01273775100708, Check: True +Test 99 +Success: 99, Sol Length: 24, Num Nodes: 1952742, Time Taken: 136.37947368621826, Check: True +Test 100 +Success: 100, Sol Length: 22, Num Nodes: 1747328, Time Taken: 124.15013027191162, Check: True +Success Rate: 1.0, Avg Sol Length: 22.49, Avg Num Nodes: 1798992.96, Avg Time Taken: 121.49426710128785 + +0.4 10000 (RTX 3090) + +0.6 10000 (RTX 3090) diff --git a/results/Beam_Search/adaptive.txt b/results/Beam_Search/adaptive.txt new file mode 100644 index 0000000..693fa3b --- /dev/null +++ b/results/Beam_Search/adaptive.txt @@ -0,0 +1,347 @@ +1000 100 (Nvidia RTX 3090 Desktop) +Test 1 +Test 2 +Success: 1, Sol Length: 30, Num Nodes: 288582, Time Taken: 15.78855586051941, Check: True +Test 3 +Test 4 +Success: 2, Sol Length: 27, Num Nodes: 253119, Time Taken: 14.0291588306427, Check: True +Test 5 +Test 6 +Test 7 +Success: 3, Sol Length: 30, Num Nodes: 286890, Time Taken: 15.775588274002075, Check: True +Test 8 +Success: 4, Sol Length: 26, Num Nodes: 241902, Time Taken: 13.394730567932129, Check: True +Test 9 +Success: 5, Sol Length: 25, Num Nodes: 231133, Time Taken: 12.727867603302002, Check: True +Test 10 +Test 11 +Success: 6, Sol Length: 22, Num Nodes: 198870, Time Taken: 10.910291910171509, Check: True +Test 12 +Test 13 +Success: 7, Sol Length: 24, Num Nodes: 220070, Time Taken: 12.220187187194824, Check: True +Test 14 +Success: 8, Sol Length: 25, Num Nodes: 231130, Time Taken: 12.891440391540527, Check: True +Test 15 +Test 16 +Success: 9, Sol Length: 26, Num Nodes: 242087, Time Taken: 13.136317014694214, Check: True +Test 17 +Success: 10, Sol Length: 26, Num Nodes: 242080, Time Taken: 13.418610572814941, Check: True +Test 18 +Success: 11, Sol Length: 25, Num Nodes: 231245, Time Taken: 12.745849609375, Check: True +Test 19 +Success: 12, Sol Length: 21, Num Nodes: 187836, Time Taken: 10.207890510559082, Check: True +Test 20 +Success: 13, Sol Length: 29, Num Nodes: 276699, Time Taken: 15.093127489089966, Check: True +Test 21 +Success: 14, Sol Length: 25, Num Nodes: 231299, Time Taken: 12.755539894104004, Check: True +Test 22 +Success: 15, Sol Length: 27, Num Nodes: 253163, Time Taken: 14.01259183883667, Check: True +Test 23 +Test 24 +Success: 16, Sol Length: 29, Num Nodes: 275767, Time Taken: 15.235763549804688, Check: True +Test 25 +Success: 17, Sol Length: 24, Num Nodes: 220448, Time Taken: 12.143386602401733, Check: True +Test 26 +Success: 18, Sol Length: 24, Num Nodes: 220005, Time Taken: 12.261693477630615, Check: True +Test 27 +Success: 19, Sol Length: 24, Num Nodes: 220454, Time Taken: 12.269122838973999, Check: True +Test 28 +Success: 20, Sol Length: 31, Num Nodes: 295960, Time Taken: 16.295698881149292, Check: True +Test 29 +Success: 21, Sol Length: 25, Num Nodes: 231851, Time Taken: 12.9435453414917, Check: True +Test 30 +Success: 22, Sol Length: 30, Num Nodes: 286373, Time Taken: 15.98395586013794, Check: True +Test 31 +Test 32 +Success: 23, Sol Length: 25, Num Nodes: 231338, Time Taken: 12.77433156967163, Check: True +Test 33 +Success: 24, Sol Length: 27, Num Nodes: 252553, Time Taken: 13.852831602096558, Check: True +Test 34 +Test 35 +Success: 25, Sol Length: 22, Num Nodes: 198612, Time Taken: 10.94997239112854, Check: True +Test 36 +Success: 26, Sol Length: 29, Num Nodes: 275151, Time Taken: 15.262463808059692, Check: True +Test 37 +Test 38 +Test 39 +Test 40 +Test 41 +Test 42 +Success: 27, Sol Length: 22, Num Nodes: 197334, Time Taken: 10.84691572189331, Check: True +Test 43 +Test 44 +Success: 28, Sol Length: 23, Num Nodes: 209254, Time Taken: 11.572306632995605, Check: True +Test 45 +Test 46 +Test 47 +Success: 29, Sol Length: 31, Num Nodes: 298173, Time Taken: 16.355769872665405, Check: True +Test 48 +Success: 30, Sol Length: 21, Num Nodes: 187053, Time Taken: 10.441342830657959, Check: True +Test 49 +Success: 31, Sol Length: 28, Num Nodes: 264305, Time Taken: 14.73845648765564, Check: True +Test 50 +Success: 32, Sol Length: 26, Num Nodes: 246420, Time Taken: 13.585889101028442, Check: True +Test 51 +Test 52 +Success: 33, Sol Length: 31, Num Nodes: 294615, Time Taken: 16.2382709980011, Check: True +Test 53 +Test 54 +Success: 34, Sol Length: 26, Num Nodes: 242485, Time Taken: 13.439046382904053, Check: True +Test 55 +Test 56 +Test 57 +Success: 35, Sol Length: 27, Num Nodes: 253245, Time Taken: 14.03161072731018, Check: True +Test 58 +Success: 36, Sol Length: 29, Num Nodes: 277015, Time Taken: 15.439815282821655, Check: True +Test 59 +Success: 37, Sol Length: 26, Num Nodes: 241320, Time Taken: 13.346522331237793, Check: True +Test 60 +Success: 38, Sol Length: 31, Num Nodes: 301706, Time Taken: 16.44365429878235, Check: True +Test 61 +Success: 39, Sol Length: 24, Num Nodes: 220220, Time Taken: 12.15497374534607, Check: True +Test 62 +Success: 40, Sol Length: 24, Num Nodes: 220842, Time Taken: 12.212857484817505, Check: True +Test 63 +Success: 41, Sol Length: 19, Num Nodes: 165215, Time Taken: 9.087714672088623, Check: True +Test 64 +Success: 42, Sol Length: 30, Num Nodes: 286373, Time Taken: 15.747759580612183, Check: True +Test 65 +Test 66 +Test 67 +Test 68 +Success: 43, Sol Length: 23, Num Nodes: 209952, Time Taken: 11.76227879524231, Check: True +Test 69 +Success: 44, Sol Length: 23, Num Nodes: 210199, Time Taken: 11.550071239471436, Check: True +Test 70 +Success: 45, Sol Length: 24, Num Nodes: 220186, Time Taken: 12.22213339805603, Check: True +Test 71 +Test 72 +Test 73 +Test 74 +Success: 46, Sol Length: 25, Num Nodes: 231378, Time Taken: 12.699888467788696, Check: True +Test 75 +Success: 47, Sol Length: 28, Num Nodes: 264305, Time Taken: 14.590750932693481, Check: True +Test 76 +Test 77 +Success: 48, Sol Length: 20, Num Nodes: 176534, Time Taken: 9.841034650802612, Check: True +Test 78 +Success: 49, Sol Length: 24, Num Nodes: 220267, Time Taken: 12.320991039276123, Check: True +Test 79 +Success: 50, Sol Length: 25, Num Nodes: 231455, Time Taken: 12.891523599624634, Check: True +Test 80 +Test 81 +Success: 51, Sol Length: 26, Num Nodes: 240651, Time Taken: 13.422890186309814, Check: True +Test 82 +Success: 52, Sol Length: 24, Num Nodes: 220548, Time Taken: 12.416397333145142, Check: True +Test 83 +Success: 53, Sol Length: 33, Num Nodes: 319409, Time Taken: 17.71880316734314, Check: True +Test 84 +Success: 54, Sol Length: 24, Num Nodes: 219974, Time Taken: 12.272696733474731, Check: True +Test 85 +Success: 55, Sol Length: 21, Num Nodes: 187770, Time Taken: 10.519684791564941, Check: True +Test 86 +Success: 56, Sol Length: 24, Num Nodes: 220459, Time Taken: 12.349560499191284, Check: True +Test 87 +Test 88 +Success: 57, Sol Length: 27, Num Nodes: 253658, Time Taken: 14.577183485031128, Check: True +Test 89 +Test 90 +Success: 58, Sol Length: 31, Num Nodes: 296964, Time Taken: 17.16541886329651, Check: True +Test 91 +Success: 59, Sol Length: 21, Num Nodes: 187215, Time Taken: 10.873493432998657, Check: True +Test 92 +Success: 60, Sol Length: 28, Num Nodes: 264500, Time Taken: 15.365609407424927, Check: True +Test 93 +Success: 61, Sol Length: 23, Num Nodes: 209549, Time Taken: 12.248621225357056, Check: True +Test 94 +Test 95 +Success: 62, Sol Length: 29, Num Nodes: 275314, Time Taken: 15.974087715148926, Check: True +Test 96 +Success: 63, Sol Length: 23, Num Nodes: 209177, Time Taken: 12.256770133972168, Check: True +Test 97 +Success: 64, Sol Length: 29, Num Nodes: 275623, Time Taken: 16.132275342941284, Check: True +Test 98 +Success: 65, Sol Length: 23, Num Nodes: 209197, Time Taken: 12.180160522460938, Check: True +Test 99 +Test 100 +Success Rate: 0.65, Avg Sol Length: 25.753846153846155, Avg Num Nodes: 239761.16923076924, Avg Time Taken: 13.355626839857836 +(drl) liue@zebra:~/drl-thesis$ vim beam_search.py +(drl) liue@zebra:~/drl-thesis$ python beam_search.py +Using device: cuda +Test 1 +Test 2 +Success: 1, Sol Length: 28, Num Nodes: 401669, Time Taken: 23.563684701919556, Check: True +Test 3 +Test 4 +Success: 2, Sol Length: 23, Num Nodes: 296739, Time Taken: 17.555095434188843, Check: True +Test 5 +Test 6 +Test 7 +Success: 3, Sol Length: 30, Num Nodes: 446896, Time Taken: 24.991541862487793, Check: True +Test 8 +Success: 4, Sol Length: 26, Num Nodes: 357433, Time Taken: 19.92199468612671, Check: True +Test 9 +Success: 5, Sol Length: 25, Num Nodes: 336953, Time Taken: 18.92201256752014, Check: True +Test 10 +Success: 6, Sol Length: 38, Num Nodes: 640232, Time Taken: 36.02406716346741, Check: True +Test 11 +Success: 7, Sol Length: 20, Num Nodes: 239957, Time Taken: 13.456002712249756, Check: True +Test 12 +Test 13 +Success: 8, Sol Length: 24, Num Nodes: 316793, Time Taken: 17.818976640701294, Check: True +Test 14 +Success: 9, Sol Length: 25, Num Nodes: 336907, Time Taken: 18.92063069343567, Check: True +Test 15 +Success: 10, Sol Length: 28, Num Nodes: 401265, Time Taken: 22.188848972320557, Check: True +Test 16 +Success: 11, Sol Length: 24, Num Nodes: 316875, Time Taken: 17.75441575050354, Check: True +Test 17 +Success: 12, Sol Length: 26, Num Nodes: 357688, Time Taken: 20.164076566696167, Check: True +Test 18 +Success: 13, Sol Length: 25, Num Nodes: 337403, Time Taken: 18.92366075515747, Check: True +Test 19 +Success: 14, Sol Length: 21, Num Nodes: 259489, Time Taken: 14.484349250793457, Check: True +Test 20 +Success: 15, Sol Length: 27, Num Nodes: 379274, Time Taken: 21.130425691604614, Check: True +Test 21 +Success: 16, Sol Length: 25, Num Nodes: 336719, Time Taken: 18.98115038871765, Check: True +Test 22 +Success: 17, Sol Length: 23, Num Nodes: 297234, Time Taken: 16.80854630470276, Check: True +Test 23 +Test 24 +Success: 18, Sol Length: 25, Num Nodes: 337587, Time Taken: 18.775121927261353, Check: True +Test 25 +Success: 19, Sol Length: 24, Num Nodes: 317249, Time Taken: 17.71120834350586, Check: True +Test 26 +Success: 20, Sol Length: 24, Num Nodes: 316836, Time Taken: 17.861042261123657, Check: True +Test 27 +Success: 21, Sol Length: 24, Num Nodes: 316820, Time Taken: 17.707245349884033, Check: True +Test 28 +Success: 22, Sol Length: 39, Num Nodes: 661123, Time Taken: 36.49165916442871, Check: True +Test 29 +Success: 23, Sol Length: 25, Num Nodes: 338480, Time Taken: 19.08993935585022, Check: True +Test 30 +Test 31 +Success: 24, Sol Length: 27, Num Nodes: 378990, Time Taken: 21.518685340881348, Check: True +Test 32 +Success: 25, Sol Length: 25, Num Nodes: 337160, Time Taken: 18.938779830932617, Check: True +Test 33 +Success: 26, Sol Length: 27, Num Nodes: 378176, Time Taken: 21.255402088165283, Check: True +Test 34 +Success: 27, Sol Length: 28, Num Nodes: 401591, Time Taken: 22.760889291763306, Check: True +Test 35 +Success: 28, Sol Length: 22, Num Nodes: 278341, Time Taken: 15.55474853515625, Check: True +Test 36 +Success: 29, Sol Length: 25, Num Nodes: 338045, Time Taken: 19.055992364883423, Check: True +Test 37 +Success: 30, Sol Length: 28, Num Nodes: 400396, Time Taken: 22.323816061019897, Check: True +Test 38 +Success: 31, Sol Length: 31, Num Nodes: 467298, Time Taken: 26.11850666999817, Check: True +Test 39 +Test 40 +Test 41 +Test 42 +Success: 32, Sol Length: 22, Num Nodes: 276594, Time Taken: 15.478629112243652, Check: True +Test 43 +Success: 33, Sol Length: 30, Num Nodes: 445780, Time Taken: 24.952073335647583, Check: True +Test 44 +Success: 34, Sol Length: 23, Num Nodes: 297021, Time Taken: 16.659860610961914, Check: True +Test 45 +Success: 35, Sol Length: 24, Num Nodes: 317184, Time Taken: 17.737502574920654, Check: True +Test 46 +Success: 36, Sol Length: 34, Num Nodes: 536594, Time Taken: 30.052871227264404, Check: True +Test 47 +Success: 37, Sol Length: 27, Num Nodes: 379313, Time Taken: 21.23777461051941, Check: True +Test 48 +Success: 38, Sol Length: 21, Num Nodes: 258024, Time Taken: 14.590969562530518, Check: True +Test 49 +Success: 39, Sol Length: 28, Num Nodes: 400587, Time Taken: 22.579387187957764, Check: True +Test 50 +Success: 40, Sol Length: 26, Num Nodes: 362458, Time Taken: 20.185267210006714, Check: True +Test 51 +Test 52 +Success: 41, Sol Length: 31, Num Nodes: 467759, Time Taken: 26.0401394367218, Check: True +Test 53 +Success: 42, Sol Length: 26, Num Nodes: 357712, Time Taken: 20.065766096115112, Check: True +Test 54 +Success: 43, Sol Length: 28, Num Nodes: 401017, Time Taken: 22.488198041915894, Check: True +Test 55 +Test 56 +Success: 44, Sol Length: 28, Num Nodes: 402003, Time Taken: 22.367058992385864, Check: True +Test 57 +Success: 45, Sol Length: 27, Num Nodes: 379984, Time Taken: 21.343003749847412, Check: True +Test 58 +Test 59 +Success: 46, Sol Length: 26, Num Nodes: 356467, Time Taken: 20.046007871627808, Check: True +Test 60 +Success: 47, Sol Length: 25, Num Nodes: 337576, Time Taken: 18.865092277526855, Check: True +Test 61 +Success: 48, Sol Length: 24, Num Nodes: 317010, Time Taken: 17.76639151573181, Check: True +Test 62 +Success: 49, Sol Length: 24, Num Nodes: 317695, Time Taken: 17.919795274734497, Check: True +Test 63 +Success: 50, Sol Length: 19, Num Nodes: 221625, Time Taken: 12.481488227844238, Check: True +Test 64 +Test 65 +Test 66 +Test 67 +Test 68 +Success: 51, Sol Length: 23, Num Nodes: 298000, Time Taken: 16.81906533241272, Check: True +Test 69 +Success: 52, Sol Length: 23, Num Nodes: 297911, Time Taken: 16.57999610900879, Check: True +Test 70 +Success: 53, Sol Length: 24, Num Nodes: 316836, Time Taken: 17.888176679611206, Check: True +Test 71 +Success: 54, Sol Length: 28, Num Nodes: 400831, Time Taken: 22.629698276519775, Check: True +Test 72 +Test 73 +Test 74 +Success: 55, Sol Length: 25, Num Nodes: 337410, Time Taken: 18.85599398612976, Check: True +Test 75 +Success: 56, Sol Length: 28, Num Nodes: 400587, Time Taken: 22.579732656478882, Check: True +Test 76 +Test 77 +Success: 57, Sol Length: 20, Num Nodes: 240447, Time Taken: 13.571072816848755, Check: True +Test 78 +Success: 58, Sol Length: 24, Num Nodes: 318407, Time Taken: 17.923809051513672, Check: True +Test 79 +Success: 59, Sol Length: 25, Num Nodes: 337027, Time Taken: 19.060615062713623, Check: True +Test 80 +Success: 60, Sol Length: 27, Num Nodes: 379416, Time Taken: 21.209309101104736, Check: True +Test 81 +Success: 61, Sol Length: 26, Num Nodes: 355819, Time Taken: 20.11065435409546, Check: True +Test 82 +Success: 62, Sol Length: 24, Num Nodes: 317253, Time Taken: 17.95701575279236, Check: True +Test 83 +Success: 63, Sol Length: 37, Num Nodes: 615126, Time Taken: 34.22367787361145, Check: True +Test 84 +Success: 64, Sol Length: 24, Num Nodes: 316746, Time Taken: 17.776761770248413, Check: True +Test 85 +Success: 65, Sol Length: 21, Num Nodes: 259131, Time Taken: 14.59034776687622, Check: True +Test 86 +Success: 66, Sol Length: 24, Num Nodes: 317086, Time Taken: 17.9478440284729, Check: True +Test 87 +Success: 67, Sol Length: 25, Num Nodes: 338862, Time Taken: 19.097918272018433, Check: True +Test 88 +Success: 68, Sol Length: 27, Num Nodes: 378824, Time Taken: 21.2778799533844, Check: True +Test 89 +Test 90 +Success: 69, Sol Length: 29, Num Nodes: 422205, Time Taken: 23.874332427978516, Check: True +Test 91 +Success: 70, Sol Length: 21, Num Nodes: 258662, Time Taken: 14.670774698257446, Check: True +Test 92 +Success: 71, Sol Length: 24, Num Nodes: 317093, Time Taken: 17.94012689590454, Check: True +Test 93 +Test 94 +Test 95 +Test 96 +Success: 72, Sol Length: 23, Num Nodes: 297094, Time Taken: 16.709492206573486, Check: True +Test 97 +Success: 73, Sol Length: 27, Num Nodes: 379519, Time Taken: 21.405219078063965, Check: True +Test 98 +Success: 74, Sol Length: 23, Num Nodes: 297327, Time Taken: 16.793429851531982, Check: True +Test 99 +Success: 75, Sol Length: 26, Num Nodes: 357191, Time Taken: 20.109642028808594, Check: True +Test 100 +Success: 76, Sol Length: 24, Num Nodes: 317184, Time Taken: 17.820098638534546, Check: True +Success Rate: 0.76, Avg Sol Length: 25.75, Avg Num Nodes: 355684.40789473685, Avg Time Taken: 19.987532609387447 \ No newline at end of file diff --git a/results/Beam_Search/list.txt b/results/Beam_Search/list.txt deleted file mode 100644 index 0e18579..0000000 --- a/results/Beam_Search/list.txt +++ /dev/null @@ -1,116 +0,0 @@ -1024 35 (Nvidia RTX 2060 Laptop) - -1911 35 (Nvidia RTX 2060 Laptop) -Test 1 -Success: 1, Sol Length: 24, Num Nodes: 499860, Time Taken: 32.99142575263977, Check: True -Test 2 -Success: 2, Sol Length: 26, Num Nodes: 559250, Time Taken: 39.17157053947449, Check: True -Test 3 -Success: 3, Sol Length: 28, Num Nodes: 619694, Time Taken: 43.07345247268677, Check: True -Test 4 -Success: 4, Sol Length: 23, Num Nodes: 470352, Time Taken: 32.81460976600647, Check: True -Test 5 -Success: 5, Sol Length: 20, Num Nodes: 384704, Time Taken: 25.975700616836548, Check: True -Test 6 -Test 7 -Success: 6, Sol Length: 26, Num Nodes: 558947, Time Taken: 39.17886734008789, Check: True -Test 8 -Success: 7, Sol Length: 24, Num Nodes: 499734, Time Taken: 34.378440856933594, Check: True -Test 9 -Success: 8, Sol Length: 25, Num Nodes: 529484, Time Taken: 36.23348021507263, Check: True -Test 10 -Success: 9, Sol Length: 26, Num Nodes: 559905, Time Taken: 38.57706546783447, Check: True -Test 11 -Success: 10, Sol Length: 20, Num Nodes: 383799, Time Taken: 25.664628982543945, Check: True -Test 12 -Success: 11, Sol Length: 26, Num Nodes: 557983, Time Taken: 38.5907187461853, Check: True -Test 13 -Success: 12, Sol Length: 24, Num Nodes: 500263, Time Taken: 34.849750995635986, Check: True -Test 14 -Success: 13, Sol Length: 25, Num Nodes: 530376, Time Taken: 35.68422222137451, Check: True -Test 15 -Success: 14, Sol Length: 26, Num Nodes: 558312, Time Taken: 37.73366451263428, Check: True -Test 16 -Success: 15, Sol Length: 22, Num Nodes: 441090, Time Taken: 29.585624933242798, Check: True -Test 17 -Success: 16, Sol Length: 26, Num Nodes: 558730, Time Taken: 38.93965458869934, Check: True -Test 18 -Success: 17, Sol Length: 25, Num Nodes: 528162, Time Taken: 36.00977039337158, Check: True -Test 19 -Success: 18, Sol Length: 21, Num Nodes: 410823, Time Taken: 27.41939687728882, Check: True -Test 20 -Success: 19, Sol Length: 27, Num Nodes: 588056, Time Taken: 39.0809850692749, Check: True -Test 21 -Success: 20, Sol Length: 23, Num Nodes: 470557, Time Taken: 32.333083629608154, Check: True -Test 22 -Success: 21, Sol Length: 23, Num Nodes: 470251, Time Taken: 32.61762762069702, Check: True -Test 23 -Success: 22, Sol Length: 28, Num Nodes: 619694, Time Taken: 43.22348928451538, Check: True -Test 24 -Success: 23, Sol Length: 25, Num Nodes: 529528, Time Taken: 37.53544497489929, Check: True -Test 25 -Success: 24, Sol Length: 24, Num Nodes: 498912, Time Taken: 33.282710313797, Check: True -Test 26 -Success: 25, Sol Length: 24, Num Nodes: 499108, Time Taken: 33.685946464538574, Check: True -Test 27 -Success: 26, Sol Length: 24, Num Nodes: 497647, Time Taken: 32.980961561203, Check: True -Test 28 -Success: 27, Sol Length: 29, Num Nodes: 652276, Time Taken: 45.73902750015259, Check: True -Test 29 -Success: 28, Sol Length: 25, Num Nodes: 529582, Time Taken: 36.83468294143677, Check: True -Test 30 -Success: 29, Sol Length: 24, Num Nodes: 499234, Time Taken: 35.41544556617737, Check: True -Test 31 -Success: 30, Sol Length: 25, Num Nodes: 529806, Time Taken: 37.02342486381531, Check: True -Test 32 -Success: 31, Sol Length: 25, Num Nodes: 529899, Time Taken: 36.44072866439819, Check: True -Test 33 -Success: 32, Sol Length: 27, Num Nodes: 588970, Time Taken: 39.44892120361328, Check: True -Test 34 -Success: 33, Sol Length: 24, Num Nodes: 499490, Time Taken: 34.03892540931702, Check: True -Test 35 -Success: 34, Sol Length: 22, Num Nodes: 440553, Time Taken: 29.405057668685913, Check: True -Test 36 -Success: 35, Sol Length: 25, Num Nodes: 530106, Time Taken: 36.2100715637207, Check: True -Test 37 -Success: 36, Sol Length: 24, Num Nodes: 500899, Time Taken: 33.90754842758179, Check: True -Test 38 -Success: 37, Sol Length: 25, Num Nodes: 528377, Time Taken: 34.49122452735901, Check: True -Test 39 -Success: 38, Sol Length: 28, Num Nodes: 619694, Time Taken: 39.927072525024414, Check: True -Test 40 -Success: 39, Sol Length: 29, Num Nodes: 651975, Time Taken: 44.90982151031494, Check: True -Test 41 -Success: 40, Sol Length: 25, Num Nodes: 529675, Time Taken: 34.726566553115845, Check: True -Test 42 -Success: 41, Sol Length: 22, Num Nodes: 439856, Time Taken: 28.566165924072266, Check: True -Test 43 -Success: 42, Sol Length: 30, Num Nodes: 683656, Time Taken: 44.85935306549072, Check: True -Test 44 -Success: 43, Sol Length: 21, Num Nodes: 413451, Time Taken: 26.49046754837036, Check: True -Test 45 -Success: 44, Sol Length: 24, Num Nodes: 499447, Time Taken: 33.47587442398071, Check: True -Test 46 -Success: 45, Sol Length: 30, Num Nodes: 684280, Time Taken: 47.08858036994934, Check: True -Test 47 -Success: 46, Sol Length: 27, Num Nodes: 589483, Time Taken: 40.560885190963745, Check: True -Test 48 -Success: 47, Sol Length: 21, Num Nodes: 412953, Time Taken: 26.78500485420227, Check: True -Test 49 -Success: 48, Sol Length: 26, Num Nodes: 559211, Time Taken: 37.74032115936279, Check: True -Test 50 -Success: 49, Sol Length: 26, Num Nodes: 559274, Time Taken: 37.432875633239746, Check: True -Test 51 -Success: 50, Sol Length: 29, Num Nodes: 650891, Time Taken: 43.304117918014526, Check: True -Test 52 -Success: 51, Sol Length: 27, Num Nodes: 589492, Time Taken: 38.41140532493591, Check: True -Test 53 -Success: 52, Sol Length: 26, Num Nodes: 560223, Time Taken: 37.74533987045288, Check: True -Test 54 -Success: 53, Sol Length: 26, Num Nodes: 559234, Time Taken: 37.886956214904785, Check: True -Test 55 -Success: 54, Sol Length: 27, Num Nodes: 590477, Time Taken: 39.0079550743103, Check: True -Test 56 -Success: 55, Sol Length: 24, Num Nodes: 497537, Time Taken: 31.696317672729492, Check: True -Test 57 -Success: 56, Sol Length: 27, Num Nodes: 589835, Time Taken: 38.624144554138184, Check: True \ No newline at end of file diff --git a/results/Beam_Search/pq.txt b/results/Beam_Search/pq.txt deleted file mode 100644 index 46d56d3..0000000 --- a/results/Beam_Search/pq.txt +++ /dev/null @@ -1,605 +0,0 @@ -1911 35 (Nvidia RTX 2060 Laptop) -Test 1 -Success: 1, Sol Length: 24, Num Nodes: 499860, Time Taken: 35.511171102523804, Check: True -Test 2 -Success: 2, Sol Length: 26, Num Nodes: 559250, Time Taken: 42.34026122093201, Check: True -Test 3 -Success: 3, Sol Length: 28, Num Nodes: 619694, Time Taken: 45.58492469787598, Check: True -Test 4 -Success: 4, Sol Length: 23, Num Nodes: 470352, Time Taken: 32.90097618103027, Check: True -Test 5 -Success: 5, Sol Length: 20, Num Nodes: 384704, Time Taken: 25.989378213882446, Check: True -Test 6 -Test 7 -Success: 6, Sol Length: 26, Num Nodes: 558947, Time Taken: 39.31385278701782, Check: True -Test 8 -Success: 7, Sol Length: 24, Num Nodes: 499734, Time Taken: 35.26907992362976, Check: True -Test 9 -Success: 8, Sol Length: 25, Num Nodes: 529484, Time Taken: 38.02981519699097, Check: True -Test 10 -Success: 9, Sol Length: 26, Num Nodes: 559905, Time Taken: 39.85664439201355, Check: True -Test 11 -Success: 10, Sol Length: 20, Num Nodes: 383799, Time Taken: 25.70846462249756, Check: True -Test 12 -Success: 11, Sol Length: 26, Num Nodes: 557983, Time Taken: 39.314109802246094, Check: True -Test 13 -Success: 12, Sol Length: 24, Num Nodes: 500263, Time Taken: 35.21650505065918, Check: True -Test 14 -Success: 13, Sol Length: 25, Num Nodes: 530376, Time Taken: 37.034221172332764, Check: True -Test 15 -Success: 14, Sol Length: 26, Num Nodes: 558312, Time Taken: 40.37410044670105, Check: True -Test 16 -Success: 15, Sol Length: 22, Num Nodes: 441090, Time Taken: 31.08400869369507, Check: True -Test 17 -Success: 16, Sol Length: 26, Num Nodes: 558732, Time Taken: 38.94969081878662, Check: True -Test 18 -Success: 17, Sol Length: 25, Num Nodes: 528162, Time Taken: 36.700077533721924, Check: True -Test 19 -Success: 18, Sol Length: 21, Num Nodes: 410823, Time Taken: 27.677531719207764, Check: True -Test 20 -Success: 19, Sol Length: 27, Num Nodes: 588056, Time Taken: 40.83349347114563, Check: True -Test 21 -Success: 20, Sol Length: 23, Num Nodes: 470557, Time Taken: 32.485326051712036, Check: True -Test 22 -Success: 21, Sol Length: 23, Num Nodes: 470251, Time Taken: 32.5949170589447, Check: True -Test 23 -Success: 22, Sol Length: 28, Num Nodes: 619694, Time Taken: 45.812644243240356, Check: True -Test 24 -Success: 23, Sol Length: 25, Num Nodes: 529528, Time Taken: 37.01458764076233, Check: True -Test 25 -Success: 24, Sol Length: 24, Num Nodes: 498912, Time Taken: 34.645530700683594, Check: True -Test 26 -Success: 25, Sol Length: 24, Num Nodes: 499108, Time Taken: 34.99652624130249, Check: True -Test 27 -Success: 26, Sol Length: 24, Num Nodes: 497647, Time Taken: 34.452510356903076, Check: True -Test 28 -Success: 27, Sol Length: 29, Num Nodes: 652276, Time Taken: 46.289843797683716, Check: True -Test 29 -Success: 28, Sol Length: 25, Num Nodes: 529582, Time Taken: 37.06254696846008, Check: True -Test 30 -Success: 29, Sol Length: 24, Num Nodes: 499234, Time Taken: 34.502437353134155, Check: True -Test 31 -Success: 30, Sol Length: 25, Num Nodes: 529806, Time Taken: 37.181467056274414, Check: True -Test 32 -Success: 31, Sol Length: 25, Num Nodes: 529899, Time Taken: 36.83109211921692, Check: True -Test 33 -Success: 32, Sol Length: 27, Num Nodes: 588970, Time Taken: 41.30772852897644, Check: True -Test 34 -Success: 33, Sol Length: 24, Num Nodes: 499490, Time Taken: 34.360199213027954, Check: True -Test 35 -Success: 34, Sol Length: 22, Num Nodes: 440553, Time Taken: 30.074990034103394, Check: True -Test 36 -Success: 35, Sol Length: 25, Num Nodes: 530106, Time Taken: 36.68948221206665, Check: True -Test 37 -Success: 36, Sol Length: 24, Num Nodes: 500899, Time Taken: 34.25625252723694, Check: True -Test 38 -Success: 37, Sol Length: 25, Num Nodes: 528377, Time Taken: 36.58057880401611, Check: True -Test 39 -Success: 38, Sol Length: 28, Num Nodes: 619694, Time Taken: 43.100913286209106, Check: True -Test 40 -Success: 39, Sol Length: 29, Num Nodes: 651975, Time Taken: 46.089425563812256, Check: True -Test 41 -Success: 40, Sol Length: 25, Num Nodes: 529675, Time Taken: 36.43688702583313, Check: True -Test 42 -Success: 41, Sol Length: 22, Num Nodes: 439856, Time Taken: 29.63739824295044, Check: True -Test 43 -Success: 42, Sol Length: 30, Num Nodes: 683656, Time Taken: 48.44184970855713, Check: True -Test 44 -Success: 43, Sol Length: 21, Num Nodes: 413451, Time Taken: 27.93053150177002, Check: True -Test 45 -Success: 44, Sol Length: 24, Num Nodes: 499447, Time Taken: 34.136529207229614, Check: True -Test 46 -Success: 45, Sol Length: 30, Num Nodes: 684280, Time Taken: 48.456645011901855, Check: True -Test 47 -Success: 46, Sol Length: 27, Num Nodes: 589483, Time Taken: 41.40592122077942, Check: True -Test 48 -Success: 47, Sol Length: 21, Num Nodes: 412953, Time Taken: 27.95383071899414, Check: True -Test 49 -Success: 48, Sol Length: 26, Num Nodes: 559211, Time Taken: 38.72459292411804, Check: True -Test 50 -Success: 49, Sol Length: 26, Num Nodes: 559274, Time Taken: 38.635714292526245, Check: True -Test 51 -Success: 50, Sol Length: 29, Num Nodes: 650891, Time Taken: 45.810245990753174, Check: True -Test 52 -Success: 51, Sol Length: 27, Num Nodes: 589492, Time Taken: 41.35434579849243, Check: True -Test 53 -Success: 52, Sol Length: 26, Num Nodes: 560223, Time Taken: 38.66746664047241, Check: True -Test 54 -Success: 53, Sol Length: 26, Num Nodes: 559234, Time Taken: 39.05481696128845, Check: True -Test 55 -Success: 54, Sol Length: 27, Num Nodes: 590477, Time Taken: 40.901458978652954, Check: True -Test 56 -Success: 55, Sol Length: 24, Num Nodes: 497537, Time Taken: 33.97311496734619, Check: True -Test 57 -Success: 56, Sol Length: 27, Num Nodes: 589835, Time Taken: 41.63896131515503, Check: True -Test 58 -Success: 57, Sol Length: 29, Num Nodes: 652622, Time Taken: 45.98191976547241, Check: True -Test 59 -Success: 58, Sol Length: 26, Num Nodes: 558709, Time Taken: 39.665305376052856, Check: True -Test 60 -Success: 59, Sol Length: 25, Num Nodes: 529221, Time Taken: 36.74132037162781, Check: True -Test 61 -Success: 60, Sol Length: 22, Num Nodes: 440251, Time Taken: 30.123366117477417, Check: True -Test 62 -Success: 61, Sol Length: 24, Num Nodes: 500649, Time Taken: 34.514859199523926, Check: True -Test 63 -Success: 62, Sol Length: 19, Num Nodes: 356543, Time Taken: 23.955575704574585, Check: True -Test 64 -Success: 63, Sol Length: 24, Num Nodes: 499234, Time Taken: 34.28728127479553, Check: True -Test 65 -Success: 64, Sol Length: 30, Num Nodes: 682557, Time Taken: 47.35906672477722, Check: True -Test 66 -Test 67 -Test 68 -Success: 65, Sol Length: 23, Num Nodes: 470995, Time Taken: 32.48588538169861, Check: True -Test 69 -Success: 66, Sol Length: 23, Num Nodes: 469396, Time Taken: 31.861659049987793, Check: True -Test 70 -Success: 67, Sol Length: 24, Num Nodes: 500367, Time Taken: 34.71467971801758, Check: True -Test 71 -Success: 68, Sol Length: 26, Num Nodes: 560209, Time Taken: 38.751710414886475, Check: True -Test 72 -Success: 69, Sol Length: 25, Num Nodes: 530041, Time Taken: 36.78449273109436, Check: True -Test 73 -Success: 70, Sol Length: 29, Num Nodes: 652682, Time Taken: 45.95534586906433, Check: True -Test 74 -Success: 71, Sol Length: 25, Num Nodes: 526410, Time Taken: 35.98308277130127, Check: True -Test 75 -Success: 72, Sol Length: 26, Num Nodes: 559211, Time Taken: 38.74062895774841, Check: True -Test 76 -Success: 73, Sol Length: 26, Num Nodes: 559797, Time Taken: 38.79765057563782, Check: True -Test 77 -Success: 74, Sol Length: 20, Num Nodes: 384911, Time Taken: 25.938072443008423, Check: True -Test 78 -Success: 75, Sol Length: 24, Num Nodes: 500546, Time Taken: 35.908642053604126, Check: True -Test 79 -Success: 76, Sol Length: 25, Num Nodes: 528990, Time Taken: 38.57440114021301, Check: True -Test 80 -Success: 77, Sol Length: 25, Num Nodes: 529322, Time Taken: 38.8939163684845, Check: True -Test 81 -Success: 78, Sol Length: 26, Num Nodes: 559648, Time Taken: 40.62667894363403, Check: True -Test 82 -Success: 79, Sol Length: 24, Num Nodes: 498562, Time Taken: 36.009753942489624, Check: True -Test 83 -Success: 80, Sol Length: 25, Num Nodes: 529204, Time Taken: 38.277883768081665, Check: True -Test 84 -Success: 81, Sol Length: 24, Num Nodes: 499290, Time Taken: 35.844857931137085, Check: True -Test 85 -Success: 82, Sol Length: 21, Num Nodes: 412514, Time Taken: 28.386531591415405, Check: True -Test 86 -Success: 83, Sol Length: 24, Num Nodes: 500323, Time Taken: 37.37599205970764, Check: True -Test 87 -Success: 84, Sol Length: 25, Num Nodes: 529623, Time Taken: 39.43427801132202, Check: True -Test 88 -Success: 85, Sol Length: 25, Num Nodes: 529132, Time Taken: 38.09501314163208, Check: True -Test 89 -Success: 86, Sol Length: 32, Num Nodes: 746970, Time Taken: 55.017550230026245, Check: True -Test 90 -Success: 87, Sol Length: 25, Num Nodes: 529312, Time Taken: 37.18098282814026, Check: True -Test 91 -Success: 88, Sol Length: 21, Num Nodes: 413104, Time Taken: 28.12481713294983, Check: True -Test 92 -Success: 89, Sol Length: 24, Num Nodes: 500109, Time Taken: 34.32221531867981, Check: True -Test 93 -Success: 90, Sol Length: 23, Num Nodes: 470145, Time Taken: 33.11833167076111, Check: True -Test 94 -Success: 91, Sol Length: 23, Num Nodes: 470831, Time Taken: 36.53019976615906, Check: True -Test 95 -Success: 92, Sol Length: 29, Num Nodes: 650387, Time Taken: 46.95033001899719, Check: True -Test 96 -Success: 93, Sol Length: 23, Num Nodes: 468190, Time Taken: 31.7221999168396, Check: True -Test 97 -Success: 94, Sol Length: 27, Num Nodes: 588121, Time Taken: 42.15802836418152, Check: True -Test 98 -Success: 95, Sol Length: 23, Num Nodes: 471190, Time Taken: 32.481802225112915, Check: True -Test 99 -Success: 96, Sol Length: 26, Num Nodes: 558869, Time Taken: 40.458826780319214, Check: True -Test 100 -Success: 97, Sol Length: 24, Num Nodes: 499447, Time Taken: 35.14798140525818, Check: True -Success Rate: 0.97, Avg Sol Length: 24.938144329896907, Avg Num Nodes: 528378.2783505154, Avg Time Taken: 37.11815190069454 - -4096 35 (Nvidia RTX 3090 Desktop) -Test 1 -Success: 1, Sol Length: 24, Num Nodes: 1052747, Time Taken: 58.26063251495361, Check: True -Test 2 -Success: 2, Sol Length: 24, Num Nodes: 1052703, Time Taken: 58.24891185760498, Check: True -Test 3 -Success: 3, Sol Length: 24, Num Nodes: 1051956, Time Taken: 58.46200442314148, Check: True -Test 4 -Success: 4, Sol Length: 23, Num Nodes: 989790, Time Taken: 54.56381177902222, Check: True -Test 5 -Success: 5, Sol Length: 20, Num Nodes: 806287, Time Taken: 44.01784014701843, Check: True -Test 6 -Test 7 -Success: 6, Sol Length: 26, Num Nodes: 1179589, Time Taken: 65.90190505981445, Check: True -Test 8 -Success: 7, Sol Length: 22, Num Nodes: 927776, Time Taken: 51.08550977706909, Check: True -Test 9 -Success: 8, Sol Length: 23, Num Nodes: 990205, Time Taken: 54.64434790611267, Check: True -Test 10 -Success: 9, Sol Length: 26, Num Nodes: 1180062, Time Taken: 65.69973754882812, Check: True -Test 11 -Success: 10, Sol Length: 20, Num Nodes: 804851, Time Taken: 44.08194065093994, Check: True -Test 12 -Success: 11, Sol Length: 26, Num Nodes: 1174556, Time Taken: 65.80455088615417, Check: True -Test 13 -Success: 12, Sol Length: 24, Num Nodes: 1052896, Time Taken: 58.2788610458374, Check: True -Test 14 -Success: 13, Sol Length: 25, Num Nodes: 1113449, Time Taken: 61.9883975982666, Check: True -Test 15 -Success: 14, Sol Length: 22, Num Nodes: 925210, Time Taken: 51.03009223937988, Check: True -Test 16 -Success: 15, Sol Length: 22, Num Nodes: 924679, Time Taken: 50.691977977752686, Check: True -Test 17 -Success: 16, Sol Length: 26, Num Nodes: 1179385, Time Taken: 65.63757157325745, Check: True -Test 18 -Success: 17, Sol Length: 23, Num Nodes: 989791, Time Taken: 54.770686626434326, Check: True -Test 19 -Success: 18, Sol Length: 21, Num Nodes: 862467, Time Taken: 47.56537938117981, Check: True -Test 20 -Success: 19, Sol Length: 23, Num Nodes: 990241, Time Taken: 54.42944550514221, Check: True -Test 21 -Success: 20, Sol Length: 23, Num Nodes: 989538, Time Taken: 54.78221917152405, Check: True -Test 22 -Success: 21, Sol Length: 23, Num Nodes: 989745, Time Taken: 54.9204785823822, Check: True -Test 23 -Success: 22, Sol Length: 24, Num Nodes: 1051956, Time Taken: 58.549901723861694, Check: True -Test 24 -Success: 23, Sol Length: 25, Num Nodes: 1115812, Time Taken: 62.13523244857788, Check: True -Test 25 -Success: 24, Sol Length: 22, Num Nodes: 928008, Time Taken: 51.09775924682617, Check: True -Test 26 -Success: 25, Sol Length: 24, Num Nodes: 1050879, Time Taken: 58.122745752334595, Check: True -Test 27 -Success: 26, Sol Length: 24, Num Nodes: 1048505, Time Taken: 58.21392750740051, Check: True -Test 28 -Success: 27, Sol Length: 25, Num Nodes: 1115780, Time Taken: 62.32053256034851, Check: True -Test 29 -Success: 28, Sol Length: 23, Num Nodes: 989031, Time Taken: 54.59248399734497, Check: True -Test 30 -Success: 29, Sol Length: 24, Num Nodes: 1051612, Time Taken: 58.27411937713623, Check: True -Test 31 -Success: 30, Sol Length: 25, Num Nodes: 1116386, Time Taken: 61.693416357040405, Check: True -Test 32 -Success: 31, Sol Length: 25, Num Nodes: 1116576, Time Taken: 61.79654574394226, Check: True -Test 33 -Success: 32, Sol Length: 27, Num Nodes: 1242757, Time Taken: 69.41909289360046, Check: True -Test 34 -Success: 33, Sol Length: 20, Num Nodes: 807840, Time Taken: 44.020151138305664, Check: True -Test 35 -Success: 34, Sol Length: 22, Num Nodes: 926410, Time Taken: 50.689780473709106, Check: True -Test 36 -Success: 35, Sol Length: 25, Num Nodes: 1115802, Time Taken: 61.75059461593628, Check: True -Test 37 -Success: 36, Sol Length: 24, Num Nodes: 1053379, Time Taken: 58.32229495048523, Check: True -Test 38 -Success: 37, Sol Length: 25, Num Nodes: 1114830, Time Taken: 61.74846601486206, Check: True -Test 39 -Success: 38, Sol Length: 24, Num Nodes: 1051956, Time Taken: 58.30273723602295, Check: True -Test 40 -Success: 39, Sol Length: 29, Num Nodes: 1377919, Time Taken: 76.9365222454071, Check: True -Test 41 -Success: 40, Sol Length: 25, Num Nodes: 1117049, Time Taken: 61.78914523124695, Check: True -Test 42 -Success: 41, Sol Length: 22, Num Nodes: 925042, Time Taken: 50.64628314971924, Check: True -Test 43 -Success: 42, Sol Length: 26, Num Nodes: 1181144, Time Taken: 65.55137825012207, Check: True -Test 44 -Success: 43, Sol Length: 19, Num Nodes: 748017, Time Taken: 40.53963875770569, Check: True -Test 45 -Success: 44, Sol Length: 24, Num Nodes: 1052899, Time Taken: 58.07765984535217, Check: True -Test 46 -Success: 45, Sol Length: 30, Num Nodes: 1447470, Time Taken: 81.51168632507324, Check: True -Test 47 -Success: 46, Sol Length: 23, Num Nodes: 987546, Time Taken: 54.531414270401, Check: True -Test 48 -Success: 47, Sol Length: 21, Num Nodes: 866232, Time Taken: 47.43855619430542, Check: True -Test 49 -Success: 48, Sol Length: 20, Num Nodes: 806750, Time Taken: 43.90981197357178, Check: True -Test 50 -Success: 49, Sol Length: 24, Num Nodes: 1052369, Time Taken: 57.95234537124634, Check: True -Test 51 -Success: 50, Sol Length: 25, Num Nodes: 1115313, Time Taken: 62.154613733291626, Check: True -Test 52 -Success: 51, Sol Length: 27, Num Nodes: 1245776, Time Taken: 69.29116320610046, Check: True -Test 53 -Success: 52, Sol Length: 24, Num Nodes: 1052300, Time Taken: 58.23576307296753, Check: True -Test 54 -Success: 53, Sol Length: 26, Num Nodes: 1175709, Time Taken: 65.35066390037537, Check: True -Test 55 -Success: 54, Sol Length: 23, Num Nodes: 987761, Time Taken: 54.72682213783264, Check: True -Test 56 -Success: 55, Sol Length: 24, Num Nodes: 1049470, Time Taken: 57.8340482711792, Check: True -Test 57 -Success: 56, Sol Length: 29, Num Nodes: 1379912, Time Taken: 77.12940907478333, Check: True -Test 58 -Success: 57, Sol Length: 23, Num Nodes: 991147, Time Taken: 54.7116436958313, Check: True -Test 59 -Success: 58, Sol Length: 26, Num Nodes: 1178517, Time Taken: 65.71245121955872, Check: True -Test 60 -Success: 59, Sol Length: 25, Num Nodes: 1115304, Time Taken: 61.52326822280884, Check: True -Test 61 -Success: 60, Sol Length: 22, Num Nodes: 924993, Time Taken: 50.716662883758545, Check: True -Test 62 -Success: 61, Sol Length: 24, Num Nodes: 1052917, Time Taken: 58.365092754364014, Check: True -Test 63 -Success: 62, Sol Length: 19, Num Nodes: 744600, Time Taken: 40.514153480529785, Check: True -Test 64 -Success: 63, Sol Length: 24, Num Nodes: 1051612, Time Taken: 58.3204231262207, Check: True -Test 65 -Success: 64, Sol Length: 28, Num Nodes: 1309501, Time Taken: 72.95184445381165, Check: True -Test 66 -Success: 65, Sol Length: 30, Num Nodes: 1444856, Time Taken: 81.44610786437988, Check: True -Test 67 -Test 68 -Success: 66, Sol Length: 23, Num Nodes: 990837, Time Taken: 54.474059104919434, Check: True -Test 69 -Success: 67, Sol Length: 23, Num Nodes: 987762, Time Taken: 54.509292125701904, Check: True -Test 70 -Success: 68, Sol Length: 24, Num Nodes: 1051066, Time Taken: 57.94671893119812, Check: True -Test 71 -Success: 69, Sol Length: 26, Num Nodes: 1181933, Time Taken: 65.88366723060608, Check: True -Test 72 -Success: 70, Sol Length: 23, Num Nodes: 989784, Time Taken: 54.413463830947876, Check: True -Test 73 -Success: 71, Sol Length: 25, Num Nodes: 1116895, Time Taken: 62.03286385536194, Check: True -Test 74 -Success: 72, Sol Length: 23, Num Nodes: 985892, Time Taken: 54.35404682159424, Check: True -Test 75 -Success: 73, Sol Length: 20, Num Nodes: 806750, Time Taken: 44.00913739204407, Check: True -Test 76 -Success: 74, Sol Length: 26, Num Nodes: 1181833, Time Taken: 65.4790415763855, Check: True -Test 77 -Success: 75, Sol Length: 20, Num Nodes: 804751, Time Taken: 44.14807653427124, Check: True -Test 78 -Success: 76, Sol Length: 22, Num Nodes: 928652, Time Taken: 51.18851828575134, Check: True -Test 79 -Success: 77, Sol Length: 23, Num Nodes: 990376, Time Taken: 54.858670711517334, Check: True -Test 80 -Success: 78, Sol Length: 25, Num Nodes: 1115316, Time Taken: 61.41172194480896, Check: True -Test 81 -Success: 79, Sol Length: 24, Num Nodes: 1051988, Time Taken: 58.390984773635864, Check: True -Test 82 -Success: 80, Sol Length: 24, Num Nodes: 1050081, Time Taken: 58.10263013839722, Check: True -Test 83 -Success: 81, Sol Length: 21, Num Nodes: 867411, Time Taken: 47.474709272384644, Check: True -Test 84 -Success: 82, Sol Length: 24, Num Nodes: 1051541, Time Taken: 58.03595495223999, Check: True -Test 85 -Success: 83, Sol Length: 21, Num Nodes: 865974, Time Taken: 47.48958444595337, Check: True -Test 86 -Success: 84, Sol Length: 24, Num Nodes: 1053044, Time Taken: 58.52797889709473, Check: True -Test 87 -Success: 85, Sol Length: 23, Num Nodes: 990718, Time Taken: 54.586281538009644, Check: True -Test 88 -Success: 86, Sol Length: 25, Num Nodes: 1115595, Time Taken: 61.83569049835205, Check: True -Test 89 -Success: 87, Sol Length: 28, Num Nodes: 1311200, Time Taken: 73.8998293876648, Check: True -Test 90 -Success: 88, Sol Length: 25, Num Nodes: 1114877, Time Taken: 62.2085485458374, Check: True -Test 91 -Success: 89, Sol Length: 21, Num Nodes: 866404, Time Taken: 47.58418607711792, Check: True -Test 92 -Success: 90, Sol Length: 22, Num Nodes: 928095, Time Taken: 51.006924867630005, Check: True -Test 93 -Success: 91, Sol Length: 23, Num Nodes: 988811, Time Taken: 54.21239185333252, Check: True -Test 94 -Success: 92, Sol Length: 23, Num Nodes: 990155, Time Taken: 54.69894075393677, Check: True -Test 95 -Success: 93, Sol Length: 25, Num Nodes: 1114813, Time Taken: 61.720720529556274, Check: True -Test 96 -Success: 94, Sol Length: 21, Num Nodes: 864528, Time Taken: 47.39989495277405, Check: True -Test 97 -Success: 95, Sol Length: 27, Num Nodes: 1243165, Time Taken: 69.0521719455719, Check: True -Test 98 -Success: 96, Sol Length: 23, Num Nodes: 989689, Time Taken: 54.662583351135254, Check: True -Test 99 -Success: 97, Sol Length: 24, Num Nodes: 1051527, Time Taken: 58.13950181007385, Check: True -Test 100 -Success: 98, Sol Length: 24, Num Nodes: 1052899, Time Taken: 58.30851125717163, Check: True -Success Rate: 0.98, Avg Sol Length: 23.8265306122449, Avg Num Nodes: 1042876.8265306122, Avg Time Taken: 57.71257097137217 - -10000 100 (Nvidia RTX 3090 Desktop) -Test 1 -Success: 1, Sol Length: 24, Num Nodes: 2546203, Time Taken: 150.3924217224121, Check: True -Test 2 -Success: 2, Sol Length: 26, Num Nodes: 2850504, Time Taken: 169.30754399299622, Check: True -Test 3 -Success: 3, Sol Length: 24, Num Nodes: 2544918, Time Taken: 150.4796757698059, Check: True -Test 4 -Success: 4, Sol Length: 23, Num Nodes: 2392558, Time Taken: 139.24275374412537, Check: True -Test 5 -Success: 5, Sol Length: 20, Num Nodes: 1945900, Time Taken: 113.08590316772461, Check: True -Test 6 -Success: 6, Sol Length: 23, Num Nodes: 2389774, Time Taken: 140.48485326766968, Check: True -Test 7 -Success: 7, Sol Length: 24, Num Nodes: 2543393, Time Taken: 149.86677432060242, Check: True -Test 8 -Success: 8, Sol Length: 22, Num Nodes: 2240385, Time Taken: 130.59731459617615, Check: True -Test 9 -Success: 9, Sol Length: 23, Num Nodes: 2392962, Time Taken: 140.52235436439514, Check: True -Test 10 -Success: 10, Sol Length: 24, Num Nodes: 2545884, Time Taken: 150.14501643180847, Check: True -Test 11 -Success: 11, Sol Length: 20, Num Nodes: 1942600, Time Taken: 111.87690734863281, Check: True -Test 12 -Success: 12, Sol Length: 26, Num Nodes: 2849989, Time Taken: 168.93788313865662, Check: True -Test 13 -Success: 13, Sol Length: 24, Num Nodes: 2545959, Time Taken: 150.1045024394989, Check: True -Test 14 -Success: 14, Sol Length: 25, Num Nodes: 2698275, Time Taken: 159.01820921897888, Check: True -Test 15 -Success: 15, Sol Length: 22, Num Nodes: 2236866, Time Taken: 129.69500541687012, Check: True -Test 16 -Success: 16, Sol Length: 22, Num Nodes: 2238405, Time Taken: 130.32516312599182, Check: True -Test 17 -Success: 17, Sol Length: 24, Num Nodes: 2546725, Time Taken: 150.2199809551239, Check: True -Test 18 -Success: 18, Sol Length: 23, Num Nodes: 2392899, Time Taken: 139.54966688156128, Check: True -Test 19 -Success: 19, Sol Length: 21, Num Nodes: 2087602, Time Taken: 121.01846051216125, Check: True -Test 20 -Success: 20, Sol Length: 23, Num Nodes: 2394411, Time Taken: 139.98764562606812, Check: True -Test 21 -Success: 21, Sol Length: 23, Num Nodes: 2391553, Time Taken: 140.4973020553589, Check: True -Test 22 -Success: 22, Sol Length: 23, Num Nodes: 2393026, Time Taken: 140.18401336669922, Check: True -Test 23 -Success: 23, Sol Length: 24, Num Nodes: 2544918, Time Taken: 150.6323001384735, Check: True -Test 24 -Success: 24, Sol Length: 25, Num Nodes: 2700778, Time Taken: 160.1432328224182, Check: True -Test 25 -Success: 25, Sol Length: 22, Num Nodes: 2241295, Time Taken: 130.9616208076477, Check: True -Test 26 -Success: 26, Sol Length: 24, Num Nodes: 2541556, Time Taken: 149.5921812057495, Check: True -Test 27 -Success: 27, Sol Length: 24, Num Nodes: 2539158, Time Taken: 149.83561730384827, Check: True -Test 28 -Success: 28, Sol Length: 23, Num Nodes: 2392669, Time Taken: 140.7321527004242, Check: True -Test 29 -Success: 29, Sol Length: 23, Num Nodes: 2390071, Time Taken: 140.57737731933594, Check: True -Test 30 -Success: 30, Sol Length: 24, Num Nodes: 2540189, Time Taken: 149.74364805221558, Check: True -Test 31 -Success: 31, Sol Length: 25, Num Nodes: 2693059, Time Taken: 159.90191888809204, Check: True -Test 32 -Success: 32, Sol Length: 23, Num Nodes: 2393702, Time Taken: 139.9318118095398, Check: True -Test 33 -Success: 33, Sol Length: 23, Num Nodes: 2389711, Time Taken: 140.76714777946472, Check: True -Test 34 -Success: 34, Sol Length: 20, Num Nodes: 1948785, Time Taken: 113.19802808761597, Check: True -Test 35 -Success: 35, Sol Length: 22, Num Nodes: 2237468, Time Taken: 130.6968400478363, Check: True -Test 36 -Success: 36, Sol Length: 25, Num Nodes: 2701064, Time Taken: 159.37949466705322, Check: True -Test 37 -Success: 37, Sol Length: 24, Num Nodes: 2546148, Time Taken: 149.0124797821045, Check: True -Test 38 -Success: 38, Sol Length: 25, Num Nodes: 2699244, Time Taken: 160.45880150794983, Check: True -Test 39 -Success: 39, Sol Length: 24, Num Nodes: 2544918, Time Taken: 149.75560665130615, Check: True -Test 40 -Success: 40, Sol Length: 25, Num Nodes: 2700023, Time Taken: 159.4134485721588, Check: True -Test 41 -Success: 41, Sol Length: 23, Num Nodes: 2393826, Time Taken: 140.12403178215027, Check: True -Test 42 -Success: 42, Sol Length: 22, Num Nodes: 2237380, Time Taken: 130.35105347633362, Check: True -Test 43 -Success: 43, Sol Length: 26, Num Nodes: 2857415, Time Taken: 169.66071701049805, Check: True -Test 44 -Success: 44, Sol Length: 19, Num Nodes: 1801706, Time Taken: 104.21386551856995, Check: True -Test 45 -Success: 45, Sol Length: 22, Num Nodes: 2242674, Time Taken: 131.40223288536072, Check: True -Test 46 -Success: 46, Sol Length: 24, Num Nodes: 2548770, Time Taken: 150.60494661331177, Check: True -Test 47 -Success: 47, Sol Length: 23, Num Nodes: 2390557, Time Taken: 139.50325298309326, Check: True -Test 48 -Success: 48, Sol Length: 21, Num Nodes: 2093716, Time Taken: 121.14900469779968, Check: True -Test 49 -Success: 49, Sol Length: 20, Num Nodes: 1947659, Time Taken: 113.70105385780334, Check: True -Test 50 -Success: 50, Sol Length: 22, Num Nodes: 2240855, Time Taken: 130.61431574821472, Check: True -Test 51 -Success: 51, Sol Length: 23, Num Nodes: 2392103, Time Taken: 141.67839336395264, Check: True -Test 52 -Success: 52, Sol Length: 25, Num Nodes: 2699644, Time Taken: 160.14928126335144, Check: True -Test 53 -Success: 53, Sol Length: 24, Num Nodes: 2545085, Time Taken: 149.85076761245728, Check: True -Test 54 -Success: 54, Sol Length: 24, Num Nodes: 2546919, Time Taken: 150.987158536911, Check: True -Test 55 -Success: 55, Sol Length: 23, Num Nodes: 2389601, Time Taken: 139.94578194618225, Check: True -Test 56 -Success: 56, Sol Length: 24, Num Nodes: 2541267, Time Taken: 150.0502531528473, Check: True -Test 57 -Success: 57, Sol Length: 25, Num Nodes: 2700728, Time Taken: 159.56839323043823, Check: True -Test 58 -Success: 58, Sol Length: 23, Num Nodes: 2394830, Time Taken: 140.672842502594, Check: True -Test 59 -Success: 59, Sol Length: 22, Num Nodes: 2236802, Time Taken: 130.1795039176941, Check: True -Test 60 -Success: 60, Sol Length: 25, Num Nodes: 2699270, Time Taken: 159.30123162269592, Check: True -Test 61 -Success: 61, Sol Length: 22, Num Nodes: 2237644, Time Taken: 130.6851086616516, Check: True -Test 62 -Success: 62, Sol Length: 24, Num Nodes: 2546814, Time Taken: 149.36202216148376, Check: True -Test 63 -Success: 63, Sol Length: 19, Num Nodes: 1798160, Time Taken: 103.5379159450531, Check: True -Test 64 -Success: 64, Sol Length: 24, Num Nodes: 2540189, Time Taken: 148.79802894592285, Check: True -Test 65 -Success: 65, Sol Length: 22, Num Nodes: 2243492, Time Taken: 131.85144019126892, Check: True -Test 66 -Success: 66, Sol Length: 26, Num Nodes: 2854373, Time Taken: 170.40193367004395, Check: True -Test 67 -Success: 67, Sol Length: 23, Num Nodes: 2389774, Time Taken: 140.42329478263855, Check: True -Test 68 -Success: 68, Sol Length: 23, Num Nodes: 2394292, Time Taken: 140.53163695335388, Check: True -Test 69 -Success: 69, Sol Length: 23, Num Nodes: 2385209, Time Taken: 139.66554594039917, Check: True -Test 70 -Success: 70, Sol Length: 24, Num Nodes: 2539936, Time Taken: 149.22537875175476, Check: True -Test 71 -Success: 71, Sol Length: 24, Num Nodes: 2546684, Time Taken: 149.81007552146912, Check: True -Test 72 -Success: 72, Sol Length: 21, Num Nodes: 2093521, Time Taken: 121.28052806854248, Check: True -Test 73 -Success: 73, Sol Length: 25, Num Nodes: 2703191, Time Taken: 159.99190402030945, Check: True -Test 74 -Success: 74, Sol Length: 23, Num Nodes: 2387582, Time Taken: 139.34448194503784, Check: True -Test 75 -Success: 75, Sol Length: 20, Num Nodes: 1947659, Time Taken: 112.63445973396301, Check: True -Test 76 -Success: 76, Sol Length: 24, Num Nodes: 2547010, Time Taken: 149.35952377319336, Check: True -Test 77 -Success: 77, Sol Length: 20, Num Nodes: 1941911, Time Taken: 112.4730179309845, Check: True -Test 78 -Success: 78, Sol Length: 22, Num Nodes: 2241855, Time Taken: 130.99434423446655, Check: True -Test 79 -Success: 79, Sol Length: 23, Num Nodes: 2392560, Time Taken: 139.91643571853638, Check: True -Test 80 -Success: 80, Sol Length: 23, Num Nodes: 2392183, Time Taken: 140.9674882888794, Check: True -Test 81 -Success: 81, Sol Length: 24, Num Nodes: 2545150, Time Taken: 150.49388933181763, Check: True -Test 82 -Success: 82, Sol Length: 24, Num Nodes: 2541551, Time Taken: 149.08097910881042, Check: True -Test 83 -Success: 83, Sol Length: 21, Num Nodes: 2096336, Time Taken: 122.89620232582092, Check: True -Test 84 -Success: 84, Sol Length: 24, Num Nodes: 2543168, Time Taken: 150.09113693237305, Check: True -Test 85 -Success: 85, Sol Length: 21, Num Nodes: 2091068, Time Taken: 121.95763635635376, Check: True -Test 86 -Success: 86, Sol Length: 22, Num Nodes: 2242772, Time Taken: 130.82773184776306, Check: True -Test 87 -Success: 87, Sol Length: 23, Num Nodes: 2394301, Time Taken: 140.54164147377014, Check: True -Test 88 -Success: 88, Sol Length: 25, Num Nodes: 2694809, Time Taken: 159.2472860813141, Check: True -Test 89 -Success: 89, Sol Length: 22, Num Nodes: 2243229, Time Taken: 131.4989948272705, Check: True -Test 90 -Success: 90, Sol Length: 25, Num Nodes: 2700211, Time Taken: 160.03221607208252, Check: True -Test 91 -Success: 91, Sol Length: 21, Num Nodes: 2090574, Time Taken: 121.66300535202026, Check: True -Test 92 -Success: 92, Sol Length: 22, Num Nodes: 2242643, Time Taken: 130.78435277938843, Check: True -Test 93 -Success: 93, Sol Length: 23, Num Nodes: 2391339, Time Taken: 139.70301222801208, Check: True -Test 94 -Success: 94, Sol Length: 21, Num Nodes: 2095724, Time Taken: 121.4561836719513, Check: True -Test 95 -Success: 95, Sol Length: 25, Num Nodes: 2697170, Time Taken: 159.39984273910522, Check: True -Test 96 -Success: 96, Sol Length: 21, Num Nodes: 2089629, Time Taken: 121.33023643493652, Check: True -Test 97 -Success: 97, Sol Length: 27, Num Nodes: 3017191, Time Taken: 179.18511533737183, Check: True -Test 98 -Success: 98, Sol Length: 23, Num Nodes: 2390057, Time Taken: 139.4095423221588, Check: True -Test 99 -Success: 99, Sol Length: 24, Num Nodes: 2544140, Time Taken: 148.83701992034912, Check: True -Test 100 -Success: 100, Sol Length: 22, Num Nodes: 2242674, Time Taken: 130.87133288383484, Check: True -Success Rate: 1.0, Avg Sol Length: 23.09, Avg Num Nodes: 2407741.29, Avg Time Taken: 141.34543064594268 - -15000 100 (RTX 3090) diff --git a/results/Beam_Search/results.txt b/results/Beam_Search/results.txt new file mode 100644 index 0000000..6eec8e0 --- /dev/null +++ b/results/Beam_Search/results.txt @@ -0,0 +1,579 @@ +1000 100 (Nvidia RTX 3090 Desktop) +Test 1 +Test 2 +Success: 1, Sol Length: 30, Num Nodes: 288582, Time Taken: 15.78855586051941, Check: True +Test 3 +Test 4 +Success: 2, Sol Length: 27, Num Nodes: 253119, Time Taken: 14.0291588306427, Check: True +Test 5 +Test 6 +Test 7 +Success: 3, Sol Length: 30, Num Nodes: 286890, Time Taken: 15.775588274002075, Check: True +Test 8 +Success: 4, Sol Length: 26, Num Nodes: 241902, Time Taken: 13.394730567932129, Check: True +Test 9 +Success: 5, Sol Length: 25, Num Nodes: 231133, Time Taken: 12.727867603302002, Check: True +Test 10 +Test 11 +Success: 6, Sol Length: 22, Num Nodes: 198870, Time Taken: 10.910291910171509, Check: True +Test 12 +Test 13 +Success: 7, Sol Length: 24, Num Nodes: 220070, Time Taken: 12.220187187194824, Check: True +Test 14 +Success: 8, Sol Length: 25, Num Nodes: 231130, Time Taken: 12.891440391540527, Check: True +Test 15 +Test 16 +Success: 9, Sol Length: 26, Num Nodes: 242087, Time Taken: 13.136317014694214, Check: True +Test 17 +Success: 10, Sol Length: 26, Num Nodes: 242080, Time Taken: 13.418610572814941, Check: True +Test 18 +Success: 11, Sol Length: 25, Num Nodes: 231245, Time Taken: 12.745849609375, Check: True +Test 19 +Success: 12, Sol Length: 21, Num Nodes: 187836, Time Taken: 10.207890510559082, Check: True +Test 20 +Success: 13, Sol Length: 29, Num Nodes: 276699, Time Taken: 15.093127489089966, Check: True +Test 21 +Success: 14, Sol Length: 25, Num Nodes: 231299, Time Taken: 12.755539894104004, Check: True +Test 22 +Success: 15, Sol Length: 27, Num Nodes: 253163, Time Taken: 14.01259183883667, Check: True +Test 23 +Test 24 +Success: 16, Sol Length: 29, Num Nodes: 275767, Time Taken: 15.235763549804688, Check: True +Test 25 +Success: 17, Sol Length: 24, Num Nodes: 220448, Time Taken: 12.143386602401733, Check: True +Test 26 +Success: 18, Sol Length: 24, Num Nodes: 220005, Time Taken: 12.261693477630615, Check: True +Test 27 +Success: 19, Sol Length: 24, Num Nodes: 220454, Time Taken: 12.269122838973999, Check: True +Test 28 +Success: 20, Sol Length: 31, Num Nodes: 295960, Time Taken: 16.295698881149292, Check: True +Test 29 +Success: 21, Sol Length: 25, Num Nodes: 231851, Time Taken: 12.9435453414917, Check: True +Test 30 +Success: 22, Sol Length: 30, Num Nodes: 286373, Time Taken: 15.98395586013794, Check: True +Test 31 +Test 32 +Success: 23, Sol Length: 25, Num Nodes: 231338, Time Taken: 12.77433156967163, Check: True +Test 33 +Success: 24, Sol Length: 27, Num Nodes: 252553, Time Taken: 13.852831602096558, Check: True +Test 34 +Test 35 +Success: 25, Sol Length: 22, Num Nodes: 198612, Time Taken: 10.94997239112854, Check: True +Test 36 +Success: 26, Sol Length: 29, Num Nodes: 275151, Time Taken: 15.262463808059692, Check: True +Test 37 +Test 38 +Test 39 +Test 40 +Test 41 +Test 42 +Success: 27, Sol Length: 22, Num Nodes: 197334, Time Taken: 10.84691572189331, Check: True +Test 43 +Test 44 +Success: 28, Sol Length: 23, Num Nodes: 209254, Time Taken: 11.572306632995605, Check: True +Test 45 +Test 46 +Test 47 +Success: 29, Sol Length: 31, Num Nodes: 298173, Time Taken: 16.355769872665405, Check: True +Test 48 +Success: 30, Sol Length: 21, Num Nodes: 187053, Time Taken: 10.441342830657959, Check: True +Test 49 +Success: 31, Sol Length: 28, Num Nodes: 264305, Time Taken: 14.73845648765564, Check: True +Test 50 +Success: 32, Sol Length: 26, Num Nodes: 246420, Time Taken: 13.585889101028442, Check: True +Test 51 +Test 52 +Success: 33, Sol Length: 31, Num Nodes: 294615, Time Taken: 16.2382709980011, Check: True +Test 53 +Test 54 +Success: 34, Sol Length: 26, Num Nodes: 242485, Time Taken: 13.439046382904053, Check: True +Test 55 +Test 56 +Test 57 +Success: 35, Sol Length: 27, Num Nodes: 253245, Time Taken: 14.03161072731018, Check: True +Test 58 +Success: 36, Sol Length: 29, Num Nodes: 277015, Time Taken: 15.439815282821655, Check: True +Test 59 +Success: 37, Sol Length: 26, Num Nodes: 241320, Time Taken: 13.346522331237793, Check: True +Test 60 +Success: 38, Sol Length: 31, Num Nodes: 301706, Time Taken: 16.44365429878235, Check: True +Test 61 +Success: 39, Sol Length: 24, Num Nodes: 220220, Time Taken: 12.15497374534607, Check: True +Test 62 +Success: 40, Sol Length: 24, Num Nodes: 220842, Time Taken: 12.212857484817505, Check: True +Test 63 +Success: 41, Sol Length: 19, Num Nodes: 165215, Time Taken: 9.087714672088623, Check: True +Test 64 +Success: 42, Sol Length: 30, Num Nodes: 286373, Time Taken: 15.747759580612183, Check: True +Test 65 +Test 66 +Test 67 +Test 68 +Success: 43, Sol Length: 23, Num Nodes: 209952, Time Taken: 11.76227879524231, Check: True +Test 69 +Success: 44, Sol Length: 23, Num Nodes: 210199, Time Taken: 11.550071239471436, Check: True +Test 70 +Success: 45, Sol Length: 24, Num Nodes: 220186, Time Taken: 12.22213339805603, Check: True +Test 71 +Test 72 +Test 73 +Test 74 +Success: 46, Sol Length: 25, Num Nodes: 231378, Time Taken: 12.699888467788696, Check: True +Test 75 +Success: 47, Sol Length: 28, Num Nodes: 264305, Time Taken: 14.590750932693481, Check: True +Test 76 +Test 77 +Success: 48, Sol Length: 20, Num Nodes: 176534, Time Taken: 9.841034650802612, Check: True +Test 78 +Success: 49, Sol Length: 24, Num Nodes: 220267, Time Taken: 12.320991039276123, Check: True +Test 79 +Success: 50, Sol Length: 25, Num Nodes: 231455, Time Taken: 12.891523599624634, Check: True +Test 80 +Test 81 +Success: 51, Sol Length: 26, Num Nodes: 240651, Time Taken: 13.422890186309814, Check: True +Test 82 +Success: 52, Sol Length: 24, Num Nodes: 220548, Time Taken: 12.416397333145142, Check: True +Test 83 +Success: 53, Sol Length: 33, Num Nodes: 319409, Time Taken: 17.71880316734314, Check: True +Test 84 +Success: 54, Sol Length: 24, Num Nodes: 219974, Time Taken: 12.272696733474731, Check: True +Test 85 +Success: 55, Sol Length: 21, Num Nodes: 187770, Time Taken: 10.519684791564941, Check: True +Test 86 +Success: 56, Sol Length: 24, Num Nodes: 220459, Time Taken: 12.349560499191284, Check: True +Test 87 +Test 88 +Success: 57, Sol Length: 27, Num Nodes: 253658, Time Taken: 14.577183485031128, Check: True +Test 89 +Test 90 +Success: 58, Sol Length: 31, Num Nodes: 296964, Time Taken: 17.16541886329651, Check: True +Test 91 +Success: 59, Sol Length: 21, Num Nodes: 187215, Time Taken: 10.873493432998657, Check: True +Test 92 +Success: 60, Sol Length: 28, Num Nodes: 264500, Time Taken: 15.365609407424927, Check: True +Test 93 +Success: 61, Sol Length: 23, Num Nodes: 209549, Time Taken: 12.248621225357056, Check: True +Test 94 +Test 95 +Success: 62, Sol Length: 29, Num Nodes: 275314, Time Taken: 15.974087715148926, Check: True +Test 96 +Success: 63, Sol Length: 23, Num Nodes: 209177, Time Taken: 12.256770133972168, Check: True +Test 97 +Success: 64, Sol Length: 29, Num Nodes: 275623, Time Taken: 16.132275342941284, Check: True +Test 98 +Success: 65, Sol Length: 23, Num Nodes: 209197, Time Taken: 12.180160522460938, Check: True +Test 99 +Test 100 + + +2500 100 (Nvidia RTX 2060) + + +5000 100 without Adaptive Strategy (Nvidia RTX 3090) + + +10000 100 (Nvidia RTX 3090 Desktop) +Test 1 +Success: 1, Sol Length: 24, Num Nodes: 2546203, Time Taken: 150.3924217224121, Check: True +Test 2 +Success: 2, Sol Length: 26, Num Nodes: 2850504, Time Taken: 169.30754399299622, Check: True +Test 3 +Success: 3, Sol Length: 24, Num Nodes: 2544918, Time Taken: 150.4796757698059, Check: True +Test 4 +Success: 4, Sol Length: 23, Num Nodes: 2392558, Time Taken: 139.24275374412537, Check: True +Test 5 +Success: 5, Sol Length: 20, Num Nodes: 1945900, Time Taken: 113.08590316772461, Check: True +Test 6 +Success: 6, Sol Length: 23, Num Nodes: 2389774, Time Taken: 140.48485326766968, Check: True +Test 7 +Success: 7, Sol Length: 24, Num Nodes: 2543393, Time Taken: 149.86677432060242, Check: True +Test 8 +Success: 8, Sol Length: 22, Num Nodes: 2240385, Time Taken: 130.59731459617615, Check: True +Test 9 +Success: 9, Sol Length: 23, Num Nodes: 2392962, Time Taken: 140.52235436439514, Check: True +Test 10 +Success: 10, Sol Length: 24, Num Nodes: 2545884, Time Taken: 150.14501643180847, Check: True +Test 11 +Success: 11, Sol Length: 20, Num Nodes: 1942600, Time Taken: 111.87690734863281, Check: True +Test 12 +Success: 12, Sol Length: 26, Num Nodes: 2849989, Time Taken: 168.93788313865662, Check: True +Test 13 +Success: 13, Sol Length: 24, Num Nodes: 2545959, Time Taken: 150.1045024394989, Check: True +Test 14 +Success: 14, Sol Length: 25, Num Nodes: 2698275, Time Taken: 159.01820921897888, Check: True +Test 15 +Success: 15, Sol Length: 22, Num Nodes: 2236866, Time Taken: 129.69500541687012, Check: True +Test 16 +Success: 16, Sol Length: 22, Num Nodes: 2238405, Time Taken: 130.32516312599182, Check: True +Test 17 +Success: 17, Sol Length: 24, Num Nodes: 2546725, Time Taken: 150.2199809551239, Check: True +Test 18 +Success: 18, Sol Length: 23, Num Nodes: 2392899, Time Taken: 139.54966688156128, Check: True +Test 19 +Success: 19, Sol Length: 21, Num Nodes: 2087602, Time Taken: 121.01846051216125, Check: True +Test 20 +Success: 20, Sol Length: 23, Num Nodes: 2394411, Time Taken: 139.98764562606812, Check: True +Test 21 +Success: 21, Sol Length: 23, Num Nodes: 2391553, Time Taken: 140.4973020553589, Check: True +Test 22 +Success: 22, Sol Length: 23, Num Nodes: 2393026, Time Taken: 140.18401336669922, Check: True +Test 23 +Success: 23, Sol Length: 24, Num Nodes: 2544918, Time Taken: 150.6323001384735, Check: True +Test 24 +Success: 24, Sol Length: 25, Num Nodes: 2700778, Time Taken: 160.1432328224182, Check: True +Test 25 +Success: 25, Sol Length: 22, Num Nodes: 2241295, Time Taken: 130.9616208076477, Check: True +Test 26 +Success: 26, Sol Length: 24, Num Nodes: 2541556, Time Taken: 149.5921812057495, Check: True +Test 27 +Success: 27, Sol Length: 24, Num Nodes: 2539158, Time Taken: 149.83561730384827, Check: True +Test 28 +Success: 28, Sol Length: 23, Num Nodes: 2392669, Time Taken: 140.7321527004242, Check: True +Test 29 +Success: 29, Sol Length: 23, Num Nodes: 2390071, Time Taken: 140.57737731933594, Check: True +Test 30 +Success: 30, Sol Length: 24, Num Nodes: 2540189, Time Taken: 149.74364805221558, Check: True +Test 31 +Success: 31, Sol Length: 25, Num Nodes: 2693059, Time Taken: 159.90191888809204, Check: True +Test 32 +Success: 32, Sol Length: 23, Num Nodes: 2393702, Time Taken: 139.9318118095398, Check: True +Test 33 +Success: 33, Sol Length: 23, Num Nodes: 2389711, Time Taken: 140.76714777946472, Check: True +Test 34 +Success: 34, Sol Length: 20, Num Nodes: 1948785, Time Taken: 113.19802808761597, Check: True +Test 35 +Success: 35, Sol Length: 22, Num Nodes: 2237468, Time Taken: 130.6968400478363, Check: True +Test 36 +Success: 36, Sol Length: 25, Num Nodes: 2701064, Time Taken: 159.37949466705322, Check: True +Test 37 +Success: 37, Sol Length: 24, Num Nodes: 2546148, Time Taken: 149.0124797821045, Check: True +Test 38 +Success: 38, Sol Length: 25, Num Nodes: 2699244, Time Taken: 160.45880150794983, Check: True +Test 39 +Success: 39, Sol Length: 24, Num Nodes: 2544918, Time Taken: 149.75560665130615, Check: True +Test 40 +Success: 40, Sol Length: 25, Num Nodes: 2700023, Time Taken: 159.4134485721588, Check: True +Test 41 +Success: 41, Sol Length: 23, Num Nodes: 2393826, Time Taken: 140.12403178215027, Check: True +Test 42 +Success: 42, Sol Length: 22, Num Nodes: 2237380, Time Taken: 130.35105347633362, Check: True +Test 43 +Success: 43, Sol Length: 26, Num Nodes: 2857415, Time Taken: 169.66071701049805, Check: True +Test 44 +Success: 44, Sol Length: 19, Num Nodes: 1801706, Time Taken: 104.21386551856995, Check: True +Test 45 +Success: 45, Sol Length: 22, Num Nodes: 2242674, Time Taken: 131.40223288536072, Check: True +Test 46 +Success: 46, Sol Length: 24, Num Nodes: 2548770, Time Taken: 150.60494661331177, Check: True +Test 47 +Success: 47, Sol Length: 23, Num Nodes: 2390557, Time Taken: 139.50325298309326, Check: True +Test 48 +Success: 48, Sol Length: 21, Num Nodes: 2093716, Time Taken: 121.14900469779968, Check: True +Test 49 +Success: 49, Sol Length: 20, Num Nodes: 1947659, Time Taken: 113.70105385780334, Check: True +Test 50 +Success: 50, Sol Length: 22, Num Nodes: 2240855, Time Taken: 130.61431574821472, Check: True +Test 51 +Success: 51, Sol Length: 23, Num Nodes: 2392103, Time Taken: 141.67839336395264, Check: True +Test 52 +Success: 52, Sol Length: 25, Num Nodes: 2699644, Time Taken: 160.14928126335144, Check: True +Test 53 +Success: 53, Sol Length: 24, Num Nodes: 2545085, Time Taken: 149.85076761245728, Check: True +Test 54 +Success: 54, Sol Length: 24, Num Nodes: 2546919, Time Taken: 150.987158536911, Check: True +Test 55 +Success: 55, Sol Length: 23, Num Nodes: 2389601, Time Taken: 139.94578194618225, Check: True +Test 56 +Success: 56, Sol Length: 24, Num Nodes: 2541267, Time Taken: 150.0502531528473, Check: True +Test 57 +Success: 57, Sol Length: 25, Num Nodes: 2700728, Time Taken: 159.56839323043823, Check: True +Test 58 +Success: 58, Sol Length: 23, Num Nodes: 2394830, Time Taken: 140.672842502594, Check: True +Test 59 +Success: 59, Sol Length: 22, Num Nodes: 2236802, Time Taken: 130.1795039176941, Check: True +Test 60 +Success: 60, Sol Length: 25, Num Nodes: 2699270, Time Taken: 159.30123162269592, Check: True +Test 61 +Success: 61, Sol Length: 22, Num Nodes: 2237644, Time Taken: 130.6851086616516, Check: True +Test 62 +Success: 62, Sol Length: 24, Num Nodes: 2546814, Time Taken: 149.36202216148376, Check: True +Test 63 +Success: 63, Sol Length: 19, Num Nodes: 1798160, Time Taken: 103.5379159450531, Check: True +Test 64 +Success: 64, Sol Length: 24, Num Nodes: 2540189, Time Taken: 148.79802894592285, Check: True +Test 65 +Success: 65, Sol Length: 22, Num Nodes: 2243492, Time Taken: 131.85144019126892, Check: True +Test 66 +Success: 66, Sol Length: 26, Num Nodes: 2854373, Time Taken: 170.40193367004395, Check: True +Test 67 +Success: 67, Sol Length: 23, Num Nodes: 2389774, Time Taken: 140.42329478263855, Check: True +Test 68 +Success: 68, Sol Length: 23, Num Nodes: 2394292, Time Taken: 140.53163695335388, Check: True +Test 69 +Success: 69, Sol Length: 23, Num Nodes: 2385209, Time Taken: 139.66554594039917, Check: True +Test 70 +Success: 70, Sol Length: 24, Num Nodes: 2539936, Time Taken: 149.22537875175476, Check: True +Test 71 +Success: 71, Sol Length: 24, Num Nodes: 2546684, Time Taken: 149.81007552146912, Check: True +Test 72 +Success: 72, Sol Length: 21, Num Nodes: 2093521, Time Taken: 121.28052806854248, Check: True +Test 73 +Success: 73, Sol Length: 25, Num Nodes: 2703191, Time Taken: 159.99190402030945, Check: True +Test 74 +Success: 74, Sol Length: 23, Num Nodes: 2387582, Time Taken: 139.34448194503784, Check: True +Test 75 +Success: 75, Sol Length: 20, Num Nodes: 1947659, Time Taken: 112.63445973396301, Check: True +Test 76 +Success: 76, Sol Length: 24, Num Nodes: 2547010, Time Taken: 149.35952377319336, Check: True +Test 77 +Success: 77, Sol Length: 20, Num Nodes: 1941911, Time Taken: 112.4730179309845, Check: True +Test 78 +Success: 78, Sol Length: 22, Num Nodes: 2241855, Time Taken: 130.99434423446655, Check: True +Test 79 +Success: 79, Sol Length: 23, Num Nodes: 2392560, Time Taken: 139.91643571853638, Check: True +Test 80 +Success: 80, Sol Length: 23, Num Nodes: 2392183, Time Taken: 140.9674882888794, Check: True +Test 81 +Success: 81, Sol Length: 24, Num Nodes: 2545150, Time Taken: 150.49388933181763, Check: True +Test 82 +Success: 82, Sol Length: 24, Num Nodes: 2541551, Time Taken: 149.08097910881042, Check: True +Test 83 +Success: 83, Sol Length: 21, Num Nodes: 2096336, Time Taken: 122.89620232582092, Check: True +Test 84 +Success: 84, Sol Length: 24, Num Nodes: 2543168, Time Taken: 150.09113693237305, Check: True +Test 85 +Success: 85, Sol Length: 21, Num Nodes: 2091068, Time Taken: 121.95763635635376, Check: True +Test 86 +Success: 86, Sol Length: 22, Num Nodes: 2242772, Time Taken: 130.82773184776306, Check: True +Test 87 +Success: 87, Sol Length: 23, Num Nodes: 2394301, Time Taken: 140.54164147377014, Check: True +Test 88 +Success: 88, Sol Length: 25, Num Nodes: 2694809, Time Taken: 159.2472860813141, Check: True +Test 89 +Success: 89, Sol Length: 22, Num Nodes: 2243229, Time Taken: 131.4989948272705, Check: True +Test 90 +Success: 90, Sol Length: 25, Num Nodes: 2700211, Time Taken: 160.03221607208252, Check: True +Test 91 +Success: 91, Sol Length: 21, Num Nodes: 2090574, Time Taken: 121.66300535202026, Check: True +Test 92 +Success: 92, Sol Length: 22, Num Nodes: 2242643, Time Taken: 130.78435277938843, Check: True +Test 93 +Success: 93, Sol Length: 23, Num Nodes: 2391339, Time Taken: 139.70301222801208, Check: True +Test 94 +Success: 94, Sol Length: 21, Num Nodes: 2095724, Time Taken: 121.4561836719513, Check: True +Test 95 +Success: 95, Sol Length: 25, Num Nodes: 2697170, Time Taken: 159.39984273910522, Check: True +Test 96 +Success: 96, Sol Length: 21, Num Nodes: 2089629, Time Taken: 121.33023643493652, Check: True +Test 97 +Success: 97, Sol Length: 27, Num Nodes: 3017191, Time Taken: 179.18511533737183, Check: True +Test 98 +Success: 98, Sol Length: 23, Num Nodes: 2390057, Time Taken: 139.4095423221588, Check: True +Test 99 +Success: 99, Sol Length: 24, Num Nodes: 2544140, Time Taken: 148.83701992034912, Check: True +Test 100 +Success: 100, Sol Length: 22, Num Nodes: 2242674, Time Taken: 130.87133288383484, Check: True +Success Rate: 1.0, Avg Sol Length: 23.09, Avg Num Nodes: 2407741.29, Avg Time Taken: 141.34543064594268 + +15000 100 (RTX 3090) +Test 1 +Success: 1, Sol Length: 24, Num Nodes: 3135706, Time Taken: 180.85067462921143, Check: True +Test 2 +Success: 2, Sol Length: 24, Num Nodes: 3136187, Time Taken: 180.815691947937, Check: True +Test 3 +Success: 3, Sol Length: 22, Num Nodes: 2807556, Time Taken: 162.7153856754303, Check: True +Test 4 +Success: 4, Sol Length: 23, Num Nodes: 2969635, Time Taken: 172.95113062858582, Check: True +Test 5 +Success: 5, Sol Length: 20, Num Nodes: 2476377, Time Taken: 143.2054259777069, Check: True +Test 6 +Success: 6, Sol Length: 23, Num Nodes: 2988119, Time Taken: 172.07680916786194, Check: True +Test 7 +Success: 7, Sol Length: 26, Num Nodes: 3469822, Time Taken: 200.33953833580017, Check: True +Test 8 +Success: 8, Sol Length: 22, Num Nodes: 2803654, Time Taken: 162.70177578926086, Check: True +Test 9 +Success: 9, Sol Length: 23, Num Nodes: 2972078, Time Taken: 172.37406015396118, Check: True +Test 10 +Success: 10, Sol Length: 24, Num Nodes: 3140642, Time Taken: 182.3042857646942, Check: True +Test 11 +Success: 11, Sol Length: 20, Num Nodes: 2476359, Time Taken: 143.38378500938416, Check: True +Test 12 +Success: 12, Sol Length: 26, Num Nodes: 3462532, Time Taken: 198.6366264820099, Check: True +Test 13 +Success: 13, Sol Length: 24, Num Nodes: 3132491, Time Taken: 182.61956882476807, Check: True +Test 14 +Success: 14, Sol Length: 25, Num Nodes: 3296630, Time Taken: 190.22848677635193, Check: True +Test 15 +Success: 15, Sol Length: 22, Num Nodes: 2806972, Time Taken: 161.5967559814453, Check: True +Test 16 +Success: 16, Sol Length: 22, Num Nodes: 2804106, Time Taken: 162.12138032913208, Check: True +Test 17 +Success: 17, Sol Length: 24, Num Nodes: 3134511, Time Taken: 182.11169052124023, Check: True +Test 18 +Success: 18, Sol Length: 23, Num Nodes: 2974790, Time Taken: 172.01628017425537, Check: True +Test 19 +Success: 19, Sol Length: 21, Num Nodes: 2641523, Time Taken: 152.39970517158508, Check: True +Test 20 +Success: 20, Sol Length: 23, Num Nodes: 2972063, Time Taken: 171.1973955631256, Check: True +Test 21 +Success: 21, Sol Length: 23, Num Nodes: 2969077, Time Taken: 172.3608467578888, Check: True +Test 22 +Success: 22, Sol Length: 23, Num Nodes: 2969628, Time Taken: 172.31796550750732, Check: True +Test 23 +Success: 23, Sol Length: 22, Num Nodes: 2807556, Time Taken: 162.67421650886536, Check: True +Test 24 +Success: 24, Sol Length: 25, Num Nodes: 3296719, Time Taken: 190.27325820922852, Check: True +Test 25 +Success: 25, Sol Length: 22, Num Nodes: 2809054, Time Taken: 162.5842592716217, Check: True +Test 26 +Success: 26, Sol Length: 24, Num Nodes: 3133942, Time Taken: 182.26205587387085, Check: True +Test 27 +Success: 27, Sol Length: 24, Num Nodes: 3133259, Time Taken: 180.6627893447876, Check: True +Test 28 +Success: 28, Sol Length: 23, Num Nodes: 2967721, Time Taken: 172.93485379219055, Check: True +Test 29 +Success: 29, Sol Length: 23, Num Nodes: 2970670, Time Taken: 172.40721464157104, Check: True +Test 30 +Success: 30, Sol Length: 24, Num Nodes: 3131098, Time Taken: 180.94470953941345, Check: True +Test 31 +Success: 31, Sol Length: 25, Num Nodes: 3297945, Time Taken: 191.59869647026062, Check: True +Test 32 +Success: 32, Sol Length: 23, Num Nodes: 2962765, Time Taken: 170.84419631958008, Check: True +Test 33 +Success: 33, Sol Length: 23, Num Nodes: 2969698, Time Taken: 172.09304547309875, Check: True +Test 34 +Success: 34, Sol Length: 20, Num Nodes: 2477860, Time Taken: 146.08407878875732, Check: True +Test 35 +Success: 35, Sol Length: 22, Num Nodes: 2808523, Time Taken: 161.39635133743286, Check: True +Test 36 +Success: 36, Sol Length: 25, Num Nodes: 3301500, Time Taken: 191.91895818710327, Check: True +Test 37 +Success: 37, Sol Length: 24, Num Nodes: 3136397, Time Taken: 183.43936848640442, Check: True +Test 38 +Success: 38, Sol Length: 25, Num Nodes: 3296472, Time Taken: 190.33404994010925, Check: True +Test 39 +Success: 39, Sol Length: 22, Num Nodes: 2807556, Time Taken: 162.82022786140442, Check: True +Test 40 +Success: 40, Sol Length: 25, Num Nodes: 3302648, Time Taken: 190.51149249076843, Check: True +Test 41 +Success: 41, Sol Length: 23, Num Nodes: 2967093, Time Taken: 171.87681651115417, Check: True +Test 42 +Success: 42, Sol Length: 22, Num Nodes: 2795314, Time Taken: 161.13286709785461, Check: True +Test 43 +Success: 43, Sol Length: 26, Num Nodes: 3461680, Time Taken: 200.13867664337158, Check: True +Test 44 +Success: 44, Sol Length: 19, Num Nodes: 2310987, Time Taken: 133.64024877548218, Check: True +Test 45 +Success: 45, Sol Length: 22, Num Nodes: 2820336, Time Taken: 162.66046357154846, Check: True +Test 46 +Success: 46, Sol Length: 24, Num Nodes: 3132163, Time Taken: 180.83046436309814, Check: True +Test 47 +Success: 47, Sol Length: 23, Num Nodes: 2969059, Time Taken: 171.7920377254486, Check: True +Test 48 +Success: 48, Sol Length: 21, Num Nodes: 2640391, Time Taken: 153.2972912788391, Check: True +Test 49 +Success: 49, Sol Length: 20, Num Nodes: 2476901, Time Taken: 144.75566577911377, Check: True +Test 50 +Success: 50, Sol Length: 22, Num Nodes: 2806277, Time Taken: 162.71297645568848, Check: True +Test 51 +Success: 51, Sol Length: 23, Num Nodes: 2967396, Time Taken: 173.18692684173584, Check: True +Test 52 +Success: 52, Sol Length: 25, Num Nodes: 3336335, Time Taken: 192.12046885490417, Check: True +Test 53 +Success: 53, Sol Length: 24, Num Nodes: 3135610, Time Taken: 182.69143104553223, Check: True +Test 54 +Success: 54, Sol Length: 24, Num Nodes: 3135748, Time Taken: 181.16052317619324, Check: True +Test 55 +Success: 55, Sol Length: 23, Num Nodes: 2966429, Time Taken: 172.43949580192566, Check: True +Test 56 +Success: 56, Sol Length: 24, Num Nodes: 3137986, Time Taken: 181.03580713272095, Check: True +Test 57 +Success: 57, Sol Length: 25, Num Nodes: 3303034, Time Taken: 190.490727186203, Check: True +Test 58 +Success: 58, Sol Length: 23, Num Nodes: 2973889, Time Taken: 173.5711669921875, Check: True +Test 59 +Success: 59, Sol Length: 22, Num Nodes: 2802390, Time Taken: 162.902690410614, Check: True +Test 60 +Success: 60, Sol Length: 25, Num Nodes: 3295744, Time Taken: 189.4059498310089, Check: True +Test 61 +Success: 61, Sol Length: 22, Num Nodes: 2803455, Time Taken: 162.66794395446777, Check: True +Test 62 +Success: 62, Sol Length: 24, Num Nodes: 3141606, Time Taken: 181.381530046463, Check: True +Test 63 +Success: 63, Sol Length: 19, Num Nodes: 2307382, Time Taken: 133.5819206237793, Check: True +Test 64 +Success: 64, Sol Length: 24, Num Nodes: 3131098, Time Taken: 181.07473587989807, Check: True +Test 65 +Success: 65, Sol Length: 22, Num Nodes: 2801997, Time Taken: 162.30151081085205, Check: True +Test 66 +Success: 66, Sol Length: 26, Num Nodes: 3464040, Time Taken: 200.8624448776245, Check: True +Test 67 +Success: 67, Sol Length: 23, Num Nodes: 2988119, Time Taken: 172.31222486495972, Check: True +Test 68 +Success: 68, Sol Length: 23, Num Nodes: 2974156, Time Taken: 177.43612957000732, Check: True +Test 69 +Success: 69, Sol Length: 23, Num Nodes: 2968145, Time Taken: 174.61910033226013, Check: True +Test 70 +Success: 70, Sol Length: 24, Num Nodes: 3134726, Time Taken: 186.2529022693634, Check: True +Test 71 +Success: 71, Sol Length: 24, Num Nodes: 3135636, Time Taken: 188.30204129219055, Check: True +Test 72 +Success: 72, Sol Length: 21, Num Nodes: 2637675, Time Taken: 156.50322699546814, Check: True +Test 73 +Success: 73, Sol Length: 31, Num Nodes: 4289752, Time Taken: 252.58492803573608, Check: True +Test 74 +Success: 74, Sol Length: 23, Num Nodes: 2969408, Time Taken: 176.88858270645142, Check: True +Test 75 +Success: 75, Sol Length: 20, Num Nodes: 2476901, Time Taken: 149.1534240245819, Check: True +Test 76 +Success: 76, Sol Length: 24, Num Nodes: 3134704, Time Taken: 186.03582978248596, Check: True +Test 77 +Success: 77, Sol Length: 20, Num Nodes: 2479033, Time Taken: 148.1845371723175, Check: True +Test 78 +Success: 78, Sol Length: 22, Num Nodes: 2811066, Time Taken: 168.97578382492065, Check: True +Test 79 +Success: 79, Sol Length: 23, Num Nodes: 2970092, Time Taken: 177.6877739429474, Check: True +Test 80 +Success: 80, Sol Length: 25, Num Nodes: 3299705, Time Taken: 197.44589805603027, Check: True +Test 81 +Success: 81, Sol Length: 24, Num Nodes: 3130039, Time Taken: 188.32297110557556, Check: True +Test 82 +Success: 82, Sol Length: 24, Num Nodes: 3137087, Time Taken: 187.78128743171692, Check: True +Test 83 +Success: 83, Sol Length: 21, Num Nodes: 2642621, Time Taken: 158.526700258255, Check: True +Test 84 +Success: 84, Sol Length: 24, Num Nodes: 3133852, Time Taken: 187.87740349769592, Check: True +Test 85 +Success: 85, Sol Length: 21, Num Nodes: 2638375, Time Taken: 157.6694884300232, Check: True +Test 86 +Success: 86, Sol Length: 22, Num Nodes: 2805167, Time Taken: 168.79967308044434, Check: True +Test 87 +Success: 87, Sol Length: 23, Num Nodes: 2968677, Time Taken: 177.4690637588501, Check: True +Test 88 +Success: 88, Sol Length: 25, Num Nodes: 3300089, Time Taken: 198.52899479866028, Check: True +Test 89 +Success: 89, Sol Length: 22, Num Nodes: 2807561, Time Taken: 168.26227831840515, Check: True +Test 90 +Success: 90, Sol Length: 25, Num Nodes: 3297965, Time Taken: 199.21527481079102, Check: True +Test 91 +Success: 91, Sol Length: 21, Num Nodes: 2639622, Time Taken: 158.60127353668213, Check: True +Test 92 +Success: 92, Sol Length: 22, Num Nodes: 2806109, Time Taken: 169.52862691879272, Check: True +Test 93 +Success: 93, Sol Length: 23, Num Nodes: 2963837, Time Taken: 176.85314011573792, Check: True +Test 94 +Success: 94, Sol Length: 21, Num Nodes: 2641973, Time Taken: 158.8962368965149, Check: True +Test 95 +Success: 95, Sol Length: 25, Num Nodes: 3296331, Time Taken: 196.28530478477478, Check: True +Test 96 +Success: 96, Sol Length: 21, Num Nodes: 2640995, Time Taken: 158.77482891082764, Check: True +Test 97 +Success: 97, Sol Length: 25, Num Nodes: 3300698, Time Taken: 196.55318927764893, Check: True +Test 98 +Success: 98, Sol Length: 23, Num Nodes: 2968699, Time Taken: 177.48284077644348, Check: True +Test 99 +Success: 99, Sol Length: 24, Num Nodes: 3136369, Time Taken: 187.11096835136414, Check: True +Test 100 +Success: 100, Sol Length: 22, Num Nodes: 2820336, Time Taken: 168.30121779441833, Check: True +Success Rate: 1.0, Avg Sol Length: 23.09, Avg Num Nodes: 2985817.01, Avg Time Taken: 174.74045015096664 \ No newline at end of file diff --git a/solver.py b/solver.py new file mode 100644 index 0000000..820cbb7 --- /dev/null +++ b/solver.py @@ -0,0 +1,12 @@ +import sys +from utils.cube_widget import Ui_MainWindow + +from PyQt5 import QtWidgets + +if __name__ == "__main__": + app = QtWidgets.QApplication(sys.argv) + MainWindow = QtWidgets.QMainWindow() + ui = Ui_MainWindow() + ui.setupUi(MainWindow) + MainWindow.show() + sys.exit(app.exec_()) \ No newline at end of file diff --git a/utils/cube_model.py b/utils/cube_model.py deleted file mode 100644 index 437ca3f..0000000 --- a/utils/cube_model.py +++ /dev/null @@ -1,36 +0,0 @@ - - -class MLPModel(nn.Module): - def __init__(self, input_size = 324): - super().__init__() - self.input_size = input_size - self.body = nn.Sequential( - nn.Linear(self.input_size, 1056), - nn.ReLU(), - nn.Linear(1056, 3888), - nn.ReLU(), - nn.Linear(3888, 1104), - nn.ReLU(), - nn.Linear(1104, 576), - nn.ReLU(), - nn.Linear(576,1) - ) - - for m in self.modules(): - if isinstance(m,nn.Linear): - nn.init.xavier_normal_(m.weight) - if m.bias is not None: - m.bias.detach().zero_() - - def forward(self, batch): - x = batch.reshape((-1, self.input_size)) - body_out = self.body(x) - return body_out - - def clone(self): - new_state_dict = {} - for kw, v in self.state_dict().items(): - new_state_dict[kw] = v.clone() - new_net = MLPModel(self.input_size) - new_net.load_state_dict(new_state_dict) - return new_net \ No newline at end of file diff --git a/utils/cube_utils.py b/utils/cube_utils.py new file mode 100644 index 0000000..c5f08e9 --- /dev/null +++ b/utils/cube_utils.py @@ -0,0 +1,122 @@ +import numpy as np + +""" +Solved state = +[0 0 0 0 0 0 0 0 0 + 1 1 1 1 1 1 1 1 1 + 2 2 2 2 2 2 2 2 2 + 3 3 3 3 3 3 3 3 3 + 4 4 4 4 4 4 4 4 4 + 5 5 5 5 5 5 5 5 5] shape = 54, +The following array specifies which colored tiles with their indexes will be in which position after the actions(L,U...) are applied. + +0:Up, 1:Left, 2:Front, 3:Right, 4:Back, 5:Down +6:Up', 7:Left', 8:Front', 9:Right', 10:Back', 11:Down' + +For example: + First 9 tiles of our cube: [2,1,5,1,0,4,0,2,5 + First 9 value of indexes changes for Up: [6,3,0,7,4,1,8,5,2 + First 9 tiles after applied Up action: [0,1,2,2,0,1,5,4,5 + +""" + +idxs = np.array([ + # 0:Up + [6,3,0,7,4,1,8,5,2,18,19,20,12,13,14,15,16,17,27,28,29,21,22,23,24,25,26, + 36,37,38,30,31,32,33,34,35,9,10,11,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53], + # 1:Left + [44,1,2,41,4,5,38,7,8,15,12,9,16,13,10,17,14,11,0,19,20,3,22,23,6,25,26, + 27,28,29,30,31,32,33,34,35,36,37,51,39,40,48,42,43,45,18,46,47,21,49,50,24,52,53], + # 2:Front + [0,1,2,3,4,5,17,14,11,9,10,45,12,13,46,15,16,47,24,21,18,25,22,19,26,23,20, + 6,28,29,7,31,32,8,34,35,36,37,38,39,40,41,42,43,44,33,30,27,48,49,50,51,52,53], + # 3:Right + [0,1,20,3,4,23,6,7,26,9,10,11,12,13,14,15,16,17,18,19,47,21,22,50,24,25,53, + 33,30,27,34,31,28,35,32,29,8,37,38,5,40,41,2,43,44,45,46,42,48,49,39,51,52,36], + # 4:Back + [29,32,35,3,4,5,6,7,8,2,10,11,1,13,14,0,16,17,18,19,20,21,22,23,24,25,26, + 27,28,53,30,31,52,33,34,51,42,39,36,43,40,37,44,41,38,45,46,47,48,49,50,9,12,15], + # 5:Down + [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,42,43,44,18,19,20,21,22,23,15,16,17, + 27,28,29,30,31,32,24,25,26,36,37,38,39,40,41,33,34,35,51,48,45,52,49,46,53,50,47], + # 6:Up' + [2,5,8,1,4,7,0,3,6,36,37,38,12,13,14,15,16,17,9,10,11,21,22,23,24,25,26, + 18,19,20,30,31,32,33,34,35,27,28,29,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53], + # 7:Left' + [18,1,2,21,4,5,24,7,8,11,14,17,10,13,16,9,12,15,45,19,20,48,22,23,51,25,26, + 27,28,29,30,31,32,33,34,35,36,37,6,39,40,3,42,43,0,44,46,47,41,49,50,38,52,53], + # 8:Front' + [0,1,2,3,4,5,27,30,33,9,10,8,12,13,7,15,16,6,20,23,26,19,22,25,18,21,24, + 47,28,29,46,31,32,45,34,35,36,37,38,39,40,41,42,43,44,11,14,17,48,49,50,51,52,53], + # 9:Right' + [0,1,42,3,4,39,6,7,36,9,10,11,12,13,14,15,16,17,18,19,2,21,22,5,24,25,8, + 29,32,35,28,31,34,27,30,33,53,37,38,50,40,41,47,43,44,45,46,20,48,49,23,51,52,26], + # 10:Back' + [15,12,9,3,4,5,6,7,8,51,10,11,52,13,14,53,16,17,18,19,20,21,22,23,24,25,26, + 27,28,0,30,31,1,33,34,2,38,41,44,37,40,43,36,39,42,45,46,47,48,49,50,35,32,29], + # 11:Down' + [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,24,25,26,18,19,20,21,22,23,33,34,35, + 27,28,29,30,31,32,42,43,44,36,37,38,39,40,41,15,16,17,47,50,53,46,49,52,45,48,51]]) + +solved = (np.arange(0, 6, 1, dtype=np.ushort).reshape((6, 1)) + + np.zeros((6, 9),dtype=np.ushort)).flatten() + + +def get_solved(): + return solved.copy() + + +def is_solved(other,penalty=-1,reward=1): + if np.array_equal(solved,other): + return reward + return penalty + + +def scramble(times=6): + state = get_solved() + actions = np.random.randint(0, 11,times) + for action in actions: + state = state[idxs[action]] + + if is_solved(state) == 1: + scramble(times) + return state,actions + + +def scramble_with_list(state,seq): + for act in seq: + state = state[idxs[act]] + return state + + +def get_solution(actions): + solution = actions[::-1] + solution = (solution+6)%12 + return solution + + +def clear_seq(seq): + """ + Clear actions sequence, if there are unnecessary actions for example: R,R,R,R(same 4 moves in order) + or transform R,R,R to R' + :param seq: Actions sequence + :return: Cleared actions sequence + """ + idxs = [] + for i in range(len(seq)-1): + if seq[i]+6==seq[i+1] or seq[i]-6==seq[i+1]: + idxs.append(i) + temp = -1 + deleted = 0 + for i,idx in enumerate(idxs): + if idx!=temp: + del seq[idx-deleted] + del seq[idx-deleted] + deleted+=2 + temp = idx+1 + return seq + + +if __name__=="__main__": + print(f"Solved Cube Represantation:\n{solved}") + print(f"Cube State Shape:\n{solved.shape}") \ No newline at end of file diff --git a/utils/cube_widget.py b/utils/cube_widget.py new file mode 100644 index 0000000..615ec34 --- /dev/null +++ b/utils/cube_widget.py @@ -0,0 +1,1329 @@ +from .settings_dialog import Ui_SettingsDialog +from PyQt5 import QtCore, QtGui, QtWidgets +from PyQt5.QtGui import QIntValidator +import utils.cube_utils as cu +import utils.widgets_utils as wu +from cube import Cube, Move + +from beam_search import beam_search +from astar import astar_search_pq + +class Ui_MainWindow(object): + def setupUi(self, MainWindow): + MainWindow.setObjectName("MainWindow") + MainWindow.resize(957, 716) + self.centralwidget = QtWidgets.QWidget(MainWindow) + self.centralwidget.setObjectName("centralwidget") + self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralwidget) + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.verticalLayout = QtWidgets.QVBoxLayout() + self.verticalLayout.setObjectName("verticalLayout") + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.verticalLayout.addItem(spacerItem) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout.addItem(spacerItem1) + self.gridLayout_7 = QtWidgets.QGridLayout() + self.gridLayout_7.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize) + self.gridLayout_7.setObjectName("gridLayout_7") + spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout_7.addItem(spacerItem2, 0, 3, 1, 1) + spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout_7.addItem(spacerItem3, 0, 2, 1, 1) + spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout_7.addItem(spacerItem4, 0, 0, 1, 1) + spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout_7.addItem(spacerItem5, 2, 0, 1, 1) + spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout_7.addItem(spacerItem6, 2, 3, 1, 1) + spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout_7.addItem(spacerItem7, 2, 2, 1, 1) + self.gridLayout_3 = QtWidgets.QGridLayout() + self.gridLayout_3.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint) + self.gridLayout_3.setSpacing(0) + self.gridLayout_3.setObjectName("gridLayout_3") + self.cubie_20 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_20.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_20.sizePolicy().hasHeightForWidth()) + self.cubie_20.setSizePolicy(sizePolicy) + self.cubie_20.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_20.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_20.setStyleSheet("background-color:white;\n" +"") + self.cubie_20.setObjectName("cubie_20") + self.gridLayout_3.addWidget(self.cubie_20, 0, 2, 1, 1) + self.cubie_22 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_22.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_22.sizePolicy().hasHeightForWidth()) + self.cubie_22.setSizePolicy(sizePolicy) + self.cubie_22.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_22.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_22.setStyleSheet("background-color:white;\n" +"") + self.cubie_22.setObjectName("cubie_22") + self.gridLayout_3.addWidget(self.cubie_22, 1, 1, 1, 1) + self.cubie_21 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_21.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_21.sizePolicy().hasHeightForWidth()) + self.cubie_21.setSizePolicy(sizePolicy) + self.cubie_21.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_21.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_21.setStyleSheet("background-color:white;\n" +"") + self.cubie_21.setObjectName("cubie_21") + self.gridLayout_3.addWidget(self.cubie_21, 1, 0, 1, 1) + self.cubie_23 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_23.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_23.sizePolicy().hasHeightForWidth()) + self.cubie_23.setSizePolicy(sizePolicy) + self.cubie_23.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_23.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_23.setStyleSheet("background-color:white;\n" +"") + self.cubie_23.setObjectName("cubie_23") + self.gridLayout_3.addWidget(self.cubie_23, 1, 2, 1, 1) + self.cubie_19 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_19.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_19.sizePolicy().hasHeightForWidth()) + self.cubie_19.setSizePolicy(sizePolicy) + self.cubie_19.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_19.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_19.setStyleSheet("background-color:white;\n" +"") + self.cubie_19.setObjectName("cubie_19") + self.gridLayout_3.addWidget(self.cubie_19, 0, 1, 1, 1) + self.cubie_18 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_18.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_18.sizePolicy().hasHeightForWidth()) + self.cubie_18.setSizePolicy(sizePolicy) + self.cubie_18.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_18.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_18.setStyleSheet("background-color:white;\n" +"") + self.cubie_18.setObjectName("cubie_18") + self.gridLayout_3.addWidget(self.cubie_18, 0, 0, 1, 1) + self.cubie_24 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_24.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_24.sizePolicy().hasHeightForWidth()) + self.cubie_24.setSizePolicy(sizePolicy) + self.cubie_24.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_24.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_24.setStyleSheet("background-color:white;\n" +"") + self.cubie_24.setObjectName("cubie_24") + self.gridLayout_3.addWidget(self.cubie_24, 2, 0, 1, 1) + self.cubie_25 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_25.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_25.sizePolicy().hasHeightForWidth()) + self.cubie_25.setSizePolicy(sizePolicy) + self.cubie_25.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_25.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_25.setStyleSheet("background-color:white;\n" +"") + self.cubie_25.setObjectName("cubie_25") + self.gridLayout_3.addWidget(self.cubie_25, 2, 1, 1, 1) + self.cubie_26 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_26.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_26.sizePolicy().hasHeightForWidth()) + self.cubie_26.setSizePolicy(sizePolicy) + self.cubie_26.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_26.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_26.setStyleSheet("background-color:white;\n" +"") + self.cubie_26.setObjectName("cubie_26") + self.gridLayout_3.addWidget(self.cubie_26, 2, 2, 1, 1) + self.gridLayout_7.addLayout(self.gridLayout_3, 1, 1, 1, 1) + self.gridLayout = QtWidgets.QGridLayout() + self.gridLayout.setSpacing(0) + self.gridLayout.setObjectName("gridLayout") + self.cubie_8 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_8.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_8.sizePolicy().hasHeightForWidth()) + self.cubie_8.setSizePolicy(sizePolicy) + self.cubie_8.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_8.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_8.setStyleSheet("background-color:blue;\n" +"") + self.cubie_8.setObjectName("cubie_8") + self.gridLayout.addWidget(self.cubie_8, 2, 2, 1, 1) + self.cubie_0 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_0.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_0.sizePolicy().hasHeightForWidth()) + self.cubie_0.setSizePolicy(sizePolicy) + self.cubie_0.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_0.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_0.setStyleSheet("background-color:blue;\n" +"") + self.cubie_0.setObjectName("cubie_0") + self.gridLayout.addWidget(self.cubie_0, 0, 0, 1, 1) + self.cubie_1 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_1.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_1.sizePolicy().hasHeightForWidth()) + self.cubie_1.setSizePolicy(sizePolicy) + self.cubie_1.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_1.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_1.setStyleSheet("background-color:blue;\n" +"") + self.cubie_1.setObjectName("cubie_1") + self.gridLayout.addWidget(self.cubie_1, 0, 1, 1, 1) + self.cubie_2 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_2.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_2.sizePolicy().hasHeightForWidth()) + self.cubie_2.setSizePolicy(sizePolicy) + self.cubie_2.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_2.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_2.setStyleSheet("background-color:blue;\n" +"") + self.cubie_2.setObjectName("cubie_2") + self.gridLayout.addWidget(self.cubie_2, 0, 2, 1, 1) + self.cubie_3 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_3.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_3.sizePolicy().hasHeightForWidth()) + self.cubie_3.setSizePolicy(sizePolicy) + self.cubie_3.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_3.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_3.setStyleSheet("background-color:blue;\n" +"") + self.cubie_3.setObjectName("cubie_3") + self.gridLayout.addWidget(self.cubie_3, 1, 0, 1, 1) + self.cubie_4 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_4.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_4.sizePolicy().hasHeightForWidth()) + self.cubie_4.setSizePolicy(sizePolicy) + self.cubie_4.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_4.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_4.setStyleSheet("background-color:blue;\n" +"") + self.cubie_4.setObjectName("cubie_4") + self.gridLayout.addWidget(self.cubie_4, 1, 1, 1, 1) + self.cubie_5 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_5.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_5.sizePolicy().hasHeightForWidth()) + self.cubie_5.setSizePolicy(sizePolicy) + self.cubie_5.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_5.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_5.setStyleSheet("background-color:blue;\n" +"") + self.cubie_5.setObjectName("cubie_5") + self.gridLayout.addWidget(self.cubie_5, 1, 2, 1, 1) + self.cubie_6 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_6.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_6.sizePolicy().hasHeightForWidth()) + self.cubie_6.setSizePolicy(sizePolicy) + self.cubie_6.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_6.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_6.setStyleSheet("background-color:blue;\n" +"") + self.cubie_6.setObjectName("cubie_6") + self.gridLayout.addWidget(self.cubie_6, 2, 0, 1, 1) + self.cubie_7 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_7.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_7.sizePolicy().hasHeightForWidth()) + self.cubie_7.setSizePolicy(sizePolicy) + self.cubie_7.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_7.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_7.setStyleSheet("background-color:blue;\n" +"") + self.cubie_7.setObjectName("cubie_7") + self.gridLayout.addWidget(self.cubie_7, 2, 1, 1, 1) + self.gridLayout_7.addLayout(self.gridLayout, 0, 1, 1, 1) + self.gridLayout_2 = QtWidgets.QGridLayout() + self.gridLayout_2.setSpacing(0) + self.gridLayout_2.setObjectName("gridLayout_2") + self.cubie_9 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_9.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_9.sizePolicy().hasHeightForWidth()) + self.cubie_9.setSizePolicy(sizePolicy) + self.cubie_9.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_9.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_9.setStyleSheet("background-color:orange;\n" +"") + self.cubie_9.setObjectName("cubie_9") + self.gridLayout_2.addWidget(self.cubie_9, 0, 0, 1, 1) + self.cubie_11 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_11.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_11.sizePolicy().hasHeightForWidth()) + self.cubie_11.setSizePolicy(sizePolicy) + self.cubie_11.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_11.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_11.setStyleSheet("background-color:orange;\n" +"") + self.cubie_11.setObjectName("cubie_11") + self.gridLayout_2.addWidget(self.cubie_11, 0, 2, 1, 1) + self.cubie_12 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_12.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_12.sizePolicy().hasHeightForWidth()) + self.cubie_12.setSizePolicy(sizePolicy) + self.cubie_12.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_12.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_12.setStyleSheet("background-color:orange;\n" +"") + self.cubie_12.setObjectName("cubie_12") + self.gridLayout_2.addWidget(self.cubie_12, 1, 0, 1, 1) + self.cubie_10 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_10.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_10.sizePolicy().hasHeightForWidth()) + self.cubie_10.setSizePolicy(sizePolicy) + self.cubie_10.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_10.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_10.setStyleSheet("background-color:orange;\n" +"") + self.cubie_10.setObjectName("cubie_10") + self.gridLayout_2.addWidget(self.cubie_10, 0, 1, 1, 1) + self.cubie_14 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_14.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_14.sizePolicy().hasHeightForWidth()) + self.cubie_14.setSizePolicy(sizePolicy) + self.cubie_14.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_14.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_14.setStyleSheet("background-color:orange;\n" +"") + self.cubie_14.setObjectName("cubie_14") + self.gridLayout_2.addWidget(self.cubie_14, 1, 2, 1, 1) + self.cubie_13 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_13.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_13.sizePolicy().hasHeightForWidth()) + self.cubie_13.setSizePolicy(sizePolicy) + self.cubie_13.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_13.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_13.setStyleSheet("background-color:orange;\n" +"") + self.cubie_13.setObjectName("cubie_13") + self.gridLayout_2.addWidget(self.cubie_13, 1, 1, 1, 1) + self.cubie_15 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_15.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_15.sizePolicy().hasHeightForWidth()) + self.cubie_15.setSizePolicy(sizePolicy) + self.cubie_15.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_15.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_15.setStyleSheet("background-color:orange;\n" +"") + self.cubie_15.setObjectName("cubie_15") + self.gridLayout_2.addWidget(self.cubie_15, 2, 0, 1, 1) + self.cubie_16 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_16.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_16.sizePolicy().hasHeightForWidth()) + self.cubie_16.setSizePolicy(sizePolicy) + self.cubie_16.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_16.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_16.setStyleSheet("background-color:orange;\n" +"") + self.cubie_16.setObjectName("cubie_16") + self.gridLayout_2.addWidget(self.cubie_16, 2, 1, 1, 1) + self.cubie_17 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_17.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_17.sizePolicy().hasHeightForWidth()) + self.cubie_17.setSizePolicy(sizePolicy) + self.cubie_17.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_17.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_17.setStyleSheet("background-color:orange;\n" +"") + self.cubie_17.setObjectName("cubie_17") + self.gridLayout_2.addWidget(self.cubie_17, 2, 2, 1, 1) + self.gridLayout_7.addLayout(self.gridLayout_2, 1, 0, 1, 1) + self.gridLayout_5 = QtWidgets.QGridLayout() + self.gridLayout_5.setSpacing(0) + self.gridLayout_5.setObjectName("gridLayout_5") + self.cubie_37 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_37.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_37.sizePolicy().hasHeightForWidth()) + self.cubie_37.setSizePolicy(sizePolicy) + self.cubie_37.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_37.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_37.setStyleSheet("background-color:yellow;\n" +"") + self.cubie_37.setObjectName("cubie_37") + self.gridLayout_5.addWidget(self.cubie_37, 0, 1, 1, 1) + self.cubie_38 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_38.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_38.sizePolicy().hasHeightForWidth()) + self.cubie_38.setSizePolicy(sizePolicy) + self.cubie_38.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_38.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_38.setStyleSheet("background-color:yellow;\n" +"") + self.cubie_38.setObjectName("cubie_38") + self.gridLayout_5.addWidget(self.cubie_38, 0, 2, 1, 1) + self.cubie_40 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_40.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_40.sizePolicy().hasHeightForWidth()) + self.cubie_40.setSizePolicy(sizePolicy) + self.cubie_40.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_40.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_40.setStyleSheet("background-color:yellow;\n" +"") + self.cubie_40.setObjectName("cubie_40") + self.gridLayout_5.addWidget(self.cubie_40, 1, 1, 1, 1) + self.cubie_39 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_39.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_39.sizePolicy().hasHeightForWidth()) + self.cubie_39.setSizePolicy(sizePolicy) + self.cubie_39.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_39.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_39.setStyleSheet("background-color:yellow;\n" +"") + self.cubie_39.setObjectName("cubie_39") + self.gridLayout_5.addWidget(self.cubie_39, 1, 0, 1, 1) + self.cubie_41 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_41.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_41.sizePolicy().hasHeightForWidth()) + self.cubie_41.setSizePolicy(sizePolicy) + self.cubie_41.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_41.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_41.setStyleSheet("background-color:yellow;\n" +"") + self.cubie_41.setObjectName("cubie_41") + self.gridLayout_5.addWidget(self.cubie_41, 1, 2, 1, 1) + self.cubie_36 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_36.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_36.sizePolicy().hasHeightForWidth()) + self.cubie_36.setSizePolicy(sizePolicy) + self.cubie_36.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_36.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_36.setStyleSheet("background-color:yellow;\n" +"") + self.cubie_36.setObjectName("cubie_36") + self.gridLayout_5.addWidget(self.cubie_36, 0, 0, 1, 1) + self.cubie_42 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_42.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_42.sizePolicy().hasHeightForWidth()) + self.cubie_42.setSizePolicy(sizePolicy) + self.cubie_42.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_42.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_42.setStyleSheet("background-color:yellow;\n" +"") + self.cubie_42.setObjectName("cubie_42") + self.gridLayout_5.addWidget(self.cubie_42, 2, 0, 1, 1) + self.cubie_43 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_43.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_43.sizePolicy().hasHeightForWidth()) + self.cubie_43.setSizePolicy(sizePolicy) + self.cubie_43.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_43.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_43.setStyleSheet("background-color:yellow;\n" +"") + self.cubie_43.setObjectName("cubie_43") + self.gridLayout_5.addWidget(self.cubie_43, 2, 1, 1, 1) + self.cubie_44 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_44.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_44.sizePolicy().hasHeightForWidth()) + self.cubie_44.setSizePolicy(sizePolicy) + self.cubie_44.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_44.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_44.setStyleSheet("background-color:yellow;\n" +"") + self.cubie_44.setObjectName("cubie_44") + self.gridLayout_5.addWidget(self.cubie_44, 2, 2, 1, 1) + self.gridLayout_7.addLayout(self.gridLayout_5, 1, 3, 1, 1) + self.gridLayout_4 = QtWidgets.QGridLayout() + self.gridLayout_4.setSpacing(0) + self.gridLayout_4.setObjectName("gridLayout_4") + self.cubie_28 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_28.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_28.sizePolicy().hasHeightForWidth()) + self.cubie_28.setSizePolicy(sizePolicy) + self.cubie_28.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_28.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_28.setStyleSheet("background-color:red;\n" +"") + self.cubie_28.setObjectName("cubie_28") + self.gridLayout_4.addWidget(self.cubie_28, 0, 1, 1, 1) + self.cubie_30 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_30.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_30.sizePolicy().hasHeightForWidth()) + self.cubie_30.setSizePolicy(sizePolicy) + self.cubie_30.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_30.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_30.setStyleSheet("background-color:red;\n" +"") + self.cubie_30.setObjectName("cubie_30") + self.gridLayout_4.addWidget(self.cubie_30, 1, 0, 1, 1) + self.cubie_29 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_29.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_29.sizePolicy().hasHeightForWidth()) + self.cubie_29.setSizePolicy(sizePolicy) + self.cubie_29.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_29.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_29.setStyleSheet("background-color:red;\n" +"") + self.cubie_29.setObjectName("cubie_29") + self.gridLayout_4.addWidget(self.cubie_29, 0, 2, 1, 1) + self.cubie_31 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_31.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_31.sizePolicy().hasHeightForWidth()) + self.cubie_31.setSizePolicy(sizePolicy) + self.cubie_31.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_31.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_31.setStyleSheet("background-color:red;\n" +"") + self.cubie_31.setObjectName("cubie_31") + self.gridLayout_4.addWidget(self.cubie_31, 1, 1, 1, 1) + self.cubie_32 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_32.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_32.sizePolicy().hasHeightForWidth()) + self.cubie_32.setSizePolicy(sizePolicy) + self.cubie_32.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_32.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_32.setStyleSheet("background-color:red;\n" +"") + self.cubie_32.setObjectName("cubie_32") + self.gridLayout_4.addWidget(self.cubie_32, 1, 2, 1, 1) + self.cubie_27 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_27.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_27.sizePolicy().hasHeightForWidth()) + self.cubie_27.setSizePolicy(sizePolicy) + self.cubie_27.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_27.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_27.setStyleSheet("background-color:red;\n" +"") + self.cubie_27.setObjectName("cubie_27") + self.gridLayout_4.addWidget(self.cubie_27, 0, 0, 1, 1) + self.cubie_33 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_33.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_33.sizePolicy().hasHeightForWidth()) + self.cubie_33.setSizePolicy(sizePolicy) + self.cubie_33.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_33.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_33.setStyleSheet("background-color:red;\n" +"") + self.cubie_33.setObjectName("cubie_33") + self.gridLayout_4.addWidget(self.cubie_33, 2, 0, 1, 1) + self.cubie_34 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_34.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_34.sizePolicy().hasHeightForWidth()) + self.cubie_34.setSizePolicy(sizePolicy) + self.cubie_34.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_34.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_34.setStyleSheet("background-color:red;\n" +"") + self.cubie_34.setObjectName("cubie_34") + self.gridLayout_4.addWidget(self.cubie_34, 2, 1, 1, 1) + self.cubie_35 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_35.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_35.sizePolicy().hasHeightForWidth()) + self.cubie_35.setSizePolicy(sizePolicy) + self.cubie_35.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_35.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_35.setStyleSheet("background-color:red;\n" +"") + self.cubie_35.setObjectName("cubie_35") + self.gridLayout_4.addWidget(self.cubie_35, 2, 2, 1, 1) + self.gridLayout_7.addLayout(self.gridLayout_4, 1, 2, 1, 1) + self.gridLayout_6 = QtWidgets.QGridLayout() + self.gridLayout_6.setSpacing(0) + self.gridLayout_6.setObjectName("gridLayout_6") + self.cubie_47 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_47.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_47.sizePolicy().hasHeightForWidth()) + self.cubie_47.setSizePolicy(sizePolicy) + self.cubie_47.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_47.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_47.setStyleSheet("background-color:green;\n" +"") + self.cubie_47.setObjectName("cubie_47") + self.gridLayout_6.addWidget(self.cubie_47, 0, 2, 1, 1) + self.cubie_45 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_45.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_45.sizePolicy().hasHeightForWidth()) + self.cubie_45.setSizePolicy(sizePolicy) + self.cubie_45.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_45.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_45.setStyleSheet("background-color:green;\n" +"") + self.cubie_45.setObjectName("cubie_45") + self.gridLayout_6.addWidget(self.cubie_45, 0, 0, 1, 1) + self.cubie_46 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_46.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_46.sizePolicy().hasHeightForWidth()) + self.cubie_46.setSizePolicy(sizePolicy) + self.cubie_46.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_46.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_46.setStyleSheet("background-color:green;\n" +"") + self.cubie_46.setObjectName("cubie_46") + self.gridLayout_6.addWidget(self.cubie_46, 0, 1, 1, 1) + self.cubie_48 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_48.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_48.sizePolicy().hasHeightForWidth()) + self.cubie_48.setSizePolicy(sizePolicy) + self.cubie_48.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_48.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_48.setStyleSheet("background-color:green;\n" +"") + self.cubie_48.setObjectName("cubie_48") + self.gridLayout_6.addWidget(self.cubie_48, 1, 0, 1, 1) + self.cubie_50 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_50.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_50.sizePolicy().hasHeightForWidth()) + self.cubie_50.setSizePolicy(sizePolicy) + self.cubie_50.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_50.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_50.setStyleSheet("background-color:green;\n" +"") + self.cubie_50.setObjectName("cubie_50") + self.gridLayout_6.addWidget(self.cubie_50, 1, 2, 1, 1) + self.cubie_49 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_49.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_49.sizePolicy().hasHeightForWidth()) + self.cubie_49.setSizePolicy(sizePolicy) + self.cubie_49.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_49.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_49.setStyleSheet("background-color:green;\n" +"") + self.cubie_49.setObjectName("cubie_49") + self.gridLayout_6.addWidget(self.cubie_49, 1, 1, 1, 1) + self.cubie_51 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_51.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_51.sizePolicy().hasHeightForWidth()) + self.cubie_51.setSizePolicy(sizePolicy) + self.cubie_51.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_51.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_51.setStyleSheet("background-color:green;\n" +"") + self.cubie_51.setObjectName("cubie_51") + self.gridLayout_6.addWidget(self.cubie_51, 2, 0, 1, 1) + self.cubie_52 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_52.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_52.sizePolicy().hasHeightForWidth()) + self.cubie_52.setSizePolicy(sizePolicy) + self.cubie_52.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_52.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_52.setStyleSheet("background-color:green;\n" +"") + self.cubie_52.setObjectName("cubie_52") + self.gridLayout_6.addWidget(self.cubie_52, 2, 1, 1, 1) + self.cubie_53 = QtWidgets.QLineEdit(self.centralwidget) + self.cubie_53.setEnabled(False) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cubie_53.sizePolicy().hasHeightForWidth()) + self.cubie_53.setSizePolicy(sizePolicy) + self.cubie_53.setMinimumSize(QtCore.QSize(50, 50)) + self.cubie_53.setMaximumSize(QtCore.QSize(50, 50)) + self.cubie_53.setStyleSheet("background-color:green;\n" +"") + self.cubie_53.setObjectName("cubie_53") + self.gridLayout_6.addWidget(self.cubie_53, 2, 2, 1, 1) + self.gridLayout_7.addLayout(self.gridLayout_6, 2, 1, 1, 1) + self.horizontalLayout.addLayout(self.gridLayout_7) + spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout.addItem(spacerItem8) + self.verticalLayout_11 = QtWidgets.QVBoxLayout() + self.verticalLayout_11.setObjectName("verticalLayout_11") + spacerItem9 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.verticalLayout_11.addItem(spacerItem9) + self.formLayout = QtWidgets.QFormLayout() + self.formLayout.setObjectName("formLayout") + self.btn_up = QtWidgets.QPushButton(self.centralwidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.btn_up.sizePolicy().hasHeightForWidth()) + self.btn_up.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_up.setFont(font) + self.btn_up.setStyleSheet("background-color:blue;\n" +"") + self.btn_up.setObjectName("btn_up") + self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.btn_up) + self.btn_up_reverse = QtWidgets.QPushButton(self.centralwidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.btn_up_reverse.sizePolicy().hasHeightForWidth()) + self.btn_up_reverse.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_up_reverse.setFont(font) + self.btn_up_reverse.setStyleSheet("background-color:blue;\n" +"") + self.btn_up_reverse.setObjectName("btn_up_reverse") + self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.btn_up_reverse) + self.btn_left = QtWidgets.QPushButton(self.centralwidget) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_left.setFont(font) + self.btn_left.setStyleSheet("background-color:orange;\n" +"") + self.btn_left.setObjectName("btn_left") + self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.btn_left) + self.btn_left_reverse = QtWidgets.QPushButton(self.centralwidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.btn_left_reverse.sizePolicy().hasHeightForWidth()) + self.btn_left_reverse.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_left_reverse.setFont(font) + self.btn_left_reverse.setStyleSheet("background-color:orange;\n" +"") + self.btn_left_reverse.setObjectName("btn_left_reverse") + self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.btn_left_reverse) + self.btn_front = QtWidgets.QPushButton(self.centralwidget) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_front.setFont(font) + self.btn_front.setStyleSheet("background-color:white;\n" +"") + self.btn_front.setObjectName("btn_front") + self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.btn_front) + self.btn_front_reverse = QtWidgets.QPushButton(self.centralwidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.btn_front_reverse.sizePolicy().hasHeightForWidth()) + self.btn_front_reverse.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_front_reverse.setFont(font) + self.btn_front_reverse.setStyleSheet("background-color:white;\n" +"") + self.btn_front_reverse.setObjectName("btn_front_reverse") + self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.btn_front_reverse) + self.btn_right = QtWidgets.QPushButton(self.centralwidget) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_right.setFont(font) + self.btn_right.setStyleSheet("background-color:red;\n" +"") + self.btn_right.setObjectName("btn_right") + self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.btn_right) + self.btn_right_reverse = QtWidgets.QPushButton(self.centralwidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.btn_right_reverse.sizePolicy().hasHeightForWidth()) + self.btn_right_reverse.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_right_reverse.setFont(font) + self.btn_right_reverse.setStyleSheet("background-color:red;\n" +"") + self.btn_right_reverse.setObjectName("btn_right_reverse") + self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.btn_right_reverse) + self.btn_back = QtWidgets.QPushButton(self.centralwidget) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_back.setFont(font) + self.btn_back.setStyleSheet("background-color:yellow;\n" +"") + self.btn_back.setObjectName("btn_back") + self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.btn_back) + self.btn_back_reverse = QtWidgets.QPushButton(self.centralwidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.btn_back_reverse.sizePolicy().hasHeightForWidth()) + self.btn_back_reverse.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_back_reverse.setFont(font) + self.btn_back_reverse.setStyleSheet("background-color:yellow;\n" +"") + self.btn_back_reverse.setObjectName("btn_back_reverse") + self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.btn_back_reverse) + self.btn_down = QtWidgets.QPushButton(self.centralwidget) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_down.setFont(font) + self.btn_down.setStyleSheet("background-color:green;\n" +"") + self.btn_down.setObjectName("btn_down") + self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.btn_down) + self.btn_down_reverse = QtWidgets.QPushButton(self.centralwidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.btn_down_reverse.sizePolicy().hasHeightForWidth()) + self.btn_down_reverse.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_down_reverse.setFont(font) + self.btn_down_reverse.setStyleSheet("background-color:green;\n" +"") + self.btn_down_reverse.setObjectName("btn_down_reverse") + self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.btn_down_reverse) + self.verticalLayout_11.addLayout(self.formLayout) + self.horizontalLayout_26 = QtWidgets.QHBoxLayout() + self.horizontalLayout_26.setObjectName("horizontalLayout_26") + spacerItem10 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_26.addItem(spacerItem10) + self.btn_reset = QtWidgets.QPushButton(self.centralwidget) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_reset.setFont(font) + self.btn_reset.setStyleSheet("background-color:black;color:white;\n" +"") + self.btn_reset.setObjectName("btn_reset") + self.horizontalLayout_26.addWidget(self.btn_reset) + spacerItem11 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_26.addItem(spacerItem11) + self.verticalLayout_11.addLayout(self.horizontalLayout_26) + spacerItem12 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.verticalLayout_11.addItem(spacerItem12) + self.verticalLayout_11.setStretch(0, 1) + self.verticalLayout_11.setStretch(1, 10) + self.verticalLayout_11.setStretch(2, 2) + self.verticalLayout_11.setStretch(3, 2) + self.horizontalLayout.addLayout(self.verticalLayout_11) + spacerItem13 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout.addItem(spacerItem13) + self.verticalLayout.addLayout(self.horizontalLayout) + + self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + spacerItem14 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_2.addItem(spacerItem14) + self.line_actions = QtWidgets.QLineEdit(self.centralwidget) + self.line_actions.setEnabled(False) + font = QtGui.QFont() + self.line_actions.setStyleSheet("color:black;") + font.setPointSize(14) + self.line_actions.setFont(font) + self.line_actions.setAlignment(QtCore.Qt.AlignCenter) + self.line_actions.setObjectName("line_actions") + self.horizontalLayout_2.addWidget(self.line_actions) + + spacerItem15 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_2.addItem(spacerItem15) + self.horizontalLayout_2.setStretch(0, 1) + self.horizontalLayout_2.setStretch(1, 18) + self.horizontalLayout_2.setStretch(2, 1) + self.verticalLayout.addLayout(self.horizontalLayout_2) + + + self.horizontalLayout_3 = QtWidgets.QHBoxLayout() + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + spacerItem30 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_3.addItem(spacerItem30) + self.sol_stats = QtWidgets.QLineEdit(self.centralwidget) + self.sol_stats.setEnabled(False) + font = QtGui.QFont() + font.setPointSize(14) + # set color of the font to be black + self.sol_stats.setStyleSheet("color:black;") + self.sol_stats.setFont(font) + self.sol_stats.setAlignment(QtCore.Qt.AlignCenter) + self.sol_stats.setObjectName("sol_stats") + self.horizontalLayout_3.addWidget(self.sol_stats) + + spacerItem31 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_3.addItem(spacerItem31) + self.horizontalLayout_3.setStretch(0, 1) + self.horizontalLayout_3.setStretch(1, 18) + self.horizontalLayout_3.setStretch(2, 1) + self.verticalLayout.addLayout(self.horizontalLayout_3) + + + spacerItem16 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.verticalLayout.addItem(spacerItem16) + self.horizontalLayout_30 = QtWidgets.QHBoxLayout() + self.horizontalLayout_30.setObjectName("horizontalLayout_30") + spacerItem17 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_30.addItem(spacerItem17) + self.verticalLayout_8 = QtWidgets.QVBoxLayout() + self.verticalLayout_8.setObjectName("verticalLayout_8") + self.btn_solve = QtWidgets.QPushButton(self.centralwidget) + self.btn_solve.setMinimumSize(QtCore.QSize(150, 0)) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_solve.setFont(font) + self.btn_solve.setObjectName("btn_solve") + self.verticalLayout_8.addWidget(self.btn_solve) + spacerItem18 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.verticalLayout_8.addItem(spacerItem18) + self.verticalLayout_8.setStretch(0, 1) + self.verticalLayout_8.setStretch(1, 1) + self.horizontalLayout_30.addLayout(self.verticalLayout_8) + self.verticalLayout_9 = QtWidgets.QVBoxLayout() + self.verticalLayout_9.setObjectName("verticalLayout_9") + spacerItem19 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.verticalLayout_9.addItem(spacerItem19) + self.verticalLayout_9.setStretch(0, 1) + self.verticalLayout_9.setStretch(1, 1) + self.horizontalLayout_30.addLayout(self.verticalLayout_9) + self.verticalLayout_10 = QtWidgets.QVBoxLayout() + self.verticalLayout_10.setObjectName("verticalLayout_10") + self.astar_option = QtWidgets.QRadioButton(self.centralwidget) + font = QtGui.QFont() + font.setPointSize(12) + self.astar_option.setFont(font) + self.astar_option.setChecked(True) + self.astar_option.setObjectName("astar_option") + self.verticalLayout_10.addWidget(self.astar_option) + self.beam_search_option = QtWidgets.QRadioButton(self.centralwidget) + font = QtGui.QFont() + font.setPointSize(12) + self.beam_search_option.setFont(font) + self.beam_search_option.setObjectName("beam_search_option") + self.verticalLayout_10.addWidget(self.beam_search_option) + self.verticalLayout_10.setStretch(0, 1) + self.verticalLayout_10.setStretch(1, 1) + self.horizontalLayout_30.addLayout(self.verticalLayout_10) + spacerItem20 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_30.addItem(spacerItem20) + self.verticalLayout_13 = QtWidgets.QVBoxLayout() + self.verticalLayout_13.setObjectName("verticalLayout_13") + self.horizontalLayout_25 = QtWidgets.QHBoxLayout() + self.horizontalLayout_25.setObjectName("horizontalLayout_25") + spacerItem21 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_25.addItem(spacerItem21) + self.btn_scramble = QtWidgets.QPushButton(self.centralwidget) + self.btn_scramble.setMinimumSize(QtCore.QSize(100, 0)) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_scramble.setFont(font) + self.btn_scramble.setObjectName("btn_scramble") + self.horizontalLayout_25.addWidget(self.btn_scramble) + self.line_scramble_depth = QtWidgets.QLineEdit(self.centralwidget) + font = QtGui.QFont() + font.setPointSize(12) + self.line_scramble_depth.setFont(font) + self.line_scramble_depth.setMaxLength(3) + self.line_scramble_depth.setObjectName("line_scramble_depth") + self.horizontalLayout_25.addWidget(self.line_scramble_depth) + spacerItem22 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_25.addItem(spacerItem22) + self.verticalLayout_13.addLayout(self.horizontalLayout_25) + spacerItem23 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.verticalLayout_13.addItem(spacerItem23) + self.verticalLayout_13.setStretch(0, 1) + self.verticalLayout_13.setStretch(1, 1) + self.horizontalLayout_30.addLayout(self.verticalLayout_13) + spacerItem24 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_30.addItem(spacerItem24) + self.verticalLayout.addLayout(self.horizontalLayout_30) + self.horizontalLayout_22 = QtWidgets.QHBoxLayout() + self.horizontalLayout_22.setObjectName("horizontalLayout_22") + spacerItem25 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_22.addItem(spacerItem25) + spacerItem26 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_22.addItem(spacerItem26) + self.btn_settings = QtWidgets.QPushButton(self.centralwidget) + self.btn_settings.setMaximumSize(QtCore.QSize(120, 16777215)) + font = QtGui.QFont() + font.setPointSize(12) + self.btn_settings.setFont(font) + self.btn_settings.setObjectName("btn_settings") + self.horizontalLayout_22.addWidget(self.btn_settings) + spacerItem27 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.horizontalLayout_22.addItem(spacerItem27) + self.horizontalLayout_22.setStretch(0, 4) + self.horizontalLayout_22.setStretch(1, 4) + self.horizontalLayout_22.setStretch(2, 2) + self.verticalLayout.addLayout(self.horizontalLayout_22) + spacerItem28 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.verticalLayout.addItem(spacerItem28) + self.verticalLayout_2.addLayout(self.verticalLayout) + MainWindow.setCentralWidget(self.centralwidget) + self.statusbar = QtWidgets.QStatusBar(MainWindow) + self.statusbar.setObjectName("statusbar") + MainWindow.setStatusBar(self.statusbar) + + self.settings = wu.Settings() + + self.COLOR_VALUE = {"blue": 0, "orange": 1, "white": 2, "red": 3, "yellow": 4, "green": 5} + self.VALUE_COLOR = ["blue", "orange", "white", "red", "yellow", "green"] + + # ACTIONS = ["U", "L", "F", "R", "B", "D", "U'", "L'", "F'", "R'", "B'", "D'"] + self.move_dict = { + Move.U1 : 0, + Move.L1 : 1, + Move.F1 : 2, + Move.R1 : 3, + Move.B1 : 4, + Move.D1 : 5, + Move.U3 : 6, + Move.L3 : 7, + Move.F3 : 8, + Move.R3 : 9, + Move.B3 : 10, + Move.D3 : 11 + } + + self.cubies = [] + for i in range(3): + for j in range(3): + temp = self.gridLayout_7.itemAtPosition(0, 1).itemAtPosition(i, j).widget() + self.cubies.append([temp, temp.styleSheet().split(":")[1][:-2]]) + + for i in range(4): + for j in range(3): + for k in range(3): + temp = self.gridLayout_7.itemAtPosition(1, i).itemAtPosition(j, k).widget() + self.cubies.append([temp, temp.styleSheet().split(":")[1][:-2]]) + + for i in range(3): + for j in range(3): + temp = self.gridLayout_7.itemAtPosition(2, 1).itemAtPosition(i, j).widget() + self.cubies.append([temp, temp.styleSheet().split(":")[1][:-2]]) + + + self.line_scramble_depth.setValidator(QIntValidator()) + self.btn_scramble.clicked.connect(self.scramble) + self.btn_reset.clicked.connect(self.reset) + self.btn_solve.clicked.connect(self.solve) + + self.manual_buttons = [] + self.btn_up.clicked.connect(lambda: self.scramble(seq=[0])) + self.manual_buttons.append(self.btn_up) + self.btn_up_reverse.clicked.connect(lambda: self.scramble(seq=[6])) + self.manual_buttons.append(self.btn_up_reverse) + self.btn_left.clicked.connect(lambda: self.scramble(seq=[1])) + self.manual_buttons.append(self.btn_left) + self.btn_left_reverse.clicked.connect(lambda: self.scramble(seq=[7])) + self.manual_buttons.append(self.btn_left_reverse) + self.btn_front.clicked.connect(lambda: self.scramble(seq=[2])) + self.manual_buttons.append(self.btn_front) + self.btn_front_reverse.clicked.connect(lambda: self.scramble(seq=[8])) + self.manual_buttons.append(self.btn_front_reverse) + self.btn_right.clicked.connect(lambda: self.scramble(seq=[3])) + self.manual_buttons.append(self.btn_right) + self.btn_right_reverse.clicked.connect(lambda: self.scramble(seq=[9])) + self.manual_buttons.append(self.btn_right_reverse) + self.btn_back.clicked.connect(lambda: self.scramble(seq=[4])) + self.manual_buttons.append(self.btn_back) + self.btn_back_reverse.clicked.connect(lambda: self.scramble(seq=[10])) + self.manual_buttons.append(self.btn_back_reverse) + self.btn_down.clicked.connect(lambda: self.scramble(seq=[5])) + self.manual_buttons.append(self.btn_down) + self.btn_down_reverse.clicked.connect(lambda: self.scramble(seq=[11])) + self.manual_buttons.append(self.btn_down_reverse) + self.btn_settings.clicked.connect(self.open_settings) + self.settings_dialog = Ui_SettingsDialog(self.settings) + MainWindow.setCentralWidget(self.centralwidget) + self.statusbar = QtWidgets.QStatusBar(MainWindow) + self.statusbar.setObjectName("statusbar") + MainWindow.setStatusBar(self.statusbar) + + self.retranslateUi(MainWindow) + QtCore.QMetaObject.connectSlotsByName(MainWindow) + + def open_settings(self): + self.settings_dialog.exec_() + self.settings_dialog = Ui_SettingsDialog(self.settings) + + def solve(self): + self.btn_reset.setEnabled(False) + self.btn_scramble.setEnabled(False) + self.btn_solve.setEnabled(False) + + astar_option = self.astar_option.isChecked() + beam_search_option = self.beam_search_option.isChecked() + + if not astar_option and not beam_search_option: + raise Exception("No search algorithm selected.") + + if astar_option and beam_search_option: + raise Exception("Both search algorithms selected.") + + # else: + # threshold = self.line_solve_threshold.text() or self.settings.def_iter + # threshold = int(threshold) + # self.astar.set_max_iter(threshold) + + state = wu.convert_to_res_state(self.cubies) + cube = Cube() + cube.from_state(state) + + if cube.is_solved(): + self.line_actions.setText("The cube is already solved.") + self.sol_stats.clear() + self.btn_reset.setEnabled(True) + self.btn_scramble.setEnabled(True) + self.btn_solve.setEnabled(True) + [button.setEnabled(True) for button in self.manual_buttons] + return + + result = None + if astar_option: + print("Start solving...") + print(f"A* Search with Parameters: Batch Size: {self.settings.search_batch_size}, Weight: {self.settings.search_weight}") + result = astar_search_pq(cube, self.settings.search_batch_size, self.settings.search_weight) + + elif beam_search_option: + print("Start solving...") + print(f"Beam Search with Parameters: Beam Width: {self.settings.search_beam_width}, Max Depth: {self.settings.beam_search_max_depth}, Adaptive: {self.settings.adaptive_beam_search}") + result = beam_search(cube, self.settings.search_beam_width, self.settings.beam_search_max_depth, self.settings.adaptive_beam_search) + + if result["success"]: + sol = [] + for i in result["solutions"]: + sol.append(self.move_dict[i]) + + cube.move_list(result["solutions"]) + del cube + self.move_list(sol, result['num_nodes'], result['time_taken']) + else: + self.line_actions.setText("The cube couldn't be solved. You can increase the time or iteration limit.") + self.btn_reset.setEnabled(True) + self.btn_scramble.setEnabled(True) + self.btn_solve.setEnabled(True) + [button.setEnabled(True) for button in self.manual_buttons] + + def reset(self): + self.line_actions.clear() + self.sol_stats.clear() + self.line_scramble_depth.clear() + self.btn_solve.setEnabled(True) + solved = cu.get_solved() + for idx, value in enumerate(solved): + self.cubies[idx][0].setStyleSheet(f"""background-color:{self.VALUE_COLOR[value]};\n""") + self.cubies[idx][1] = self.VALUE_COLOR[value] + + def move_list(self, seq=None, num_nodes=None, time_taken=None): + self.states, self.seq = wu.scramble(self.cubies, seq=seq) + self.btn_reset.setEnabled(False) + self.btn_scramble.setEnabled(False) + self.btn_solve.setEnabled(False) + [button.setEnabled(False) for button in self.manual_buttons] + string_seq = wu.seq_to_string(self.seq) + self.line_actions.setVisible(True) + self.line_actions.setText("Solution:" + string_seq) + self.sol_stats.setVisible(True) + self.sol_stats.setText(f"Solution Length: {len(seq)}, Number of States Explored: {num_nodes}, Time Taken: {round(time_taken, 2)}") + self.i = 0 + self.timer = QtCore.QTimer() + self.timer.timeout.connect(self.act) + self.timer.start(self.settings.actions_delay) + + def scramble(self, seq=None): + + if not seq: + depth = self.line_scramble_depth.text() or self.settings.def_scramble_depth + self.line_scramble_depth.clear() + + if depth == "": + depth = 20 + + depth = int(depth) + _, scramble_move = Cube().randomize_n(depth) + + scramble_list = [] + for i in scramble_move: + scramble_list.append(self.move_dict[i]) + + self.states, self.seq = wu.scramble(self.cubies, seq=scramble_list) + + self.btn_reset.setEnabled(False) + self.btn_scramble.setEnabled(False) + self.btn_solve.setEnabled(False) + [button.setEnabled(False) for button in self.manual_buttons] + string_seq = wu.seq_to_string(self.seq) + self.line_actions.setVisible(True) + self.line_actions.setText("Scramble:" + string_seq) + self.sol_stats.clear() + self.i = 0 + self.timer = QtCore.QTimer() + self.timer.timeout.connect(self.act) + self.timer.start(self.settings.actions_delay) + + def act(self): + if self.i == len(self.states): + self.timer.stop() + self.btn_reset.setEnabled(True) + self.btn_scramble.setEnabled(True) + self.btn_solve.setEnabled(True) + [button.setEnabled(True) for button in self.manual_buttons] + else: + for idx, value in enumerate(self.states[self.i]): + self.cubies[idx][0].setStyleSheet(f"""background-color:{self.VALUE_COLOR[value]};\n""") + self.cubies[idx][1]=self.VALUE_COLOR[value] + self.i+=1 + + + def retranslateUi(self, MainWindow): + _translate = QtCore.QCoreApplication.translate + MainWindow.setWindowTitle(_translate("MainWindow", "Cube Solver")) + self.btn_up.setText(_translate("MainWindow", "U")) + self.btn_up_reverse.setText(_translate("MainWindow", "U\'")) + self.btn_left.setText(_translate("MainWindow", "L")) + self.btn_left_reverse.setText(_translate("MainWindow", "L\'")) + self.btn_front.setText(_translate("MainWindow", "F")) + self.btn_front_reverse.setText(_translate("MainWindow", "F\'")) + self.btn_right.setText(_translate("MainWindow", "R")) + self.btn_right_reverse.setText(_translate("MainWindow", "R\'")) + self.btn_back.setText(_translate("MainWindow", "B")) + self.btn_back_reverse.setText(_translate("MainWindow", "B\'")) + self.btn_down.setText(_translate("MainWindow", "D")) + self.btn_down_reverse.setText(_translate("MainWindow", "D\'")) + self.btn_reset.setText(_translate("MainWindow", "RESET")) + self.btn_solve.setText(_translate("MainWindow", "Solve with:")) + self.astar_option.setText(_translate("MainWindow", "A* Search")) + self.beam_search_option.setText(_translate("MainWindow", "Beam Search")) + self.btn_scramble.setText(_translate("MainWindow", "Scramble")) + self.line_scramble_depth.setPlaceholderText(_translate("MainWindow", "Depth")) + self.btn_settings.setText(_translate("MainWindow", "Settings")) + + +if __name__ == "__main__": + import sys + app = QtWidgets.QApplication(sys.argv) + MainWindow = QtWidgets.QMainWindow() + ui = Ui_MainWindow() + ui.setupUi(MainWindow) + MainWindow.show() + sys.exit(app.exec_()) \ No newline at end of file diff --git a/drafts.py b/utils/drafts.py similarity index 72% rename from drafts.py rename to utils/drafts.py index 67164fb..a2f47c0 100644 --- a/drafts.py +++ b/utils/drafts.py @@ -14,28 +14,7 @@ nnet = load_model() -class Astart_Node: - def __init__(self, cube : str, moves : list[Move]): - self.cube = cube - self.moves = moves - self.g = 0 - self.h = 0 - self.f = 0 - self.parent = None - - def get_possible_moves(self): - return get_allowed_moves(self.moves) - - def is_solved(self): - cube = Cube() - cube.from_string(self.cube) - return cube.is_solved() - - def update_f(self): - self.f = 0.6 * self.g + self.h - - def __eq__(self, other): - return self.cube == other.cube +Astar_Node = namedtuple("Astar_Node", ["cube", "moves", "g", "f"]) def compute_fitness(states): # Convert list of states to a NumPy array (if not already an array) @@ -210,7 +189,7 @@ def __lt__(self, other): return self.fitness < other.fitness -def generate_new_generation(generation: PriorityQueue, prevention): +def generate_new_generation_pq(generation: PriorityQueue, seen_state): new_generation = PriorityQueue() nodes_searched = 0 @@ -219,48 +198,61 @@ def generate_new_generation(generation: PriorityQueue, prevention): while not generation.empty(): _, node = generation.get() - allowed_moves = get_allowed_moves(node.moves) if prevention else Cube().get_possible_moves() - for move in allowed_moves: + allowed_moves = get_allowed_moves(node.moves) + + for move in allowed_moves: new_moves = node.moves + [move] tempcube = Cube() tempcube.from_string(node.cube) tempcube.move(move) - state = tempcube.convert_res_input() - + + if tempcube in seen_state: + continue + if tempcube.is_solved(): - print("Solution found") ans_queue = PriorityQueue() - ans_queue.put((0, Beam_Node(tempcube.to_string(), new_moves, 0, True))) + ans_queue.put((0, Beam_Node(tempcube, new_moves, 0, True))) return ans_queue, nodes_searched, True - batch_states.append(state) + batch_states.append(tempcube.state) batch_info.append((tempcube.to_string(), new_moves)) + + del tempcube + nodes_searched += 1 - + fitness_scores = compute_fitness(batch_states) - for (tempcube_str, new_moves), fitness in zip(batch_info, fitness_scores): - new_generation.put((fitness, Beam_Node(tempcube_str, new_moves, fitness, False))) + for (cube_str, new_moves), fitness in zip(batch_info, fitness_scores): + new_generation.put((fitness, Beam_Node(cube_str, new_moves, fitness, False))) return new_generation, nodes_searched, False -def beam_search(scrambled_cube: Cube, beam_width=1024, max_depth=100, prevention=True) -> dict: - root_fitness = compute_fitness([scrambled_cube.convert_res_input()])[0] +def beam_search_pq(scrambled_cube: Cube, beam_width=1024, max_depth=100) -> dict: + + root_fitness = compute_fitness([scrambled_cube.state])[0] root = Beam_Node(scrambled_cube.to_string(), [], root_fitness, scrambled_cube.is_solved()) + + if root.is_solved: + return {"success" : True, "solutions": [], "num_nodes": 1, "time_taken": 0} + generation = PriorityQueue() generation.put((root_fitness, root)) start_time = time.time() - node_searched = 0 + node_searched = 1 + + seen_state = set() + seen_state.add(scrambled_cube) for depth in range(max_depth + 1): - print(f"Depth: {depth}, min_fitness: {generation.queue[0][0]}, node_searched: {node_searched}") + # print(f"Depth: {depth}, min_fitness: {generation.queue[0][0]}, best_moves: {generation.queue[0][1].moves}, num_nodes: {node_searched}") if depth == max_depth: return {"success": False, "solutions": None, "num_nodes": node_searched, "time_taken": time.time() - start_time} - new_generation, searched_nodes, success = generate_new_generation(generation, prevention) + new_generation, searched_nodes, success = generate_new_generation_pq(generation, seen_state) if success: solution_node = new_generation.get()[1] @@ -269,81 +261,118 @@ def beam_search(scrambled_cube: Cube, beam_width=1024, max_depth=100, prevention node_searched += searched_nodes generation = PriorityQueue() - for _ in range(min(int(beam_width * (1 + (2 * depth)/100)), new_generation.qsize())): + for _ in range(min(beam_width, new_generation.qsize())): if new_generation.empty(): break - generation.put(new_generation.get()) + fitness, node = new_generation.get() + generation.put((fitness, node)) + seen_state.add(node.cube) + + raise Exception("Beam search failed to find a solution") + raise Exception("Beam search failed to find a solution") -def astar_search(scrambled_cube : Cube, N) -> dict: +def astar_search(scrambled_cube : Cube, N, scale_factor) -> dict: - node_searched = 1 + node_explored = 1 start_time = time.time() - open_list : list[Astart_Node] = [] - closed_list : list[Astart_Node] = [] + # a node can be either in the open or closed list, but not both + open_list : list[Astar_Node] = [] + closed_list = set() + cube_to_fitness = {} - initial_h = compute_fitness([scrambled_cube.state])[0] - start_node = Astart_Node(scrambled_cube, []) - start_node.h = initial_h - start_node.update_f() + initial_g = 0 + initial_f = compute_fitness([scrambled_cube.state])[0] + (scale_factor * initial_g) + start_node = Astar_Node(scrambled_cube.to_string(), [], initial_g, initial_f) open_list.append(start_node) + cube_to_fitness[scrambled_cube.__hash__()] = start_node.f + + iteration = 1 while open_list: + if iteration == 1 or iteration % 2 == 0: + print(f"Iteration: {iteration}") + print(f"Open List Size: {len(open_list)}") + + initial_time = time.time() + # Sort open_list by f-value and select the N best nodes - best_nodes = sorted(open_list, key=lambda x: x.f)[:N] - + open_list.sort(key=lambda x: x.f) + best_nodes = [] + + for _ in range(min(N, len(open_list))): + if open_list and open_list[0].cube in closed_list: + del open_list[0] + continue + + best_nodes.append(open_list[0]) + closed_list.add(open_list[0].cube) + + del open_list[0] + + batch_time = time.time() + + if iteration == 1 or iteration % 2 == 0: + print(f"Batch Time: {batch_time - initial_time}") + batch_states = [] batch_info = [] - + for node in best_nodes: - open_list.remove(node) - closed_list.append(node) - allowed_moves = node.get_possible_moves() - + allowed_moves = get_allowed_moves(node.moves) + for move in allowed_moves: new_moves = node.moves + [move] - tempcube = node.cube.copy() + tempcube = Cube() + tempcube.from_string(node.cube) tempcube.move(move) if tempcube.is_solved(): - return {"success": True, "solutions": new_moves, "length": len(new_moves), "num_nodes": node_searched, "time_taken": time.time() - start_time} + return {"success": True, "solutions": new_moves, "length": len(new_moves), "num_nodes": node_explored, "time_taken": time.time() - start_time} batch_states.append(tempcube.state) - batch_info.append((tempcube, new_moves, node)) - - # Convert batch_states to numpy array and compute fitness - batch_states_np = np.array(batch_states) - fitness_scores = compute_fitness(batch_states_np) - - for (cube, new_moves, parent), fitness in zip(batch_info, fitness_scores): - new_node = Astart_Node(cube, new_moves) - new_node.g = parent.g + 1 - new_node.h = fitness - new_node.update_f() - new_node.parent = parent - - for open_node in open_list: - if open_node.cube == new_node.cube and open_node.f <= new_node.f: - continue + batch_info.append((tempcube.to_string(), new_moves, node.g , tempcube.__hash__())) - for closed_node in closed_list: - if closed_node.cube == new_node.cube: - if closed_node.f <= new_node.f: - continue - else: - closed_list.remove(closed_node) + del tempcube - open_list.append(new_node) - node_searched += 1 + prepare_time = time.time() + if iteration == 1 or iteration % 2 == 0: + print(f"Prepare Time: {prepare_time - batch_time}") + + # Convert batch_states to numpy array and compute fitness + fitness_scores = compute_fitness(batch_states) + compute_time = time.time() - + if iteration == 1 or iteration % 2 == 0: + print(f"Compute Time: {compute_time - prepare_time}") + + for ((cube_str, new_moves, g, cube_hash), fitness) in zip(batch_info, fitness_scores): + updated_g = g + 1 + updated_f = (scale_factor * updated_g) + fitness + new_node : Astar_Node = Astar_Node(cube_str, new_moves, updated_g, updated_f) + + score = cube_to_fitness.get(cube_hash) + if score and score <= new_node.f: + continue + + cube_to_fitness[cube_hash] = new_node.f + open_list.append(new_node) + + node_explored += 1 + + check_time = time.time() + if iteration == 1 or iteration % 2 == 0: + print(f"Check Time: {check_time - compute_time}") + print(f"total time: {check_time - initial_time}\n") - return {"success" : False, "solutions": None, "num_nodes": node_searched, "time_taken": time.time() - start_time} + iteration += 1 + # print(f"Nodes Explored: {node_explored}") + return {"success" : False, "solutions": None, "num_nodes": node_explored, "time_taken": time.time() - start_time} if __name__ == "__main__": from scramble100 import scrambles diff --git a/utils/settings_dialog.py b/utils/settings_dialog.py new file mode 100644 index 0000000..43aedb4 --- /dev/null +++ b/utils/settings_dialog.py @@ -0,0 +1,179 @@ +from PyQt5 import QtCore, QtGui, QtWidgets +from PyQt5.QtGui import QIntValidator,QDoubleValidator + + +class Ui_SettingsDialog(QtWidgets.QDialog): + def __init__(self,settings): + self.settings = settings + super(Ui_SettingsDialog, self).__init__() + self.ui = Ui_Dialog() + self.ui.setupUi(self,self.settings) + + +class Ui_Dialog(object): + def setupUi(self, Dialog,settings): + self.settings = settings + Dialog.setObjectName("Dialog") + Dialog.resize(500, 320) + Dialog.setMinimumSize(QtCore.QSize(400, 320)) + Dialog.setMaximumSize(QtCore.QSize(900, 350)) + self.verticalLayout = QtWidgets.QVBoxLayout(Dialog) + self.verticalLayout.setObjectName("verticalLayout") + self.formLayout_2 = QtWidgets.QFormLayout() + self.formLayout_2.setObjectName("formLayout_2") + self.label = QtWidgets.QLabel(Dialog) + font = QtGui.QFont() + font.setPointSize(12) + self.label.setFont(font) + self.label.setObjectName("label") + self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label) + self.line_delay = QtWidgets.QLineEdit(Dialog) + font = QtGui.QFont() + font.setPointSize(12) + self.line_delay.setFont(font) + self.line_delay.setMaxLength(4) + self.line_delay.setObjectName("line_delay") + self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.line_delay) + self.label_2 = QtWidgets.QLabel(Dialog) + font = QtGui.QFont() + font.setPointSize(12) + self.label_2.setFont(font) + self.label_2.setObjectName("label_2") + self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_2) + self.line_weight = QtWidgets.QLineEdit(Dialog) + font = QtGui.QFont() + font.setPointSize(12) + self.line_weight.setFont(font) + self.line_weight.setMaxLength(4) + self.line_weight.setObjectName("line_weight") + self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.line_weight) + self.label_3 = QtWidgets.QLabel(Dialog) + font = QtGui.QFont() + font.setPointSize(12) + self.label_3.setFont(font) + self.label_3.setObjectName("label_3") + self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_3) + self.line_batch_size = QtWidgets.QLineEdit(Dialog) + font = QtGui.QFont() + font.setPointSize(12) + self.line_batch_size.setFont(font) + self.line_batch_size.setMaxLength(3) + self.line_batch_size.setObjectName("line_batch_size") + self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.line_batch_size) + self.label_4 = QtWidgets.QLabel(Dialog) + font = QtGui.QFont() + font.setPointSize(12) + self.label_4.setFont(font) + self.label_4.setObjectName("label_4") + self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_4) + self.line_def_depth = QtWidgets.QLineEdit(Dialog) + font = QtGui.QFont() + font.setPointSize(12) + self.line_def_depth.setFont(font) + self.line_def_depth.setMaxLength(3) + self.line_def_depth.setObjectName("line_def_depth") + self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.line_def_depth) + self.label_5 = QtWidgets.QLabel(Dialog) + font = QtGui.QFont() + font.setPointSize(12) + self.label_5.setFont(font) + self.label_5.setObjectName("label_5") + self.formLayout_2.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_5) + self.line_default_time_threshold = QtWidgets.QLineEdit(Dialog) + font = QtGui.QFont() + font.setPointSize(12) + self.line_default_time_threshold.setFont(font) + self.line_default_time_threshold.setMaxLength(4) + self.line_default_time_threshold.setObjectName("line_default_time_threshold") + self.formLayout_2.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.line_default_time_threshold) + self.label_6 = QtWidgets.QLabel(Dialog) + font = QtGui.QFont() + font.setPointSize(12) + self.label_6.setFont(font) + self.label_6.setObjectName("label_6") + self.formLayout_2.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_6) + self.line_default_iter_threshold = QtWidgets.QLineEdit(Dialog) + font = QtGui.QFont() + font.setPointSize(12) + self.line_default_iter_threshold.setFont(font) + self.line_default_iter_threshold.setMaxLength(4) + self.line_default_iter_threshold.setObjectName("line_default_iter_threshold") + self.formLayout_2.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.line_default_iter_threshold) + self.verticalLayout.addLayout(self.formLayout_2) + self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) + self.buttonBox.setOrientation(QtCore.Qt.Horizontal) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) + self.buttonBox.setObjectName("buttonBox") + self.verticalLayout.addWidget(self.buttonBox) + self.verticalLayout.addWidget(self.buttonBox) + self.line_delay.setValidator(QIntValidator()) + self.line_batch_size.setValidator(QIntValidator()) + self.line_default_iter_threshold.setValidator(QIntValidator()) + self.line_default_time_threshold.setValidator(QIntValidator()) + self.line_def_depth.setValidator(QIntValidator()) + self.line_weight.setValidator(QDoubleValidator(0.0, 1.0, 2)) + + self.line_delay.setPlaceholderText(f"Old value : {self.settings.actions_delay}ms") + self.line_weight.setPlaceholderText(f"Old value : {self.settings.search_weight}") + self.line_default_time_threshold.setPlaceholderText(f"Old value : {self.settings.def_time}s") + self.line_default_iter_threshold.setPlaceholderText(f"Old value : {self.settings.def_time}") + self.line_batch_size.setPlaceholderText(f"Old value : {self.settings.search_batch_size}") + self.line_def_depth.setPlaceholderText(f"Old value : {self.settings.def_scramble_depth}") + + self.buttonBox.accepted.connect(self.accept) + self.retranslateUi(Dialog) + self.buttonBox.accepted.connect(Dialog.accept) + self.buttonBox.rejected.connect(Dialog.reject) + QtCore.QMetaObject.connectSlotsByName(Dialog) + + def validate(self,value,lower,upper=None): + if valueupper: + return False + return True + + + def accept(self): + delay = self.line_delay.text() or self.settings.actions_delay + delay = int(delay) + if not self.validate(delay,0): + delay = self.settings.actions_delay + self.settings.actions_delay = delay + weight = self.line_weight.text() or self.settings.search_weight + weight = float(weight) + if not self.validate(weight,0,1): + weight = self.settings.search_weight + self.settings.search_weight = weight + def_time = self.line_default_time_threshold.text() or self.settings.def_time + def_time = int(def_time) + if not self.validate(def_time,1): + def_time = self.settings.def_time + self.settings.def_time = def_time + def_iter = self.line_default_iter_threshold.text() or self.settings.def_iter + def_iter = int(def_iter) + if not self.validate(def_iter,1): + def_iter = self.settings.def_iter + self.settings.def_iter = def_iter + batch_size = self.line_batch_size.text() or self.settings.search_batch_size + batch_size = int(batch_size) + if not self.validate(batch_size,1,1000): + batch_size = self.settings.search_batch_size + self.settings.search_batch_size = batch_size + def_depth = self.line_def_depth.text() or self.settings.def_scramble_depth + def_depth = int(def_depth) + if not self.validate(def_depth,1,200): + def_depth = self.settings.def_scramble_depth + self.settings.def_scramble_depth = def_depth + + def retranslateUi(self, Dialog): + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "Dialog")) + self.label.setText(_translate("Dialog", "Actions Delay(ms.) :")) + self.label_2.setText(_translate("Dialog", "A* weight :")) + self.label_3.setText(_translate("Dialog", "A* Batch Size :")) + self.label_4.setText(_translate("Dialog", "Default scramble depth : ")) + self.label_5.setText(_translate("Dialog", "Default time threshold :")) + self.label_6.setText(_translate("Dialog", "Default iter. threshold : ")) + diff --git a/utils/text_analysis.py b/utils/text_analysis.py new file mode 100644 index 0000000..8a7ae7f --- /dev/null +++ b/utils/text_analysis.py @@ -0,0 +1,387 @@ +file = "AStarList.csv" + +text = """ +Iteration: 1 +Open List Size: 1 +Batch Time: 1.2874603271484375e-05 +Prepare Time: 0.0007798671722412109 +Compute Time: 0.003116130828857422 +Check Time: 0.00012636184692382812 +total time: 0.004035234451293945 + +Iteration: 2 +Open List Size: 12 +Batch Time: 3.6716461181640625e-05 +Prepare Time: 0.006631135940551758 +Compute Time: 0.007340192794799805 +Check Time: 0.00040793418884277344 +total time: 0.014415979385375977 + +Iteration: 4 +Open List Size: 1068 +Batch Time: 0.004849672317504883 +Prepare Time: 0.671586275100708 +Compute Time: 0.17975521087646484 +Check Time: 0.028857707977294922 +total time: 0.8850488662719727 + +Iteration: 6 +Open List Size: 36920 +Batch Time: 0.23144936561584473 +Prepare Time: 1.690781831741333 +Compute Time: 0.3628866672515869 +Check Time: 0.1231529712677002 +total time: 2.408270835876465 + +Iteration: 8 +Open List Size: 93355 +Batch Time: 0.35564255714416504 +Prepare Time: 1.6938610076904297 +Compute Time: 0.3495781421661377 +Check Time: 0.16141366958618164 +total time: 2.560495376586914 + +Iteration: 10 +Open List Size: 149951 +Batch Time: 0.4654395580291748 +Prepare Time: 1.679875135421753 +Compute Time: 0.4209473133087158 +Check Time: 0.19761109352111816 +total time: 2.7638731002807617 + +Iteration: 12 +Open List Size: 206186 +Batch Time: 0.5880885124206543 +Prepare Time: 1.810049295425415 +Compute Time: 0.34201478958129883 +Check Time: 0.08222842216491699 +total time: 2.822381019592285 + +Iteration: 14 +Open List Size: 262281 +Batch Time: 0.7002136707305908 +Prepare Time: 1.704401969909668 +Compute Time: 0.3449845314025879 +Check Time: 0.08631253242492676 +total time: 2.8359127044677734 + +Iteration: 16 +Open List Size: 318469 +Batch Time: 0.8099842071533203 +Prepare Time: 1.7322185039520264 +Compute Time: 0.34914731979370117 +Check Time: 0.08891177177429199 +total time: 2.98026180267334 + +Iteration: 18 +Open List Size: 374667 +Batch Time: 0.874018669128418 +Prepare Time: 1.7077486515045166 +Compute Time: 0.33286142349243164 +Check Time: 0.08222293853759766 +total time: 2.996851682662964 + +Iteration: 20 +Open List Size: 430699 +Batch Time: 1.591015338897705 +Prepare Time: 1.7348651885986328 +Compute Time: 0.34294843673706055 +Check Time: 0.0897054672241211 +total time: 3.7585344314575195 + +Iteration: 22 +Open List Size: 486887 +Batch Time: 1.267815351486206 +Prepare Time: 1.7408347129821777 +Compute Time: 0.3266618251800537 +Check Time: 0.08802628517150879 +total time: 3.4233381748199463 + +Iteration: 24 +Open List Size: 543007 +Batch Time: 1.8767430782318115 +Prepare Time: 2.129680633544922 +Compute Time: 0.3870420455932617 +Check Time: 0.08708047866821289 +total time: 4.480546236038208 + +Iteration: 26 +Open List Size: 598970 +Batch Time: 1.8500094413757324 +Prepare Time: 1.704484462738037 +Compute Time: 0.34801268577575684 +Check Time: 0.10614800453186035 +total time: 4.008654594421387 + +Iteration: 28 +Open List Size: 654998 +Batch Time: 2.1778852939605713 +Prepare Time: 1.7195298671722412 +Compute Time: 0.4274563789367676 +Check Time: 0.09143400192260742 +total time: 4.4163055419921875 + +Iteration: 30 +Open List Size: 710977 +Batch Time: 2.6661698818206787 +Prepare Time: 1.7319281101226807 +Compute Time: 0.36532139778137207 +Check Time: 0.08448529243469238 +total time: 4.847904682159424 + +Iteration: 32 +Open List Size: 767090 +Batch Time: 2.7307910919189453 +Prepare Time: 1.7268695831298828 +Compute Time: 0.33415865898132324 +Check Time: 0.08444046974182129 +total time: 4.876259803771973 + +Iteration: 34 +Open List Size: 823105 +Batch Time: 2.755009889602661 +Prepare Time: 1.719940423965454 +Compute Time: 0.32895874977111816 +Check Time: 0.08394598960876465 +total time: 4.887855052947998 + +Iteration: 36 +Open List Size: 879097 +Batch Time: 3.0496931076049805 +Prepare Time: 1.6962742805480957 +Compute Time: 0.3492298126220703 +Check Time: 0.08265113830566406 +total time: 5.1778483390808105 + +Iteration: 38 +Open List Size: 935259 +Batch Time: 3.4862442016601562 +Prepare Time: 1.7083566188812256 +Compute Time: 0.34024882316589355 +Check Time: 0.08401823043823242 +total time: 5.618867874145508 + +Iteration: 40 +Open List Size: 991280 +Batch Time: 3.7823922634124756 +Prepare Time: 1.7168302536010742 +Compute Time: 0.3424086570739746 +Check Time: 0.6499359607696533 +total time: 6.491567134857178 + +Iteration: 42 +Open List Size: 1047269 +Batch Time: 4.222656726837158 +Prepare Time: 1.9512357711791992 +Compute Time: 0.42587947845458984 +Check Time: 0.09067320823669434 +total time: 6.690445184707642 + +Iteration: 44 +Open List Size: 1103382 +Batch Time: 4.441939830780029 +Prepare Time: 1.7261991500854492 +Compute Time: 0.33483099937438965 +Check Time: 0.0838630199432373 +total time: 6.5868330001831055 + +Iteration: 46 +Open List Size: 1159344 +Batch Time: 4.22368597984314 +Prepare Time: 2.501943349838257 +Compute Time: 0.35712575912475586 +Check Time: 0.09401965141296387 +total time: 7.176774740219116 + +Iteration: 48 +Open List Size: 1215400 +Batch Time: 5.344472885131836 +Prepare Time: 1.7433505058288574 +Compute Time: 0.33666539192199707 +Check Time: 0.08915400505065918 +total time: 7.51364278793335 + +Iteration: 50 +Open List Size: 1271555 +Batch Time: 4.831951856613159 +Prepare Time: 1.801839828491211 +Compute Time: 0.33130669593811035 +Check Time: 0.08500838279724121 +total time: 7.050106763839722 + +Iteration: 52 +Open List Size: 1327598 +Batch Time: 5.550878524780273 +Prepare Time: 1.9555716514587402 +Compute Time: 0.42690515518188477 +Check Time: 0.09193658828735352 +total time: 8.025291919708252 + +Iteration: 54 +Open List Size: 1383648 +Batch Time: 5.289432048797607 +Prepare Time: 1.7284605503082275 +Compute Time: 0.34327077865600586 +Check Time: 0.08337736129760742 +total time: 7.444540739059448 + +Iteration: 56 +Open List Size: 1439596 +Batch Time: 5.425415515899658 +Prepare Time: 1.7883963584899902 +Compute Time: 0.35346078872680664 +Check Time: 0.0860595703125 +total time: 7.653332233428955 + +Iteration: 58 +Open List Size: 1495587 +Batch Time: 5.465919733047485 +Prepare Time: 1.744382619857788 +Compute Time: 0.3475301265716553 +Check Time: 0.08861994743347168 +total time: 7.6464524269104 + +Iteration: 60 +Open List Size: 1551562 +Batch Time: 6.238528251647949 +Prepare Time: 2.68929386138916 +Compute Time: 0.35859203338623047 +Check Time: 0.0888361930847168 +total time: 9.375250339508057 + +Iteration: 62 +Open List Size: 1607606 +Batch Time: 5.721263647079468 +Prepare Time: 1.7094635963439941 +Compute Time: 0.35004687309265137 +Check Time: 0.08289790153503418 +total time: 7.8636720180511475 + +Iteration: 64 +Open List Size: 1663522 +Batch Time: 6.201148986816406 +Prepare Time: 1.748889684677124 +Compute Time: 0.39062952995300293 +Check Time: 0.08910441398620605 +total time: 8.42977261543274 + +Iteration: 66 +Open List Size: 1719528 +Batch Time: 6.311014413833618 +Prepare Time: 1.7154338359832764 +Compute Time: 0.34247565269470215 +Check Time: 0.09274458885192871 +total time: 8.461668491363525 + +Iteration: 68 +Open List Size: 1775441 +Batch Time: 6.404118776321411 +Prepare Time: 1.6973848342895508 +Compute Time: 0.34423828125 +Check Time: 1.1519861221313477 +total time: 9.59772801399231 + +Iteration: 70 +Open List Size: 1831480 +Batch Time: 6.254588842391968 +Prepare Time: 1.702868938446045 +Compute Time: 0.326946496963501 +Check Time: 0.08402824401855469 +total time: 8.368432521820068 + +Iteration: 72 +Open List Size: 1887477 +Batch Time: 7.120541095733643 +Prepare Time: 1.7344017028808594 +Compute Time: 0.35193943977355957 +Check Time: 0.09241795539855957 +total time: 9.299300193786621 + +Iteration: 74 +Open List Size: 1943450 +Batch Time: 7.556537866592407 +Prepare Time: 1.729332685470581 +Compute Time: 0.32794189453125 +Check Time: 0.08573508262634277 +total time: 9.699547529220581 + +Iteration: 76 +Open List Size: 1999451 +Batch Time: 6.9561333656311035 +Prepare Time: 1.701998233795166 +Compute Time: 0.3881556987762451 +Check Time: 0.08626055717468262 +total time: 9.132547855377197 + +Iteration: 78 +Open List Size: 2055427 +Batch Time: 7.8917248249053955 +Prepare Time: 1.7277023792266846 +Compute Time: 0.3438091278076172 +Check Time: 1.4330663681030273 +total time: 11.396302700042725 + +Iteration: 80 +Open List Size: 2111411 +Batch Time: 8.134589433670044 +Prepare Time: 1.7268273830413818 +Compute Time: 0.41082048416137695 +Check Time: 0.0859825611114502 +total time: 10.358219861984253 + +Iteration: 82 +Open List Size: 2167337 +Batch Time: 8.918860912322998 +Prepare Time: 1.7884159088134766 +Compute Time: 0.3848295211791992 +Check Time: 0.08690881729125977 +total time: 11.179015159606934 + +Iteration: 84 +Open List Size: 2223355 +Batch Time: 8.215734004974365 +Prepare Time: 1.7715024948120117 +Compute Time: 0.48146963119506836 +Check Time: 0.08950567245483398 +total time: 10.55821180343628 +""" + +with open(file, "w") as f1: + text = text.strip() + text = text.split("\n") + index = 0 + + + + f1.write("Iteration\tOpen List Size\tBatch Time\tPrepare Time\tCompute Time\tCheck Time\tTotal Time\n") + + temp_str = "" + for i in text: + if i == "": + continue + + if index == 0: + temp_str += i.split(": ")[1] + "\t" + + if index == 1: + temp_str += i.split(": ")[1] + "\t" + + if index == 2: + temp_str += i.split(": ")[1] + "\t" + + if index == 3: + temp_str += i.split(": ")[1] + "\t" + + if index == 4: + temp_str += i.split(": ")[1] + "\t" + + if index == 5: + temp_str += i.split(": ")[1] + "\t" + + if index == 6: + temp_str += i.split(": ")[1] + "\n" + f1.write(temp_str) + temp_str = "" + index = -1 + + index += 1 \ No newline at end of file diff --git a/utils/widgets_utils.py b/utils/widgets_utils.py new file mode 100644 index 0000000..9d49d44 --- /dev/null +++ b/utils/widgets_utils.py @@ -0,0 +1,111 @@ +from dataclasses import dataclass +import numpy as np +import utils.cube_utils as cube + +""" +Colors: + + 0 1 2 + 3 4 5 + 6 7 8 + 9 10 11 18 19 20 27 28 29 36 37 38 + 12 13 14 21 22 23 30 31 32 39 40 41 + 15 16 17 24 25 26 33 34 35 42 43 44 + 45 46 47 + 48 49 50 + 51 52 53 + +translate to: + | 2 5 8 | + | 1 4 7 | + | 0 3 6 | + -------------------------------------------- + 20 23 26 | 47 50 53 | 29 32 35 | 38 41 44 + 19 22 25 | 46 49 52 | 28 31 34 | 37 40 43 + 18 21 24 | 45 48 51 | 27 30 33 | 36 39 42 + -------------------------------------------- + | 11 14 17 | + | 10 13 16 | + | 9 12 15 | +""" + +cubie_to_state = { + 0 : 2, 1 : 5, 2 : 8, 3 : 1, 4 : 4, 5 : 7, 6 : 0, 7 : 3, 8 : 6, + 9 : 20, 10 : 23, 11 : 26, 12 : 19, 13 : 22, 14 : 25, 15 : 18, 16 : 21, 17 : 24, + 18 : 47, 19 : 50, 20 : 53, 21 : 46, 22 : 49, 23 : 52, 24 : 45, 25 : 48, 26 : 51, + 27 : 29, 28 : 32, 29 : 35, 30 : 28, 31 : 31, 32 : 34, 33 : 27, 34 : 30, 35 : 33, + 36 : 38, 37 : 41, 38 : 44, 39 : 37, 40 : 40, 41 : 43, 42 : 36, 43 : 39, 44 : 42, + 45 : 11, 46 : 14, 47 : 17, 48 : 10, 49 : 13, 50 : 16, 51 : 9, 52 : 12, 53 : 15 +} + +state_to_cubie = {v: k for k, v in cubie_to_state.items()} + +color_dict = { + "blue": 0, + "green" : 1, + "orange" : 2, + "red" : 3, + "yellow" : 4, + "white" : 5 +} + + +COLOR_VALUE = {"blue":0,"orange":1,"white":2,"red":3,"yellow":4,"green":5} +VALUE_COLOR = ["blue","orange","white","red","yellow","green"] +ACTIONS = ["U", "L", "F", "R", "B", "D", "U'", "L'", "F'", "R'", "B'", "D'"] + + +def seq_to_string(seq): + global ACTIONS + string_seq = "" + for action in seq: + string_seq = string_seq+" "+ACTIONS[action] + return string_seq + +def convert_to_res_state(cubie): + state = np.array([0]*54) + for i, cub in enumerate(cubie): + state[cubie_to_state[i]] = color_dict[cub[1]] + return state + +def cubies_to_state(cubies): + global COLOR_VALUE + state = np.zeros((54,),dtype=np.ushort) + for idx,cubie in enumerate(cubies): + state[idx] = COLOR_VALUE[cubie[1]] + return state + +def scramble(cubies,seq=None): + global VALUE_COLOR + + state = cubies_to_state(cubies) + states = [] + + for action in seq: + state = state[cube.idxs[action]] + states.append(state.copy()) + + return states,seq + +@dataclass() +class Settings: + search_weight: float = 0.3 + search_batch_size: int = 3000 + + search_beam_width: int = 2000 + adaptive_beam_search: bool = False + beam_search_max_depth: int = 100 + + actions_delay: int = 250 + def_scramble_depth: int = 20 + def_time: int = 30 + def_iter: int = 100 + + + +if __name__=="__main__": + str = "B F U R U F' F B' U' D' F U' I " + + cubie = [['things', 'blue'], ['things', 'blue'], ['things', 'blue'], ['things', 'blue'], ['things', 'blue'], ['things', 'blue'], ['things', 'blue'], ['things', 'blue'], ['things', 'blue'], ['things', 'white'], ['things', 'white'], ['things', 'white'], ['things', 'orange'], ['things', 'orange'], ['things', 'orange'], ['things', 'orange'], ['things', 'orange'], ['things', 'orange'], ['things', 'red'], ['things', 'red'], ['things', 'red'], ['things', 'white'], ['things', 'white'], ['things', 'white'], ['things', 'white'], ['things', 'white'], ['things', 'white'], ['things', 'yellow'], ['things', 'yellow'], ['things', 'yellow'], ['things', 'red'], ['things', 'red'], ['things', 'red'], ['things', 'red'], ['things', 'red'], ['things', 'red'], ['things', 'orange'], ['things', 'orange'], ['things', 'orange'], ['things', 'yellow'], ['things', 'yellow'], ['things', 'yellow'], ['things', 'yellow'], ['things', 'yellow'], ['things', 'yellow'], ['things', 'green'], ['things', 'green'], ['things', 'green'], ['things', 'green'], ['things', 'green'], ['things', 'green'], ['things', 'green'], ['things', 'green'], ['things', 'green']] + + print(convert_to_res_state(cubie)) \ No newline at end of file