Module programinduction::domains::circuits[][src]

The Boolean circuit domain.

As in the paper "Bootstrap Learning for Modular Concept Discovery" (2013).

Examples

use programinduction::{ECParams, EC};
use programinduction::domains::circuits;

let dsl = circuits::dsl();
let tasks = circuits::make_tasks(250);
let ec_params = ECParams {
    frontier_limit: 100,
    search_limit_timeout: None,
    search_limit_description_length: Some(9.0),
};

let frontiers = dsl.explore(&ec_params, &tasks);
let hits = frontiers.iter().filter_map(|f| f.best_solution()).count();
assert!(40 < hits && hits < 80, "hits = {}", hits);

Structs

Evaluator

An Evaluator for the circuits domain.

Functions

dsl

The circuit representation, a lambda::Language, only defines the binary nand operation.

make_tasks

Randomly sample a number of circuits into Tasks.

make_tasks_advanced

Like make_tasks, but with a configurable circuit distribution.

Type Definitions

Space

All values in the circuits domain can be represented in this Space.