Project

General

Profile

« Previous | Next » 

Revision b9633e5f

Added by Leszek Koltunski about 1 year ago

Progress with TablebasesPruning

View differences:

src/main/java/org/distorted/objectlib/tablebases/TablebasesPruning.java
251 251
        break;
252 252
        }
253 253

  
254
    if( tableIndex<0 )
255
      {
256
      android.util.Log.e("D", "block doesn't contain index "+index);
257
      return null;
258
      }
254
    if( tableIndex<0 ) return null;
259 255

  
260 256
    int[][] ret = new int[tableIndex+2][4];
261 257
    ret[0][1] = tables[0].getLevel()-1;
......
358 354

  
359 355
    int[][] solution = new int[maxJump+1][4];
360 356

  
361
    for(int i=1; i<maxJump; i++)
357
    for(int i=1; i<=maxJump; i++)
362 358
      if( jumpMidZeroRecursive(index,i,1,lastA,lastR,solution) )
363 359
        {
364 360
        solution[0][0] = i;
......
383 379
    move[2]=1;
384 380
    move[3]=1;
385 381

  
382
if( jump==3 ) android.util.Log.e("D", "trying index="+index+" depth="+depth+" lastA="+lastA+" lastR="+lastR);
383

  
386 384
    for(int ax=0; ax<mNumAxis; ax++)
387 385
      for(int cubit=0; cubit<mNumCubits; cubit++)
388 386
        rotRow[cubit][ax] = computeRow(mPosition[cubit],quats[cubit],ax);
......
473 471
    {
474 472
    int[][] solution = new int[maxJump+1][4];
475 473

  
476
    for(int i=1; i<maxJump; i++)
474
    for(int i=1; i<=maxJump; i++)
477 475
      if( jumpZeroRecursive(index,i,1,lastA,lastR,solution) )
478 476
        {
479 477
        solution[0][0] = i;
......
553 551
      }
554 552
    else throw new RuntimeException("error traversing mid Tables");
555 553

  
556
android.util.Log.e("D", "");
554
android.util.Log.e("D", "index now="+index+" depth now "+midMoves[0][1]+" ax="+midMoves[1][0]+" row="+midMoves[1][1]+" angle="+midMoves[1][2]);
557 555

  
558 556
    int[][] jump2Moves = jumpToZero(index,mLowestMid-1,lastA,lastR);
559 557
    if( jump2Moves==null ) throw new RuntimeException("2 error jumping to 0");

Also available in: Unified diff