Skip to content

Commit

Permalink
Draft using top score variables for EA pool
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipen committed Nov 15, 2024
1 parent c990019 commit cdb2a31
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/searcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use crate::backdoor::Backdoor;
use crate::fitness::Fitness;
use crate::lit::Lit;
use crate::solvers::SatSolver;
// use crate::utils::*;
use crate::var::Var;

#[derive(Debug)]
Expand Down Expand Up @@ -96,6 +97,10 @@ impl BackdoorSearcher {
// Exclude banned variables from the pool:
pool.retain(|v| !self.banned_vars.contains(v));

// let mut top_score_vars = vars_from_external(self.solver.as_cadical().get_top_score_variables(1000).iter().copied());
// top_score_vars.retain(|v| pool.contains(v));
// pool = top_score_vars.into_iter().take(100).collect();

debug!("Pool size: {}", pool.len());
if pool.len() < backdoor_size {
info!("Pool size is too small, skipping the run");
Expand Down

0 comments on commit cdb2a31

Please sign in to comment.