opencog / asmoses

MOSES Machine Learning: Meta-Optimizing Semantic Evolutionary Search for the AtomSpace (https://github.com/opencog/atomspace)
https://wiki.opencog.org/w/Meta-Optimizing_Semantic_Evolutionary_Search
Other
38 stars 31 forks source link

Atomese interpreter not needed!? #101

Open linas opened 2 years ago

linas commented 2 years ago

During a code review, I discovered this code:

https://github.com/opencog/asmoses/blob/master/opencog/asmoses/atomese/interpreter/Interpreter.cc

This interpreter appears to miss the whole idea of atomese: it already has a built-in interpreter, which is called "atomese" -- you just run the code, you don't need an interpreter to run it.

Anyway, this file can be (and should be) removed, because it is impossible for the interpreter to ever know what atom types are actually available in atomese. -- it might have to deal with e.g. DSP types.

linas commented 2 years ago

It should work as follows: https://github.com/opencog/atomspace/blob/master/examples/atomspace/formulas.scm

and also, flows.scm and flow-formulas.scm in the same directory.

ngeiswei commented 2 years ago

I agree, @linas, but it was added here due to the experimental nature of that work.

linas commented 2 years ago

OK @ngeiswei thanks for looking at the pull reqs.

Let me describe what I'm trying to do: ... I want to change the primary data form to that described in the README here: https://github.com/opencog/asmoses/tree/use-values/opencog/asmoses (this is an unmerged branch)

An example of reading in a CSV table is here: https://github.com/opencog/asmoses/blob/use-values/opencog/asmoses/data/representation/load_csv.h (please take a look)

I'm planing on moving the load_csv function to the atomspace git repo itself, as "standard atomspace component" (i.e. for general use, not just for moses)

After that, I'm not sure; just need to follow my nose... The long-term goal is to do MOSES-things at the guile or python prompt, directly (instead of invoking moses binaries). (e.g. issue #89) So I guess to split out the deme mangement and the knob-turning code to make it "generic". (my actual goal is to deploy moses-style mutation on audio & video pipelines)

linas commented 2 years ago

Also @Habush fyi.

linas commented 2 years ago

This pull req https://github.com/opencog/atomspace/pull/2989 loads CSV/TSV tables into the atomspace. The demo here: https://github.com/opencog/atomspace/blob/master/examples/atomspace/table.scm shows how to use the native atomspace interpreter on these tables.

Basically, the "combo" is almost identical to what as-moses uses, except there is an additional ValueOfLink that is used to pull the data out of the table.