Code Monkey home page Code Monkey logo

Comments (7)

linas avatar linas commented on June 4, 2024 1

Several remarks:

  • A portion of ReductLink has already been implemented; it is here: atomspace/opencog/atoms/reduct It only does the arithmetic links (plus, minus, times, divide)

  • It is implemented in C++ After implementing it in C++ I realized that this was just crazy and hard and inefficient and a totally untenable long-term strategy.

  • I'm not just expressing some idle opinion -- just look at the grunge that is moses reduct! Its huge, complicated, and porting/debugging that as C++ code would be insane.

  • So, instead, the proposal is to replace moses reduct by atomspace rules, as a bunch of bind-links: viz "IF this pattern matches THEN output a reduced pattern". Then run all of these rules over and over, in a loop, until not a single one of them matches any more. At that point, the reduction is done.

  • Its possible that maybe the ForwardChainer can run the above loop (ask @ngeiswei to be sure)

  • The above is the practice. The theory is that reduct is a kind-of-abstract term-rewriting-system. A simple one. The rules are just the rewrite rules of arithmetic (e.g. (x+0) reduces to x) and the rules of propositional logic (e.g. (y and True) reduces to y) The idea is that, by looping over and over on the rules, one continues until one has reached a "normal form" that cannot be reduced any further. See https://en.wikipedia.org/wiki/Normal_form_(abstract_rewriting) and https://en.wikipedia.org/wiki/Abstract_rewriting_system

  • By writing the rules in the atomspace, instead of hard-coding them in C++, you get to add other kinds of algebras to the system (there is much much much more to the world than just the axioms of arithmetic, and the axioms of propositional logic!!)

The upshot is -- you do not need ReductLink. You just need to write some reduction rules, and let the pattern matcher do the job it was designed to do.

Yes, this is easy to say, and maybe harder to do. You should start out by writing few simple rules, and see how it goes. I'm here to help.

from asmoses.

masrb avatar masrb commented on June 4, 2024

I think according to issue #3 , it is

(ReductLink
  (And
    (Predicate "f1")
    (Predicate "f1"))
  (Predicate "f1")))

from asmoses.

ngeiswei avatar ngeiswei commented on June 4, 2024

@linas,

ReductLink
   A
   B

would not reduce but just indicate that expression B is reduced form of expression A.

We need to keep track of that because some reductions are defined recursively, such "if B1 is the reduced form of A1 and B2 is the reduced form of A2, then D = blahblah of B1 and B2 is the reduced form of C = blahblah of A1 and A2".

The plan is indeed to have the URE performs the reduction (forward and backward chainer should be possible).

from asmoses.

ngeiswei avatar ngeiswei commented on June 4, 2024

The ReductLink name is not set in stone, just till we find the actual name. The fact that it trumped you indicates we do need a better one. Note that we don't need a new link type we can use

Evaluation
  Predicate "is-reduction-of"
  List
    A
    B

but since it is gonna be used quite extensively a dedicated link sounds appropriate, though for starter we can probably go with an EvaluationLink.

from asmoses.

ngeiswei avatar ngeiswei commented on June 4, 2024

Maybe a better link name would be ReducedToLink.

from asmoses.

linas avatar linas commented on June 4, 2024

OH, OK. I'm pretty certain you want to assign them to named classes, and limit reduct so that it works only with the provided classes (instead of any old link it can find in the atomspace). The classic moses ones were "arithmetic" and "propositional logic". but there are many more: "linear algebra" is popular for "linear programming problems", and integer algebras are popular for "discrete linear programming", and then there are dozens? hundreds? of different kinds of modal logics, each with it's own set of reduction rules.

from asmoses.

linas avatar linas commented on June 4, 2024

See also issue #66 for more about arithmetic functions

from asmoses.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.