Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

More expressive data-driven programming?

Name: Anonymous 2016-02-01 14:47

About 2 years ago I read Norvig's book PAIP about Lisp and symbolic AI.

It talks a fair bit about data-driven programming which seems like a fine programming technique.

There is something that I am wondering about though and it is whether existing data-driven programming methods could be extended to be more powerful or expressive.

For instance in a computer algebra system I was programming there were algebraic reductions like

A * U/A * FOO * BAR * XYZ --> U * FOO * BAR * XYZ

(A + W + (B * C * X) / U + (C * D * Z) / E) / C --> (A + W) / C + (B * X) / U + (D * Z) / E

I couldn't come up with a pattern to match cases like these so I had to code them "manually" with loops and if-statements. But intuitively it seems some kind of pattern could be designed for these.

Could a future pattern-matching language be more powerful and capture cases like these?

It seems the current ones, as discussed in PAIP and also in SICP, only work with very rigid fixed algebraic structures with predetermined numbers of terms and factors.

Perhaps that could be a future AI research area? Although nowadays probabilistic rather than symbolic AI seems to have taken over, especially with machine learning.

If a more expressive language is designed then more powerful AI applications could be developed and at a faster pace.

For reference this is an example which illustrates existing techniques: http://norvig.com/paip/macsymar.lisp

Name: Anonymous 2016-02-01 22:17

bampu pantsu

Name: Anonymous 2016-02-01 22:24

Find a way to codify the axioms from where these simplication rules come from.

Name: Anonymous 2016-02-03 5:55

Just because you couldn't come up with a pattern doesn't mean it's impossible or even hard. You don't need "future pattern-matching language"s, 30 year old tech will do the trick.

Name: Anonymous 2016-02-03 10:24

JACKSON 5 GET

Name: Anonymous 2016-02-03 13:25

>>4

I am already capable of writing these easily cases without patterns, however no existing pattern language seems to be able to capture them and I think it would be nicer if it were possible to write them using patterns.

Name: Anonymous 2016-02-03 13:34

The general approach is to first devise some sort of a normal form (open all parentheses, distribute all multiplications etc, sort all terms), then apply reductions to each term.

Without a normal form I'm not sure what you are even trying to do because your transformations don't have a goal.

Name: Anonymous 2016-02-03 13:54

This problem has already been solved multiple times. Just get mathmatica, maple, matlab, etc...

Name: Anonymous 2016-02-03 14:49

>>8
Functional idiots are always busy re-solving simple problems, like implementing algebraic expressions or lambda calculus, because they don't have the skills to tackle anything in the real world.

Name: Anonymous 2016-02-03 16:00

>>9
This is true. I am taking a FP course and am currently working on an algebraic expression generator.

Name: Anonymous 2016-02-03 17:16

>>8,9
I know the problem has been solved but I don't think it has been solved wholly by a pattern-matching DSL yet. Nevertheless, thank you for your input

Name: Anonymous 2016-02-05 19:42

>>7 is the only sensible post here.

Anyone else appreciating the irony of a lisper having a hard time with simple symbolic reduction?

Name: Anonymous 2016-02-05 23:40

Without a normal form I'm not sure what you are even trying to do because your transformations don't have a goal.
This is what happens to me all the time when I program. If you don't have a clear picture what kind of result you want, you'll just write/conceptualize garbage.
And this is also what seems to be OPs problem: what do you actually want to do to those math. terms? What do you expect of the output? Should it be like an 'optimized' or simplified form of the input or what...?!? Obviously, just saying the terms should be 'optimized' is by far not precise enough to actually talk about any kind of concept of what you are trying to do, or even any implementation of it.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List