INFO0049-1, Knowledge representation
(2013-2014)
Course notes :
Tutorials :
- Tutorial 1 (20 September)
- Tutorial 2 (4 October)
- Tutorial 3 (11 October)
- Tutorial 4 (18 October)
-> table.pl
- Tutorial 5 (25 October)
- Tutorial 6 (8 November)
-> search.pl,
queens.pl
- Tutorial 7 (15 November)
-> thief.pl,
sliding.pl,
train.pl
- Tutorial 8 (22 November)
-> astar.pl,
idastar.pl,
rbfs.pl,
shortest.pl,
andor.pl,
hanoi.pl
- Tutorial 9 (29 November)
-> minimax.pl,
tictactoe.pl
- Tutorial 10 (6 December)
-> constraints.pl,
queensCSP.pl,
sudokuCSP.pl
- Tutorial 11 (13 December)
-> append_dl.pl,
reverse_dl.pl,
flatten_dl.pl,
quicksort_dl.pl
Hints :
- To show the whole answer with SWI-Prolog, use the following command at the top of your files :
:- set_prolog_flag(toplevel_print_options, [quoted(true), portray(true),
max_depth(0), attributes(portray)]).
Course Information :
Useful links :
C/C++ <-> SWI-Prolog interface :
- 1. (Embedded SWI-Prolog in C Program) - Check if a number is prime :
-> prime.c,
prime.pl
Execute the command plld -o prime prime.c prime.pl to compile.
- 2. (Embedded SWI-Prolog in C++ Program) - Check if a number is prime :
-> prime.cc,
prime.pl
Execute the command plld -o prime prime.cc prime.pl to compile.
(plld appelle g++ à la place de gcc si les fichiers ont pour extension *.cc|*.C|*.cxx|*.cpp)
- 3. (SWI-Prolog calling a C function predicate) : (to do)
- 4. (SWI-Prolog calling a C++ function predicate) : (to do)
- 5. (with lists) - Sort a list using predefined predicate msort :
-> sort.c ou sort.cc
Execute the command plld -o sort sort.c or plld -o sort sort.cc to compile.
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth. (A. Conan Doyle)
|