[Prolog] Logical Voting Assistant

I had to write a voting assistant in Prolog as a part of my module – AI.  I really enjoyed programming in Prolog and you can see my code in its repository.

The code is fully documented and it shouldn’t be hard to follow. It was my first application in Prolog, so don’t be mad at me when you see some crap there…

If you want to try out this code, run swipl, load

['politics'].

and run the following command:

?- automatic.
You have 4 common views with politician4: liberalism pacifism naturalfood profamily; It's 4/7 of your views.
You have 3 common views with politician3: strongarmy liberalism profamily; It's 3/7 of your views.
You have 3 common views with politician2: lowtax strongarmy closedborders; It's 3/7 of your views.
You have 1 common views with politician1: pacifism; It's 1/7 of your views.
true.

or

?- reading.
|: [lowtax, openedborders, war].
You have 0 common views with politician4: ; It's 0/3 of your views.
You have 1 common views with politician3: war; It's 1/3 of your views.
You have 1 common views with politician2: lowtax; It's 1/3 of your views.
You have 1 common views with politician1: openedborders; It's 1/3 of your views.
true.

Some other examples of this code are:

% P1 = strongarmy, P4 = liberalims
% P1 and P4 are not connected in datasets
 
 ?- similar(strongarmy, X).
   X = militarism.
 
 ?- oppo(militarism, pacifism).
   true .
 
 ?- similar(pacifism, liberalism).
   false. 
%% but...
 ?- sim(pacifism, liberalism).
   true.
%% so this method travels the whole
% data-sets tree in every possible way to find me this:
 ?- still_oposite(strongarmy, liberalism).
   true .
 
% supports(politician2, prolife). included in data-sets
% supports(politician2, profamily). - not included in data-sets
 
 ?- does_support(politician2, prolife).
   true .
 
 ?- does_support(politician2, profamily).
   true .
 
 ?- politicians_list(L).
    L = [politician1, politician2, politician3, politician4].
[Total: 0    Average: 0/5]