Implika automated inference engine

  • 68 Replies
  • 13776 Views
*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: Implika automated inference engine
« Reply #60 on: March 21, 2020, 07:45:19 am »
I would expect the state after inference-step to be represented in the same format. Currently, a ForeChain key is added, with the result as an array. This breaks the head/tail format. How do we represent the result of the inference in Implika syntax?

After a few thoughts, a solution may be in populating existing contexts with inference results, thus altering the original expression. This solution suffers from a lack of information about what conclusion came from what node, while this information may be valuable in theorem proving. I think it would be wise to separate conclusions from starting code as it is now, leaving the user possibility to flatten resulting JSON into pure head/tail format in the following way: There may be multiple conclusions from the same node. The solution to this is to replace a `node` with `(node ( result1 ( result2 ( result3 () ) ) ) )` with mandatory dummy at the end because this expression behaves like logical expression `(node -> (result1 -> (result2 -> (result3 -> ()))))`, which translates to `(node /\ result1 /\ result2 /\ result3) -> ()`. A function to make this flattening would take only a dozen lines of code with standard tree traversal and node reassignment.

How do we represent the result of the inference in Implika syntax?

In fact, implika (like logic) has a nice property of being able to detect internal inference. Inference process is homoiconic in implika, if that's the right word to use. For example, we can write `(a b) c` to derive `c` if in the same context may be implicitly derived `b` from `a`, even without explicitly stating `(a b)`. IMHO Logic in general is a true dragon that could be worth of studying even for its own sake, just like mathematics is.

*

Zero

  • Eve
  • ***********
  • 1287
Re: Implika automated inference engine
« Reply #61 on: March 21, 2020, 08:50:02 am »
It surely is a dragon! It's hard for me to study. For example, I don't understand yet the difference between material conditional and logical consequence. Logic is an entire world in itself.

The reason behind my question was a hope to build a system where forward chaining can be applied repeatedly, to obtain a tree-shaped cellular automaton, so to speak.

BTW, expressions like (a b c d) associate to the left, may I ask why you did choose left? Expressions like (a (b (c ())) seem to be everywhere...

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: Implika automated inference engine
« Reply #62 on: March 21, 2020, 11:54:08 am »
BTW, expressions like (a b c d) associate to the left, may I ask why you did choose left? Expressions like (a (b (c ())) seem to be everywhere...

Yes, I decided not to follow standards and to associate implications to the left for a reason. It is because `(a (b (c ())))` is commutative (since it is analog to logical conjunction) , while in `((((a) b) c ) d)` the order matters. I predicted that someone might want to construct sequences with more than two elements, and I wanted to avoid writing braces in those cases (i.e. expressions like `select <x> where <y> order by <z>`). I don't know if I made an optimal decision, but it's just a matter of parsing that is external to the library anyway, like in test suite. Internally the algorithm accepts `{head: ..., tail:...}` jsobjects (or alternatively two element arrays processed by `Conv` function) which require explicit grouping. The library itself actually is meant to be used as a bare essential for integrating with bigger projects which may decide their own grouping policy.

By the way, I think I know what to do with hierarchical context relations. It would be just a few more lines of code. I'll try it on Monday.
« Last Edit: March 21, 2020, 05:21:22 pm by ivan.moony »

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: Implika automated inference engine
« Reply #63 on: March 21, 2020, 05:20:45 pm »
The reason behind my question was a hope to build a system where forward chaining can be applied repeatedly, to obtain a tree-shaped cellular automaton, so to speak.

It should be already quite possible. For example, this expression never terminates:

Code
(
    (@a (@a + 1)) (
        0 (
        )
    )
)

`(@a (@a + 1))` turns `@a` to `@a + 1`. Then `@a + 1` is fed back to `(@a (@a + 1))` to produce `(@a + 1) + 1`, and the loop is going on forever after applying it to `0`. To terminate it, it is necessary to express a condition under which `@a` becomes `@a + 1`. For example:

Code
(
    ((@a < 10) (@a (@a + 1))) (
        0 (
        )
    )
)

This should loop only 10 times, starting from 0, but it won't work right away. On the first sight, the problem seems that we have to internally code predicate less than and a function of addition. But on the second thought, I believe it is possible to do with implika something like Church encoding with lambda calculus. This is what I only mentioned in the current implika documentation, but I'll try to shed more light on this problem in the next github update. I'll try to provide a simple example of implementing lambda calculus, which is now (without hierarchically related contexts) more complicated, but possible (I believe).

In other words, the above example would work only after defining comparison and addition operations on set of numbers within implika notions. Otherwise (and for a sake of speed performance), these definitions should be added internally by manually altering implika code.

By the way, are you aware of untyped lambda calculus? It possesses a hypnotic simplicity, while it reveals unbound power. It would be wise to take it under consideration as a base language. I plan to do it with etml because I think lambda calculus is simpler than implika, while implika inference automation is not a necessary accessory in raw document production.
« Last Edit: March 21, 2020, 06:04:58 pm by ivan.moony »

*

Zero

  • Eve
  • ***********
  • 1287
Re: Implika automated inference engine
« Reply #64 on: March 22, 2020, 10:51:46 am »
Do you plan to introduce macros at some point? :)

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: Implika automated inference engine
« Reply #65 on: March 22, 2020, 12:39:00 pm »
Do you plan to introduce macros at some point? :)

What kind of macros? I thought every implication is a kind of a macro. A result of a head pattern is a tail pattern, regarding to some rule.

*

Zero

  • Eve
  • ***********
  • 1287
Re: Implika automated inference engine
« Reply #66 on: March 22, 2020, 12:57:37 pm »
You're right, it's a rewriting system (silly me). I think what's bothering me is having to nest things when I'd like to syntactically juxtapose them. I'm not sure I'm being clear.

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: Implika automated inference engine
« Reply #67 on: March 22, 2020, 01:16:39 pm »
Yes, it is a kind of itchy when every bond is a consequence, when we need it, and when we do not. It was bothering me that much that I introduced a space separator aside from implication operators, but it all turned into Esperas, which I'm still developing.

[edit]
I only kept implika because I believe in minimalism.
« Last Edit: March 22, 2020, 02:32:50 pm by ivan.moony »

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: Implika automated inference engine
« Reply #68 on: March 31, 2020, 11:11:20 pm »
With introducing hierarchical context relationships, I experienced a major slowdown due to combinatorial interaction between newly drawn conclusions and growing set of assumptions. This new, still unpublished version is slowing down a lot, something like two minutes compile on fifty lines examples.

I don't know, I think I'll abandon this project. Optimization may complicate the code a lot, while code simplicity was one of the key advantages of this project.

 


Requirements for functional equivalence to conscious processing?
by DaltonG (General AI Discussion)
November 19, 2024, 11:56:05 am
Will LLMs ever learn what is ... is?
by HS (Future of AI)
November 10, 2024, 06:28:10 pm
Who's the AI?
by frankinstien (Future of AI)
November 04, 2024, 05:45:05 am
Project Acuitas
by WriterOfMinds (General Project Discussion)
October 27, 2024, 09:17:10 pm
Ai improving AI
by infurl (AI Programming)
October 19, 2024, 03:43:29 am
Atronach's Eye
by WriterOfMinds (Home Made Robots)
October 13, 2024, 09:52:42 pm
Running local AI models
by spydaz (AI Programming)
October 07, 2024, 09:00:53 am
Hi IM BAA---AAACK!!
by MagnusWootton (Home Made Robots)
September 16, 2024, 09:49:10 pm
LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am

Users Online

214 Guests, 0 Users

Most Online Today: 467. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles