Tag Archives: Prolog

Saving Goats with Prolog

Posted by Pour Raphael Date: 2018-02-09

Spoiler: You might have guessed it already… you won’t see any real goat in here[1]. This is about a planning problem and how we can solve it using Prolog. A planning ploblem could be for example a game or a more or less complex task. You know the starting and goal state and the rules […]

Programming in Logic with Prolog

Posted by Pour Raphael Date: 2017-12-11

Motivation While Imperative Programming is very common, Logic Programming seems to be not ¬†popular at all. Why would anyone use it? It is an other kind of thinking about problems. There are problems where imperative programming languages, such as C,C++, Java, Python, …, will suck. It is more like making a set of rules/constraints rather […]

Prolog for Cloud-Rapper

Posted by Pour Raphael Date: 2017-07-06

While doing some Prolog excercises where I had to develope a kind of language parser, I thought of implementing a “Cloud-Rapper”-Parser which analyses a MoneyBoy-ish Sentence. % % Autor: Raphael Pour % Datum: 06.07.2017 % usage: satz(Satz,Rest,Subject,Object,Verb). % example: satz([1,gurl,spotted,1,boi],[],S,O,V). % satz(In, Rest, S,O,V) :- nominalP(In,S, R), verbalP(R,V,O,Rest). nominalP(In,N, Rest) :- artikel(In,R), nomen(R,N,Rest). verbalP(In,V,N,Rest) :- […]