aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs
index 041730d..4294484 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,4 +1,3 @@
-mod config;
mod corpus;
mod layout;
@@ -15,13 +14,10 @@ use std::time::Instant;
const NUM_CONTESTANTS: usize = 128;
const NUM_PERSIST: usize = 8;
-// TODO: Layout is really pre-layout, have something that takes a layout and
-// re-orders columns to balance hands, and keys per column (block really
-// consider index fingers) to balance rows.
-
// TODO: command line arguments to start at a given layout string, maybe read
// from file? Might as well make num_contestants and survive_threshold
-// configurable, and number of swaps when generating new layout
+// configurable, and number of swaps when generating new layout, and index
+// finger threshold.
struct Tournament<'a> {
rngs: Vec<Pcg64>,
@@ -98,10 +94,10 @@ fn main() {
let improvement = tournament.run_round();
if let Some(prelayout) = improvement {
- let layout = Layout::from_prelayout(&prelayout);
+ let layout = Layout::from_prelayout(&prelayout, &corpus);
let evl = corpus.evaluate_layout(&layout);
println!("");
- println!("================================================================================\nLayout:\n{}",
+ println!("================================================================================\n\n{}",
layout
);