What is this mindfuck of a language???

Attached: swipl.png (170x140, 18K)

Programming for people who aren't complete brainlets.

retard(user).

it's called logic. unfortunately it's something they don't teach in our public school system so it's understandable that you don't get it. just read some fucking books.

Attached: file.png (600x387, 301K)

father(X,Y). % Define Predicates%
mother(X,Y).
married(X,Y).
male(X).
female(X).
parent(X,Y).
diff(X,Y).
male_cousin(X,Y).
brother_in_law(X,Y).
mother_in_law(X,Y).
cousin_three(X,Y).
cousin(X,Y).
sib(X,Y).

%Define Facts%
male(terah). male(abram). male(nahor). male(haran). male(isaac).
male(lot). male(moab). male(ben_ami). male(bethuel). male(laban).
male(esau). male(jacob). male(reuben).
female(sarah). female(milcah). female(lot_daughter_1). female(lot_daughter_2).
female(rebekah). female(leah). female(dinah).
father(terah,abram). father(terah,nahor). father(terah,haran).
father(abram,isaac). father(haran,lot). father(nahor,bethuel).
father(bethuel,laban). father(laban,leah). father(isaac,jacob).
father(isaac,esau).
father(jacob,reuben).
mother(sarah,isaac). mother(milcah, bethuel). mother(rebekah,jacob).
mother(rebekah,esau). mother(leah,reuben).
mother(lot_daughter_1,moab). mother(lot_daughter_2,ben_ami).
married(abram,sarah). married(nahor,milcah).
married(isaac,rebekah). married(jacob,leah).
married(sarah,abram). married(milcah,nahor).
married(rebekah,isaac). married(leah,jacob).


%Define complicated predicates%
parent(X,Y) :- father(X,Y).
parent(X,Y) :- mother(X,Y).
diff(X,Y) :- not(X=Y).
sib(X,Y):- parent(Z,X), parent(Z,Y), diff(X,Y). %define sibling %
mother_in_law(X,Y):- female(X),mother(X,Z),married(Z,Y). %question 1%
male_cousin(X,Y):- male(X),father(W,X),parent(Z,Y),sib(W,Z). %question 2%
cousin(X,Y):- parent(Z,X), parent(W,Y), sib(W,Z). %question 3%
cousin_three(X,Y):- parent(Z,X),parent(G,Z),parent(H,Y),parent(K,H),cousin(G,K).
brother_in_law(X,Y):- male(X),married(X,Z),sib(Y,Z). %question 5-X is married to Y's sibling%
brother_in_law(X,Y):- male(X),sib(X,Z),married(Y,Z). %X's sibling is married to Y%
brother_in_law(X,Y):- male(X),married(X,W),married(Y,Z),sib(W,Z). % Y is married to the sibling of X's spouse%

brother_in_law(jacob,X).

Not that complicated imo.

Propositional logic can be learnt in 5 minutes.

Programming is modern math, math is ancient programming.

Attached: 1441316475044.jpg (400x400, 98K)

I don't want "logic" I want money, I want to program turing machines.

Prolog is a slow ass language ofr people too stupid to understand design patterns, cache coherence, multi level pointers ,etc

FFFUUUUCK THIIIIS LANGUAAAAAGE

Attached: scrot.png (962x1021, 190K)

Attached: 1508515776648.png (1082x1340, 1.67M)

You're not supposed to use Prolog as a general purpose programming language. It shines as an embedded DSL (for example, in Lisp).

what the fuck is a lisp, dude people use C for embedded

>C
Rank amateurs, maybe. Real men use Forth.

What he means is you embe... wait, I'm just getting trolled.

/thread

I will literally bust a vein what the fuck am I doing wrong wit this language

Attached: 1478215228115.png (2104x2064, 233K)

lol have fun reinventing the wheel.
logic is where it's at my dude. that is the key to AI. once you have a machine that is able to fully verify all forms of logic, you have consciousness.

meanwhile you will be choking on dust wondering why you stopped getting paid to stamp letters all day.

This is the best language to write old-school text-based DnD style games in. I’ve been adding to mine for like 3 years.

>once you have a machine that is able to fully verify all forms of logic, you have consciousness.
Not him but this isn't true at all. Once you have a machine that is able to fully verify all forms of logic, you have something better than consciousness and capable of replacing it, but you still don't have consciousness. Logic isn't the key to AI, it's the key to a viable alternative to AI. A perfectly logical machine can do many things an intelligence can do, and many things an intelligence can't do, but it's not an intelligence. For one thing, true intelligence is probabilistic and not deductive. Logic can be considered to generally follow a parenthetical structure where there are no probabilistic outcomes. By contrast, AI follows a breadth-first path through a geometry not unlike a Markov chain.

>true intelligence is probabilistic and not deductive
this doesn't mean anything. once a machine can reason the way humans can, they will be able to fully interpret the english language just the way we can, and reproduce grammatical logical structures. I don't know what makes you think "intelligence is probabilistic" whatever the fuck you think that means, which is the most bullshit thing I've ever heard.

(cont.) unless you mean inductive reasoning. which is a logic

>muuh AI
It's a fucking meme that has no proven results

Actually when I say "intelligence is probabilistic," I'm referring to neural networks. As a general data structure, including both the artificial and biological implementations.

L...link?

This branch of AI mostly died out in the 80s when it became obvious that many types of problems were intractable with predicate logic.
Many real problems are too complicated to define with any set of explicit rules, which is why current efforts use Neural Networks to implicitly learn the rules and use optimization rather than bfs to find their solution.

>This branch of AI mostly died out in the 80s
still best branch

Attached: PrologBratcoEng.jpg (489x662, 26K)

Hahhahaha what kinda surname is Bratko like thtats the most eastern european name ever

Bratko means brother here.

>I don't want "logic" I want money, I want to program turing machines.
what the fuck are you on about?

Attached: 1509726323123.gif (499x499, 60K)