dougbenham
Member
To fix the prunning table issue, I simply suggest to compute table with the following flag :
1/ ignoring edge
2/ edge corect orientation
3/ edge corect permutation
1/ ignoring corners
2/ corners corect orientation
3/ corners corect permutation
The number of table to précompute isn't so important. I you have 2 "don't care permutation" edges, then use the 2 and if you have 2 "don't care orientation" edges, then use the 1 . The pruning table can be sub-optimal in these case, but allox an optimal solution to be found.
To allow automated computations, you should add a paramter xxx move more than optimal and xxx move max instead of press n or enter.
Well I understand the concept/theory behind the new tables. I'm just not sure how to programmatically implement it. Perhaps someone that is familiar with the program can help me out.
Here is a snippet of the pruning table calculator:
Code:
l=1;
do{
n=0;
if( turnMetric ){
for( i0=0; i0<NUMSHAPES; i0++ ){
for( i1=0; i1<70; i1++){
for( i2=0; i2<70; i2++){
if( table[i0][i1][i2]==l ){
for( m=0; m<3; m++){
j0=i0;j1=i1;j2=i2;
w=0;
do{
j2=sctc.tranTable[j0][j2][m];
j1=scte.tranTable[j0][j1][m];
j0=stt.tranTable[j0][m];
if( table[j0][j1][j2]==0 ){
table[j0][j1][j2]=l+1;
n++;
}
w++;
if(w>12){
exit(0);
}
}while(j0!=i0 || j1!=i1 || j2!=i2 );
}}}}}
}else{
for( i0=0; i0<NUMSHAPES; i0++ ){
for( i1=0; i1<70; i1++){
for( i2=0; i2<70; i2++){
if( table[i0][i1][i2]==l ){
// do twist
j0=stt.tranTable[i0][2];
j1=scte.tranTable[i0][i1][2];
j2=sctc.tranTable[i0][i2][2];
if( table[j0][j1][j2]==0 ){
n+=setAll(j0,j1,j2,l+1);
}
}
}}}
}
cout<<" l="<<(int)l<<" n="<<(int)n<<endl<<flush;
l++;
}while(n!=0);