Funky and potentially useful/relevant functional programming wizardry...

69 views
Skip to first unread message

Ben Goertzel

unread,
Nov 11, 2020, 12:34:26 AM11/11/20
to opencog
Wow... this is possibly the most elegant Haskell I have ever seen...
check out the section titled "Horticulture with Futumorphisms" ...

https://blog.sumtypeofway.com/posts/recursion-schemes-part-4.html

Extreme simplicity, built on top of beautiful abstraction

I have worked out (but not yet typed in) how to define fold and unfold
(catamorphisms, anamorphisms, histomorphisms and futumorphisms) on
hypergraphs and metagraphs.

(By extending the ideas in
https://www.researchgate.net/publication/2423982_An_Initial-Algebra_Approach_to_Directed_Acyclic_Graphs
-- but note the constructors one needs for metagraphs are a bit
different than the ones he describes for dags, though it seems his
basic framework still works)

I believe one can then express

* activation spreading (ECAN), imposing probability distributions on
Atomspace (for sampling), and crossover + mutation, as metagraph
catamorphisms

* logical inference chaining and program execution as metagraph
futumorphisms (anamorphisms with built-in control structures)

* inference "direct evaluation" as a metagraph histomorphism (a
catamorphism that keeps track of its history)

If this is right (and of course some gotcha might emerge in
transferring my scribbled pen-and-paper notes into LaTeX, which I have
no idea when I'll have time for...) then we have a fairly
straightforward mapping of our repertoire of OpenCog cognitive
algorithms as metagraph hylomorphisms.

Since hylomorphisms can represent general recursion, it's not
surprising (actually obvious) that one can represent these cognitive
algorithms as metagraph hylomorphism somehow, but the point is that it
can be done simply and elegantly...

What I'm trying to work toward here is a sort of abstract requirements
spec for what Atomese 2 needs to do to yield efficient implementations
of relevant cognitive algorithms. I think the crux is that we need
to be able to reasonably efficiently do these sorts of morphisms over
Atomspace, in instances where the atomic operations inside the
morphism are small and inexpensive (so that a substantial fraction of
the work is in executing the morphisms rather than doing costly
operations on each Atom).



--
Ben Goertzel, PhD
http://goertzel.org

“Words exist because of meaning; once you've got the meaning you can
forget the words. How can we build an AGI who will forget words so I
can have a word with him?” -- Zhuangzhi++

Michele Thiella

unread,
Nov 20, 2020, 12:26:21 PM11/20/20
to opencog
Incredibly hard for a newcomer like me, yet extremely interesting. 
I'd like to read your scribbled pen-and-paper.

I am looking for the topic of my master's thesis regarding AGIs 
but I have received proposals regarding Operational Neural Networks 
and if I could find their possible application in this field, 
in order to subsequently obtain a possible post-master study.
Unfortunately I don't think the two can coexist for an AGIs base applied to OpenCog (right?) 
(I would strongly like to bring something related to OpenCog as a thesis)

So I'm looking for an alternative in your project, 
but I keep getting lost in the topics I see from posts, papers, conferences and codes
... they are all very interesting.

The point is that I'm kindly asking for help in finding something to develop to be useful for this project. 
Someone who gives me a more or less defined goal that I could aspire to 
... because, despite being able to understand the problems and possible solutions you propose, 
I cannot then translate the words into a lineup of steps to follow to develop 
and implement them in the current project.

Thank you for the trouble with my request.

Michele Thiella
Reply all
Reply to author
Forward
0 new messages