{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Learning ASP from Examples\n", "\n", "This directory collects notebooks with exercises to learn Answer Set Programming from examples.\n", "You can browse through the directory by clicking on the folder symbol at the left side of this window.\n", "\n", "These exercises belong to the tutorial \"Easy Answer Set Programming\" of the course [Answer Set Solving in Practice](https://teaching.potassco.org) of the University of Potsdam.\n", "\n", "The environment of the notebooks is described in the file ``environment.ipynb`` at the top directory.\n", "\n", "The directory ``without-variables`` is about programs without variables, and\n", "the directory ``with-variables`` is a about programs with variables.\n", "\n", "Every exercise consists of around 8 pairs of logic programs.\n", "You can see the answer sets of the first program, and \n", "your task is to find the answer sets of the second program\n", "(note that answer sets are the same as stable models).\n", "\n", "You can take these exercises as puzzles where you learn from the first program, \n", "and then you apply this knowledge to find the answer sets of the second program.\n", "\n", "To correct your solution, run ``clingo`` on the second program to obtain its answer sets.\n", "For this, simply click on the cell and then either click the button ``Run`` or press ``Ctrl+Enter``.\n", "The commands for ``clingo`` use option ``-V0`` to print a short output, and \n", "option ``0`` to enumerate all answer sets." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.7" } }, "nbformat": 4, "nbformat_minor": 4 }