Skip to content

Commit

Permalink
rotated X-cycles, 4x4-6x6
Browse files Browse the repository at this point in the history
stdout:

K=3,diameter=34,BFS time=15
SA 1100x1000
N=4
T=9
NREPS=1000000
    REPS    ACCN    GN temp
       0       0   198 1.0
  100000   28606   186 0.9
  200000   57020   190 0.8
  300000   84737   186 0.7
  400000  111257   186 0.6
  500000  137866   186 0.5
  600000  163909   186 0.4
  700000  190159   186 0.30000000000000004
  800000  216276   186 0.19999999999999996
  900000  242495   186 0.09999999999999998
 1000000  268670   186 0.0
bestScr=186, best list of pieces to solve=[7, 2, 5, 6, 8, 12, 3, 1, 4]
SA time=20143
simplescr=136
K=3,diameter=54,BFS time=30
K=4,diameter=48,BFS time=440
SA 11000x10000
N=5
T=12
NREPS=100000
    REPS    ACCN    GN temp
       0       0   248 1.0
   10000    2400   232 0.9
   20000    4634   232 0.8
   30000    6600   233 0.7
   40000    8551   234 0.6
   50000   10250   232 0.5
   60000   12024   233 0.4
   70000   13763   232 0.30000000000000004
   80000   15560   232 0.19999999999999996
   90000   17422   232 0.09999999999999998
  100000   19249   232 0.0
bestScr=232, best list of pieces to solve=[10, 15, 9, 3, 8, 4, 1, 5, 20, 6, 2, 7]
SA time=42915
simplescr=246
K=3,diameter=50,BFS time=35
K=4,diameter=52,BFS time=1188
SA 110000x110000
N=6
T=19
NREPS=10000
    REPS    ACCN    GN temp
       0       0   414 1.0
    1000     244   410 0.9
    2000     478   408 0.8
    3000     682   406 0.7
    4000     824   402 0.6
    5000     908   400 0.5
    6000     980   400 0.4
    7000    1059   400 0.30000000000000004
    8000    1140   400 0.19999999999999996
    9000    1202   400 0.09999999999999998
   10000    1286   400 0.0
bestScr=400, best list of pieces to solve=[3, 10, 9, 13, 31, 1, 2, 11, 4, 8, 6, 24, 12, 30, 19, 5, 25, 7, 18]
SA time=38595
simplescr=450

Process finished with exit code 0
  • Loading branch information
coolcomputery committed Jul 10, 2021
1 parent 6afd531 commit 3839af5
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions LoopoverNRGUpper.java
Expand Up @@ -181,6 +181,15 @@ private int[][] SAupper(List<Integer> pcsToSolve, long NREPS, double TEMP0) {
System.out.println("simplescr="+simplescr);
return new int[][] {{Math.min(bscr,simplescr)},tmp};
}
private int[][] SAupper(String Rfree, String Cfree, long NREPS, double TEMP0) {
System.out.println("SA "+Rfree+"x"+Cfree);
boolean[] fRfree=mask(Rfree), fCfree=mask(Cfree);
List<Integer> toSolve=new ArrayList<>();
for (int i=0; i<N*N; i++)
if ((i/N!=gr||i%N!=gc)&&(fRfree[i/N]||fCfree[i%N]))
toSolve.add(i);
return SAupper(toSolve,NREPS,TEMP0);
}
private static boolean[] mask(String s) {
boolean[] out=new boolean[s.length()];
for (int i=0; i<s.length(); i++)
Expand Down Expand Up @@ -210,22 +219,18 @@ private int blockUpper(String[] Rfrees, String[] Cfrees, long NREPS, double TEMP
return out;
}
public static void main(String[] args) {
new LoopoverNRGUpper(4,0,0).blockUpper(
/*new LoopoverNRGUpper(4,0,0).blockUpper(
new String[] {"1111","1100"},
new String[] {"1111","1000"},
1000000,1
);
);*/ //sum of phase GNs: 24
/*new LoopoverNRGUpper(5,0,0).blockUpper(
new String[] {"11111","11001","11001","11000"},
new String[] {"11111","10011","10001","10000"},
100000,1
);*/
boolean[] fRfree=mask("10001"), fCfree=mask("10000");
List<Integer> toSolve=new ArrayList<>();
int N=5, gr=0, gc=0;
for (int i=0; i<N*N; i++)
if ((i/N!=gr||i%N!=gc)&&(fRfree[i/N]||fCfree[i%N]))
toSolve.add(i);
new LoopoverNRGUpper(5,0,0).SAupper(toSolve,100000,1);
);*/ //sum of phase GNs: 21+24+66
new LoopoverNRGUpper(4,0,0).SAupper("1100","1000",1000000,1);
new LoopoverNRGUpper(5,0,0).SAupper("11000","10000",100000,1);
new LoopoverNRGUpper(6,0,0).SAupper("110000","110000",10000,1);
}
}

0 comments on commit 3839af5

Please sign in to comment.