single-topic-composer

Class summary
single-topic-composer inherits from chunk-composer
single-topic-composer-node inherits from chunk-composer-node
Method summary
bad-evaluation-results single-topic-composer-node
check-chunk-fns single-topic-composer
check-evaluation-result-data single-topic-composer-node
check-evaluation-result-fn single-topic-composer
chunk->hash-key chunk-or-node
chunk-wrapper-fn single-topic-composer
copy-object (node single-topic-composer-node)
copy-object (composer single-topic-composer)
create-meaning thing &key &allow-other-keys
enqueue-node (node single-topic-composer-node) (composer single-topic-composer)
equivalent-irl-programs? (chunk-1 chunk) (chunk-2 chunk)
equivalent-node single-topic-composer-node
evaluation-result-scoring-fn single-topic-composer
expand-chunk (chunk chunk) (composer single-topic-composer)
expand-chunk-fns single-topic-composer
get-chunks-for-evaluation (node single-topic-composer-node)
handle-node (node single-topic-composer-node) (status (eql (quote match))) (composer single-topic-composer)
handle-node (node single-topic-composer-node) (status (eql (quote evaluate))) (composer single-topic-composer)
handle-node (node single-topic-composer-node) (status (eql (quote expand))) (composer single-topic-composer)
hashed-nodes single-topic-composer
initial-chunk-score-fn single-topic-composer
initialize-instance (composer single-topic-composer) &key
node-rating-fn single-topic-composer
print-object (node single-topic-composer-node) stream
rating single-topic-composer-node
score-solution (solution chunk-composer-node-solution) (composer single-topic-composer)
status single-topic-composer-node
status-history single-topic-composer-node
topic single-topic-composer
wrapped-chunks single-topic-composer-node
Function summary
change-status node new-status
contains-no-open-vars evaluation-result &rest rest
expand-chunk-combine-call-pattern chunk composer
expand-chunk-combine-program chunk composer
expand-chunk-link-open-variables chunk composer
expand-chunk-recombine-open-variables chunk composer
find-node-with-equivalent-chunk chunk composer
no-primitive-occurs-more-than-once chunk
no-primitive-occurs-more-than-twice-p chunk
simple-initial-chunk-score-fn chunk node node-depth
simple-node-rating node node-depth
single-topic-composer-node   inherits from chunk-composer-node  [Class]
:status    [Initarg]
:status-history    [Initarg]
:wrapped-chunks    [Initarg]
:bad-evaluation-results    [Initarg]
:check-evaluation-result-data    [Initarg]
:rating    [Initarg]
:equivalent-node    [Initarg]
status    [Slot]

The current status the node, used to drive the search.

status-history    [Slot]

A list of statuses the node was previously in

wrapped-chunks    [Slot]

The chunks created by the chunk-wrapper-fn

bad-evaluation-results    [Slot]

A list of results of program revision that were rejected by check-evaluation-result-fn

check-evaluation-result-data    [Slot]

Whatever was passed as a second value by check-evaluation-result-fn, used for visualization.

rating    [Slot]

For enqueuing the node (lower == better

equivalent-node    [Slot]

When node is a duplicate of another node, then this is the other node

equivalent-node   single-topic-composer-node  [Generic function]

Returns and (with setf) changes the equivalent-node of the specified single-topic-composer-node

rating   single-topic-composer-node  [Generic function]

Returns and (with setf) changes the rating of the specified single-topic-composer-node

check-evaluation-result-data   single-topic-composer-node  [Generic function]

Returns and (with setf) changes the check-evaluation-result-data of the specified single-topic-composer-node

bad-evaluation-results   single-topic-composer-node  [Generic function]

Returns and (with setf) changes the bad-evaluation-results of the specified single-topic-composer-node

wrapped-chunks   single-topic-composer-node  [Generic function]

Returns and (with setf) changes the wrapped-chunks of the specified single-topic-composer-node

status-history   single-topic-composer-node  [Generic function]

Returns and (with setf) changes the status-history of the specified single-topic-composer-node

status   single-topic-composer-node  [Generic function]

Returns and (with setf) changes the status of the specified single-topic-composer-node

single-topic-composer   inherits from chunk-composer  [Class]
:expand-chunk-fns    [Initarg]
:check-chunk-fns    [Initarg]
:node-rating-fn    [Initarg]
:initial-chunk-score-fn    [Initarg]
:chunk-wrapper-fn    [Initarg]
:check-evaluation-result-fn    [Initarg]
:evaluation-result-scoring-fn    [Initarg]
:topic    [Initarg]
expand-chunk-fns    [Slot]

A list of functions that are called on the chunk of each search node to create new chunks. Takes a node and the list of all chunks. Returns a list of new nodes

check-chunk-fns    [Slot]

A list of functions that is called whenever a new chunk is created to filter out bad chunks. Each function takes a chunk and returns nil when the chunk should be excluded from further processing.

node-rating-fn    [Slot]

A function that is called whenever a new node is created to rate the node. Returns a float (lower == better). Takes a node and the depth of the node in the tree

initial-chunk-score-fn    [Slot]

A function that is called whenever a new chunk is created to compute the score of the chunk. Takes the chunk, the node of the chunk and the depth of the node. Returns a float between 0.0 and 1.0 (very good)

chunk-wrapper-fn    [Slot]

A function that is called before chunk evaluation to add things to the irl program. Gets the chunk and returns a new chunk or nil when the wrapping failed.

check-evaluation-result-fn    [Slot]

A function that is called after chunk evaluation. Returns t when the result is a good result and as a second value some debug data that will be stored in the node. Takes an evaluation result, the ontology and the composer.

evaluation-result-scoring-fn    [Slot]

A function that is called after chunk evaluation to compute a score for a result (higher == better). Gets evaluation-result and ontology

hashed-nodes    [Slot]

All nodes are also stored in this hash-table for faster duplicate detection. Hash keys are computed from the irl programs of the chunks with #'chunk->hash-key

hashed-nodes   single-topic-composer  [Generic function]

Returns and (with setf) changes the hashed-nodes of the specified single-topic-composer

topic   single-topic-composer  [Generic function]

Returns and (with setf) changes the topic of the specified single-topic-composer

evaluation-result-scoring-fn   single-topic-composer  [Generic function]

Returns the evaluation-result-scoring-fn of the specified single-topic-composer

check-evaluation-result-fn   single-topic-composer  [Generic function]

Returns the check-evaluation-result-fn of the specified single-topic-composer

chunk-wrapper-fn   single-topic-composer  [Generic function]

Returns the chunk-wrapper-fn of the specified single-topic-composer

initial-chunk-score-fn   single-topic-composer  [Generic function]

Returns the initial-chunk-score-fn of the specified single-topic-composer

node-rating-fn   single-topic-composer  [Generic function]

Returns the node-rating-fn of the specified single-topic-composer

check-chunk-fns   single-topic-composer  [Generic function]

Returns the check-chunk-fns of the specified single-topic-composer

expand-chunk-fns   single-topic-composer  [Generic function]

Returns the expand-chunk-fns of the specified single-topic-composer

chunk->hash-key   chunk-or-node  [Generic function]

Computes an isomorphism invariant hash, so that all chunks that are equivalent have the same hash key. But not all chunks with the same hash are equivalent.

create-meaning   thing &key &allow-other-keys  [Generic function]
initialize-instance   (composer single-topic-composer) &key  [Around method]
equivalent-irl-programs?   (chunk-1 chunk) (chunk-2 chunk)  [Method]
score-solution   (solution chunk-composer-node-solution) (composer single-topic-composer)  [Method]
enqueue-node   (node single-topic-composer-node) (composer single-topic-composer)  [Method]

inserts the node in the queue of the composer depending on its rating

handle-node   (node single-topic-composer-node) (status (eql (quote match))) (composer single-topic-composer)  [Method]
get-chunks-for-evaluation   (node single-topic-composer-node)  [Method]
handle-node   (node single-topic-composer-node) (status (eql (quote evaluate))) (composer single-topic-composer)  [Method]
expand-chunk   (chunk chunk) (composer single-topic-composer)  [Method]
handle-node   (node single-topic-composer-node) (status (eql (quote expand))) (composer single-topic-composer)  [Method]
print-object   (node single-topic-composer-node) stream  [Method]
copy-object   (node single-topic-composer-node)  [Method]
copy-object   (composer single-topic-composer)  [Method]
change-status   node new-status  [Function]

Changes status to new-status and keeps the old status in status-history

find-node-with-equivalent-chunk   chunk composer  [Function]
expand-chunk-combine-program   chunk composer  [Function]

Adds the network of another chunk when the target variable of that chunk is compatble with an open variable

expand-chunk-combine-call-pattern   chunk composer  [Function]

Adds the call pattern of another chunk when the target variable of that chunk is compatble with an open variable

expand-chunk-recombine-open-variables   chunk composer  [Function]

Tries to account for open variables of 'chunk' by using primitives that are already in the irl program. Returns all possible solutions.

expand-chunk-link-open-variables   chunk composer  [Function]

Tries to make two open variables of compatible type equal and when it does, reduces the number of open variables of the chunk by one.

simple-node-rating   node node-depth  [Function]

simple default function for rating nodes in the search tree

simple-initial-chunk-score-fn   chunk node node-depth  [Function]

simple default function for computing the score of a new chunk

no-primitive-occurs-more-than-twice-p   chunk  [Function]

simple default function for filtering out chunks with more than two times the same primitive

no-primitive-occurs-more-than-once   chunk  [Function]

simple default function for filtering out chunks with more than two times the same primitive

contains-no-open-vars   evaluation-result &rest rest  [Function]

checks whether there are open vars in the chunk of an evaluation result