diff --git a/rust_project/Cargo.lock b/rust_project/Cargo.lock index 0f0ecf01..0eb090d7 100644 --- a/rust_project/Cargo.lock +++ b/rust_project/Cargo.lock @@ -2124,7 +2124,7 @@ dependencies = [ [[package]] name = "loda-rust-cli" -version = "2023.11.28" +version = "2023.11.29" dependencies = [ "ahash", "alphanumeric-sort", diff --git a/rust_project/arc-competition/payload/.loda-rust/analytics-arc/analytics_log.txt b/rust_project/arc-competition/payload/.loda-rust/analytics-arc/analytics_log.txt index 02ed8f98..f931a099 100644 --- a/rust_project/arc-competition/payload/.loda-rust/analytics-arc/analytics_log.txt +++ b/rust_project/arc-competition/payload/.loda-rust/analytics-arc/analytics_log.txt @@ -32,4 +32,4 @@ optimize: 0, dontoptimize: 1, optimize/total: 0.0% AnalyzeProgramModified timestamps: 88 -subcommand_analytics finished, elapsed: 20 ms +subcommand_analytics finished, elapsed: 23 ms diff --git a/rust_project/arc-competition/payload/.loda-rust/analytics-arc/last_analytics_timestamp.txt b/rust_project/arc-competition/payload/.loda-rust/analytics-arc/last_analytics_timestamp.txt index 0bfa4520..da8ece5f 100644 --- a/rust_project/arc-competition/payload/.loda-rust/analytics-arc/last_analytics_timestamp.txt +++ b/rust_project/arc-competition/payload/.loda-rust/analytics-arc/last_analytics_timestamp.txt @@ -1 +1 @@ -2023-11-28T00:54:05Z \ No newline at end of file +2023-11-29T10:58:00Z \ No newline at end of file diff --git a/rust_project/loda-rust-cli/Cargo.toml b/rust_project/loda-rust-cli/Cargo.toml index a9586590..90f018c8 100644 --- a/rust_project/loda-rust-cli/Cargo.toml +++ b/rust_project/loda-rust-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "loda-rust-cli" -version = "2023.11.28" +version = "2023.11.29" authors = ["Simon Strandgaard "] description = "Command line interface for LODA Rust" repository = "https://github.com/loda-lang/loda-rust" diff --git a/rust_project/loda-rust-cli/src/arc/solve_logisticregression.rs b/rust_project/loda-rust-cli/src/arc/solve_logisticregression.rs index 9feac69a..b8b1e9fb 100644 --- a/rust_project/loda-rust-cli/src/arc/solve_logisticregression.rs +++ b/rust_project/loda-rust-cli/src/arc/solve_logisticregression.rs @@ -1,6 +1,10 @@ //! Performs logistic regression of each input pixel with the corresponding classification for the output pixel. //! //! These older commits solves some of the tasks from the hidden ARC dataset, using logistic regression: +//! commit 2023-Nov-29: solves 2 of the hidden ARC tasks. Uses only variant=0. No use of variant=1 nor variant=2. +//! This is the optimal combination so far. Only a single variant is used. +//! https://github.com/loda-lang/loda-rust/commit/ad25b7164ea117555d2c8e040a2b5a0dde12eb0d +//! //! commit 2023-Nov-28: solves 1 of the hidden ARC tasks. This uses variant=0 and variant=1 and variant=2. Worse than ever. //! I have broken enable_earlier_prediction_shapetype_connectivity8 for variant=0, so it only solves 1 task. //! And variant=1 and variant=2 doesn't solve any tasks. @@ -121,7 +125,7 @@ use std::sync::atomic::{AtomicUsize, Ordering}; /// const PROCESS_TASK_VARIANTS: [u8; 3] = [0, 1, 2]; /// /// No need to run variant=1 nor variant=2, because they don't solve any of the hidden ARC tasks. Only variant=0 solves 2 of the hidden ARC tasks. -const PROCESS_TASK_VARIANTS: [u8; 3] = [0, 1, 2]; +const PROCESS_TASK_VARIANTS: [u8; 1] = [0]; /// The colors 0..9 with an extra `color 10` for the `outside` canvas area. #[allow(dead_code)] @@ -1085,7 +1089,7 @@ impl SolveLogisticRegression { let enable_shape_size_connectivity8: bool = true; let enable_earlier_prediction_shapetype_connectivity4: bool = true; let enable_earlier_prediction_shapetype45_connectivity4: bool = true; - let enable_earlier_prediction_shapetype_connectivity8: bool = [true, false, true][v]; + let enable_earlier_prediction_shapetype_connectivity8: bool = [false, false, true][v]; let enable_earlier_prediction_shapetype45_connectivity8: bool = false; let enable_histogram_column_row_count: bool = false; diff --git a/rust_project/loda-rust-cli/src/arc/solve_one_color.rs b/rust_project/loda-rust-cli/src/arc/solve_one_color.rs index f9772e2c..3272f9b3 100644 --- a/rust_project/loda-rust-cli/src/arc/solve_one_color.rs +++ b/rust_project/loda-rust-cli/src/arc/solve_one_color.rs @@ -496,10 +496,9 @@ impl SolveOneColor { bail!("Unable to make prediction for task: {} - test_index: {} there are no available colors", task.id, test_index); } - let mut available_colors_vec: Vec = available_colors.color_vec(); - // The reversal is in order to try out if the last colors are better than the first colors. - // In the real world the algorithm should determine which colors are the best. - available_colors_vec.reverse(); + let available_colors_vec: Vec = available_colors.color_vec(); + // The order of the secondary colors may be important, so simply picking the lowest valued colors may not be the best solution. + // A better solution may be to have weights for each color and confidence. let mut the_colors: Vec = primary_color_predictions.color_vec(); the_colors.extend(available_colors_vec); diff --git a/rust_project/loda-rust-cli/src/arc/traverse_programs_and_models.rs b/rust_project/loda-rust-cli/src/arc/traverse_programs_and_models.rs index b481ab88..c0e0f1d6 100644 --- a/rust_project/loda-rust-cli/src/arc/traverse_programs_and_models.rs +++ b/rust_project/loda-rust-cli/src/arc/traverse_programs_and_models.rs @@ -1604,11 +1604,11 @@ impl TraverseProgramsAndModels { // Solve tasks that outputs a single color. // On the hidden ARC dataset, this doesn't solve any tasks. - let try_solve_one_color = true; + let try_solve_one_color = false; // Solve `splitview` like tasks. // On the hidden ARC dataset, this doesn't solve any tasks. - let try_solve_split = true; + let try_solve_split = false; // Run logistic regression. // On the hidden ARC dataset, this solves 2 tasks.