Skip to content

Commit

Permalink
Merge branch 'feature/iteration66' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
neoneye committed Nov 29, 2023
2 parents bca0b4e + 5a37345 commit 01e2a7e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion rust_project/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-11-28T00:54:05Z
2023-11-29T10:58:00Z
2 changes: 1 addition & 1 deletion rust_project/loda-rust-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "loda-rust-cli"
version = "2023.11.28"
version = "2023.11.29"
authors = ["Simon Strandgaard <[email protected]>"]
description = "Command line interface for LODA Rust"
repository = "https://github.com/loda-lang/loda-rust"
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 3 additions & 4 deletions rust_project/loda-rust-cli/src/arc/solve_one_color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u8> = 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<u8> = 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<u8> = primary_color_predictions.color_vec();
the_colors.extend(available_colors_vec);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 01e2a7e

Please sign in to comment.