asmoses icon indicating copy to clipboard operation
asmoses copied to clipboard

Atomese interpreter not needed!?

Open linas opened this issue 3 years ago • 5 comments

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 avatar Jul 25 '22 22:07 linas

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.

linas avatar Jul 26 '22 03:07 linas

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

ngeiswei avatar Aug 02 '22 13:08 ngeiswei

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 avatar Aug 03 '22 13:08 linas

Also @Habush fyi.

linas avatar Aug 12 '22 11:08 linas

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.

linas avatar Aug 21 '22 10:08 linas