Gather data
This commit is contained in:
@@ -45,7 +45,7 @@ public class Main {
|
||||
public int seed = (int) (System.nanoTime() ^ System.currentTimeMillis());
|
||||
public int pop = 18;
|
||||
public int gens = 2000;
|
||||
public String wordsPath = "nl_score_hints.csv";
|
||||
public String wordsPath = "nl_score_hints_v2.csv";
|
||||
public double minSimplicity = 0; // 0 means no limit
|
||||
public int threads = Math.max(1, Runtime.getRuntime().availableProcessors());
|
||||
public int tries = threads;
|
||||
@@ -167,7 +167,7 @@ public class Main {
|
||||
safe(w.direction(), 3),
|
||||
fmtPoint(w.startRow(), w.startCol()),
|
||||
fmtPoint(w.arrowRow(), w.arrowCol()),
|
||||
Arrays.toString(w.lemma().clue().toArray(String[]::new)));
|
||||
Arrays.toString(w.lemma().clue()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -400,11 +400,9 @@ public class Main {
|
||||
sb.append(" \"words\": [\n");
|
||||
for (var i = 0; i < puzzle.words().length; i++) {
|
||||
var w = puzzle.words()[i];
|
||||
var clues = w.clue().toArray(String[]::new);
|
||||
Arrays.sort(clues, Comparator.comparingInt(String::length));
|
||||
sb.append(" {\n");
|
||||
sb.append(" \"word\": \"").append(escapeJson(w.word())).append("\",\n");
|
||||
sb.append(" \"clue\": [").append(Arrays.stream(clues).map(ss -> "\"" + escapeJson(ss) + "\"").collect(Collectors.joining(","))).append("],\n");
|
||||
sb.append(" \"clue\": [").append(Arrays.stream(w.clue()).map(ss -> "\"" + escapeJson(ss) + "\"").collect(Collectors.joining(","))).append("],\n");
|
||||
sb.append(" \"startRow\": ").append(w.startRow()).append(",\n");
|
||||
sb.append(" \"startCol\": ").append(w.startCol()).append(",\n");
|
||||
sb.append(" \"direction\": \"").append(escapeJson(w.direction())).append("\",\n");
|
||||
|
||||
Reference in New Issue
Block a user