Skip to content

Solution for the Advanced Programming Languages for Artificial Intelligence course at KU Leuven.

Notifications You must be signed in to change notification settings

myschoolwork/aplai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

119 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APLAI

Implementation for an assignment for Advanced Programming Languages for Artificial Intelligence course at KU Leuven.

Structure

In the directory "test results", all of our test results can be found in regular text documents (.txt). For the code files, the names consist of [puzzle, Sudoku or Shikaku]_[implementation, CHR or eclipse]_[alt or nothing if regular].pl

There is also a file print_shikaku.pl that was supplied on toledo to get a nice unicode print of the Shikaku results. and there are 2 puzzle files, where sudex_toledo.pl contains all of the Sudoku puzzles and puzzles.pl contains all of the Shikaku puzzles.

e.g. the file sudoku_chr_channel.pl contains the CHR implementation of Sudoku using channeling.

Note that the Eclipse channeling for Sudoku imports both other implementations and thus some warnings will be shown because "solve" and "solve_all" are overwritten. Don't worry about this, it's normal.

ECLiPSe

Open the tkeclipse interface and load the file you wish to run. It is important that you run the file in the same folder as the other files, as it will automatically include the file with the puzzles. Once opened, you can solve all puzzles solve_all. or solve a specific puzzle solve(name_of_puzzle). and the program will return the results in the console.

You can also run all Sudoku experiments from the channeling files. The file defines a method solve_all/0 which will loop over all the different Sudokus defined in the sudex_toledo, using default channeling method. You can also solve a specific puzzle by using solve/2 using the puzzle name and model ('simple', 'alt' or 'both') as arguments.

CHR

Open SWI-Prolog and load the file you wish to run. It is important that you run the file in the same folder as the other files, as it will automatically include the file with the puzzles. The same commands are available as in ECLiPSe to run the puzzle(s) you wish.

About

Solution for the Advanced Programming Languages for Artificial Intelligence course at KU Leuven.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •