root = init(states,statedict,numcolors) start_time = time.time() answer = forward_checking(mystatedict,statedict,numcolors,root,states,0) end_time = time.time() count = 0 for key in answer[1]: count+=1 if answer[1][key] in getcolors(statedict[key],mystatedict): print("oops") print("VERIFIED ANSWER") print(answer) print("NUMBER OF BACKTRACKS: "+ str(backtracks)) print("TIME OF EXECUTION: " + str(end_time - start_time) + "seconds") print(len(all_states)) for i in range(0,len(all_states),2000): colormap(all_states[i]) colormap(mystatedict) time.sleep(10)
'nsw':['q','v','sa'], 'v':['sa','nsw']} """ my_state_dict = {} root = init(states, state_dict, num_colours) starttime = time.time() answer = dfs_heuristic_included(my_state_dict, state_dict, num_colours, root, states, 0, legal_colours) endtime = time.time() count = 0 for key in answer[1]: count += 1 if answer[1][key] in getcolours(state_dict[key], my_state_dict): print("oops") print(len(allstates)) for i in range(0, len(allstates), 200): colormap(allstates[i]) colormap(my_state_dict) time.sleep(10) print("VERIFIED ANSWER") print(answer) print("NUMBER OF backtrack: " + str(backtrack)) print("TIME OF EXECUTION: " + str(endtime - starttime) + "seconds")