Commits

Evan Gates  committed 155410f

don't recross boundaries between phase 1 and 2 (misses some solutions, won't prove optimal, but faster according to kociemba)

  • Participants
  • Parent commits 521ca31

Comments (0)

Files changed (1)

 	int i, e_tmp, c_tmp, ud_tmp, face, success;
 
 	if (timeout && num) return 1;
-	if (e_coord == 0 && c_coord == 0 && ud_coord == 0 && depth == 0) { /* found a solution at the desired depth */
+	if (e_coord == 0 && c_coord == 0 && ud_coord == 0) {// && depth == 0) { /* found a solution at the desired depth */
 		if (!phase) { /* we are in the first phase, let's do the second phase */
-			//if (depth != 0) return 0;
+			if (depth != 0) return 0;
 			copy_cube(1, co_, eo_, cp_, ep_);
 			for (i = 20 - p1_len; i < 20; i++)
 				do_move(sol[i]);
 
 	while (fgets(buf, sizeof(buf), stdin)) {
 		set_cube(buf);
+		if (verbose) puts(get_cube(buf, sizeof(buf)));
 
 		memset(sol, -1, sizeof(sol));
 		num = 0;