I have just watched 1 minute and I’m loving your video because you explained the relation betweens sudoku and combinatorial problems. Thank you so much!!!
@reasonerenlightened24563 жыл бұрын
The problem of Prolog is that the meaning is assigned by the human . d( [], X, X). d( [X | Y], Z, [X | W]) :- d( Y, Z, W). for Prolog is different than end( [], X, X). end( [X | Y], Z, [X | W]) :- end( Y, Z, W). but both are just the same as append( [], X, X). append( [X | Y], Z, [X | W]) :- append( Y, Z, W). Basically, the meaning remains in the head of the human and Prolog is completely void of capturing the meaning of the predicates, functors, atoms, etc. The same applies to any other programming language I am aware of. THEY ALL FAIL TO CAPTURE MEANING, AWARENESS, CONTEXT, etc. ! Why the programming languages are still not self-aware in the 21-st century ! That should really trouble you all.
@DaveYostCom11 ай бұрын
A lucid introduction to Prolog! Bravo.
@funkymaniak4 жыл бұрын
Always such high quality videos, with such charming visuals. Thank you!
@ceving8657 ай бұрын
Very well illustrated.
@DenisG6314 жыл бұрын
This is awesome. Thanks for the lecture!
@GeorgeElswefy Жыл бұрын
what a masterpiece!
@MarkVolkmann Жыл бұрын
Regarding my previous comment, it does solve the puzzle if I give it one more clue. For example, if I tell it that the last value on the first row is 8 then it works.
@HakanKjellerstrand5 жыл бұрын
Excellent!
@MrArteez5 жыл бұрын
really interesting video!
@ooloncolluphid99754 жыл бұрын
13:30 would we also be able to "generate" these "valid" sudoku puzzles using the predicate? that is, sudoku puzzles which admit one solution, say with N givens ? like if our role was to generate valid sudoku puzzles and not solve them :D ?
@ThePowerOfProlog4 жыл бұрын
Yes, that's possible, using this code as a building block: Simply generate a fully instantiated Sudoku Latin square (possibly also given hints), and then remove hints as long as they still uniquely determine the Latin square!
@jcr110119665 жыл бұрын
very interesting. Nice talk
@junderfitting87173 жыл бұрын
:- use_module(library(clpfd)).
@junderfitting87173 жыл бұрын
add this line at the beginning to resolve"sudoku.pl:3:28: Syntax error: Operator expected"
@freddyjoaquinbasiliorojas29263 жыл бұрын
Hello, Is there someone there who can help with some exercise in Prolog. I am new in language.
@mvaliente20014 жыл бұрын
It'll be useful, for a newbie perspective, to include the code to import the required libraries in these videos, not just in the video description.
@ThePowerOfProlog4 жыл бұрын
Yes, this may seem useful at first sight. However, it would be counterproductive: My goal is not to cement the status quo (i.e., the different system-specific libraries that must currently still be loaded to run these examples in some Prolog systems), but to encourage implementors of Prolog systems to make the needed functionality more readily available, so that fewer libraries need to be imported to run Prolog code in the first place! This will only work if enough people demand this from implementors. My goal is to enhance portability of code between different Prolog systems, and this will only work of more system-specific libraries are autoloaded or otherwise made accessible. For instance, Scryer Prolog already shows a recommended sample configuration file (~/.scryerrc) in its documentation, so that many libraries do not have to be loaded manually. Thank you for your interest, enjoy!
@reasonerenlightened24563 жыл бұрын
@@ThePowerOfProlog Why the programming languages are still not self-aware in the 21-st century ! That should really trouble you all. The problem with Prolog is that the meaning is assigned by the human . d( [], X, X). d( [X | Y], Z, [X | W]) :- d( Y, Z, W). for Prolog is different than end( [], X, X). end( [X | Y], Z, [X | W]) :- end( Y, Z, W). but both are just the same as append( [], X, X). append( [X | Y], Z, [X | W]) :- append( Y, Z, W). Basically, the meaning remains in the head of the human and Prolog is completely void of capturing the meaning of the predicates, functors, atoms, etc. The same applies to any other programming language I am aware of. THEY ALL FAIL TO CAPTURE MEANING, AWARENESS, CONTEXT, etc. ! Prolog was supposed to be the language of AI but it is still not self-aware.
@ighmur2 жыл бұрын
@@reasonerenlightened2456 As a human being I experiment daily awareness without intelligence and intelligence without awareness.
@jonnathan41895 жыл бұрын
pl:8: Syntax error: operator_expected -> Vs ins 1..9,
@MrArteez5 жыл бұрын
check documentation of ins, it requires a module to be used.
@fabianschnieder56812 жыл бұрын
@@MrArteez I used the module clpfd / clpz and its saying the same thing as before. I dont know what to change here.
@srdjanapostolovic37234 жыл бұрын
Please help me, :-use_module(library(clpfd)). sudoku(R) :- length(R,9), /*red je duzine 9*/ maplist(same_length(R),R), /*svi redovi su iste duzine*/ append(R,E), /*elemente svih redova gurnem u jednu listu*/ E ins 1..9, /* svi elementi te liste su veci od 1 i manji od 9*/ maplist(all_distinct,R), /*svi elementi po redovimasu medjusobno razliciti*/ transpose(R,C), /*rotira matricu 90 stepeni u desno i time kolone postaju redovi*/ maplist(all_distinct, C), R = [A,B,C,D,E,F,G,H,I], /*svaki red dobije ime*/ kvadratic(A,B,C), /* predkat kvadratic ce se pobrinuti da*/ kvadratic(D,E,F), /* kvadrati 3 x 3 unutar matrice takodje*/ kvadratic(G,H,I). /* sadrze medjusobno razlicite elemente*/ kvadratic([],[],[]). /* ako smo dosli do praznih lista stane */ kvadratic([E1,E2,E3|T1],[E4,E5,E6|T2],[E7,E8,E9|T3]) :- all_distinct([E1,E2,E3,E4,E5,E6,E7,E8,E9]), kvadratic(T1,T2,T3). /* pozovemo za ostatak listi */ This is my code and for some reason it returns false no matter what, thanks in advance.
@ThePowerOfProlog4 жыл бұрын
To find the goals that cause this to fail, you can systematically comment out or remove some of the goals. When you then insert the goal again, you can pinpoint when the program becomes too specific!