Пример #1
0
		sys.exit(2)

	else:
		try:
			inputhandler=Inputhandler()
			MAP=inputhandler.filetostr(sys.argv[1])
		except IOError:
			sys.stderr.write("ERROR: Cannot read inputfile\n")
			sys.exit(1)
	# this section of inputing files is referred from the codes provided in NLP course, Columbia University, COMS 4705 2013


	inputhandler=Inputhandler()
	
	warehouse=Warehouse(MAP)
	warehouse.setiniworkerposi()

	print ("The configuration of the input:") 
	warehouse.show()

	root=node(warehouse)  # load to the tree
			
	instr=""
	solution=""
	while(1):
		print("\nplease choose the searching method:\nb :BFS\nd :DFS\nu :UCS")
		print("g_1 :Greedy best first search (heuristic 1)") 
		print("g_2 :Greedy best first search (heuristic 2)")
		print("a_1 :A* search (heuristic 1)")
		print("a_2 :A* search (heuristic 2)")
		print("Others :quit")