Hacker News new | ask | show | jobs
by maxxxxx 3125 days ago
How does Prolog relate to ML systems? It seems they work in a similar way. Input some learning data and then the system produces output based on these.
1 comments

Eh, they are quite different under the hood. To put it real simple (and probably quite sloppy): Prolog determines the output by applying logic. ML uses mathematics to analyze the input and "guesses" the output, based on the training set.

As a corollary: Prolog will negate anything that can't be proven true from the rules you give it. A ML algorithm will always give you some answer, though the quality depends on the learning data.

Cool. Thanks! I am watching these trends from the outside and it's hard to keep up if you don't work directly with the tools.
I think he meant ML as the family of meta programming languages?

He did say systems though so you are probably right

Also, the part about "Input some learning data" makes me think to Machine Learning rather than Meta Language.

Btw, Prolog and ML might look like distant cousins: e.g. you use recursion and pattern matching in both. But under the hood there are big differences that arise from Prolog's logic programming paradigm: for instance, you can use append(L1, L2, L3) both to concatenate and split a list, depending on the variables you set:

  append([1,2], [3,4], X)       % ==> X=[1,2,3,4]
  append([1,2], Y, [1,2,3,4])   % ==> Y=[3,4]