diff options
| author | tslil clingman <tslil@posteo.de> | 2022-09-27 23:06:16 +0200 |
|---|---|---|
| committer | tslil clingman <tslil@posteo.de> | 2022-09-28 00:07:01 +0200 |
| commit | c4e7a97fd7efecdb85f362f04434ea8470a1927f (patch) | |
| tree | 29cbe7682a1b4e899cfcfe5dd6dd73109b190b8d /src/main.rs | |
| parent | 19e4b5bead91b3c5eaefec77d5f703df9c1b2305 (diff) | |
Better pre-layout -> layout
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 12 |
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 ); |
