Project

General

Profile

« Previous | Next » 

Revision b6fe91ce

Added by Leszek Koltunski over 1 year ago

CU_323 solver: progress and slight speedup for the 'old' solver.

View differences:

src/main/java/org/distorted/solvers/SolverCuboid323.java
276 276
    if( result1<0 ) return result1;
277 277

  
278 278
//android.util.Log.e("D", "upper: "+mUpper);
279
for(int i=0; i<6; i++) android.util.Log.e("D", "face color: "+mFaceColors[i]);
279
//for(int i=0; i<6; i++) android.util.Log.e("D", "face color: "+mFaceColors[i]);
280 280

  
281 281
    int[] edge_perm8 = new int[8];
282 282
    int result2 = retEdgePermutation(edge_perm8,edges);
283 283
    if( result2<0 ) return result2;
284 284

  
285 285
    int[] edge_perm7 = TBCuboid323.edgePermTo7(edge_perm8);
286

  
286
/*
287 287
    TablebaseHelpers.displayTable(corner_perm, "CORNER PERM");
288 288
    TablebaseHelpers.displayTable(edge_perm8, "EDGE PERM8");
289 289
    TablebaseHelpers.displayTable(edge_perm7, "EDGE PERM7");
290

  
290
*/
291 291
    int corner_perm_num = TablebaseHelpers.computePermutationNum(corner_perm);
292 292
    int edge_perm_num = TablebaseHelpers.computePermutationNum(edge_perm7);
293 293
    int centersInPlace = (centers[0]==mFaceColors[2]) ? 0 : 1;
294 294

  
295
android.util.Log.e("D", "corner_perm_num: "+corner_perm_num+" edge_perm_num: "+edge_perm_num+" inPlace: "+centersInPlace);
296
android.util.Log.e("D", "index="+(corner_perm_num + 40320*( centersInPlace + 2*edge_perm_num)));
295
//android.util.Log.e("D", "corner_perm_num: "+corner_perm_num+" edge_perm_num: "+edge_perm_num+" inPlace: "+centersInPlace);
296
//android.util.Log.e("D", "index="+(corner_perm_num + 40320*( centersInPlace + 2*edge_perm_num)));
297 297

  
298 298
    return corner_perm_num + 40320*( centersInPlace + 2*edge_perm_num);
299 299
    }
......
439 439
    }
440 440

  
441 441
///////////////////////////////////////////////////////////////////////////////////////////////////
442
// a few cu_323 max (depth 18) indices:
443
// 8725992, 10024750, 73384014, ... , 404166008
442 444

  
443 445
  public int[][] solution(int index, OperatingSystemInterface os)
444 446
    {

Also available in: Unified diff