4 research outputs found

    Declaratively solving Google Code Jam problems with Picat

    Full text link
    In this paper we present several examples of solving algorithmic problems from the Google Code Jam programming contest with Picat programming language using declarative techniques: constraint logic programming and tabled logic programming. In some cases the use of Picat simplifies the implementation compared to conventional imperative programming languages, while in others it allows to directly convert the problem statement into an efficiently solvable declarative problem specification without inventing an imperative algorithm

    Planning as Tabled Logic Programming

    Get PDF
    This paper describes Picat's planner, its implementation, and planning models for several domains used in International Planning Competition (IPC) 2014. Picat's planner is implemented by use of tabling. During search, every state encountered is tabled, and tabled states are used to effectively perform resource-bounded search. In Picat, structured data can be used to avoid enumerating all possible permutations of objects, and term sharing is used to avoid duplication of common state data. This paper presents several modeling techniques through the example models, ranging from designing state representations to facilitate data sharing and symmetry breaking, encoding actions with operations for efficient precondition checking and state updating, to incorporating domain knowledge and heuristics. Broadly, this paper demonstrates the effectiveness of tabled logic programming for planning, and argues the importance of modeling despite recent significant progress in domain-independent PDDL planners.Comment: 27 pages in TPLP 201

    Développement d'une technique d'acquisition de contraintes basée sur le nombre de solutions

    Get PDF
    Plusieurs paradigmes de programmation existent pour aider à résoudre des problèmes d'optimisation combinatoire, l'un d'entre eux étant la programmation par contraintes. L'idée de ce paradigme consiste à modéliser le problème à résoudre à l'aide de contraintes, c'est-à-dire des déclarations qui forcent les variables du problème à respecter une relation mathématique. Les contraintes des problèmes ont habituellement des paramètres qui permettent de préciser la relation mathématique à respecter et des variables de décision qui représentent les variables pour lesquelles la relation mathématique doit s'appliquer. Bien qu'intéressant en soi, la programmation par contraintes peut également s'étendre sur d'autres concepts, notamment la modélisation automatique. L'acquisition ou apprentissage de contraintes consiste à apprendre les différentes contraintes, incluant les valeurs des paramètres, qui peuvent expliquer un ensemble d'exemples fournis. L'apprentissage de contraintes peut être utile dans plusieurs situations, comme l'apprentissage de structures d'horaires d'hôpitaux à l'aide d'anciens exemples d'horaires. L'apprentissage de contraintes est encore un domaine nouveau pour lequel les stratégies doivent encore être adaptées ou développées. Les techniques d'acquisition existantes varient en genre, incluant des méthodes qui créent des solutions artificielles pour interagir avec un utilisateur ou des approches qui se basent sur des analyses mathématiques rigoureuses de solutions pour faire des choix sans jamais communiquer avec l'utilisateur. Dans ce mémoire, nous explorons une nouvelle méthode pour performer l'acquisition de contraintes. Le critère principal de la méthode développée est basé sur le nombre de solutions du modèle considéré et utilise des outils de dénombrement. Notre technique performe bien sur les problèmes essayés et ouvre la porte à une nouvelle manière d'apprivoiser les problèmes d'acquisition de contraintes.Several programming paradigms exist to help solve combinatorial optimization problems, one of them being constraint programming. The idea of this paradigm is to model the problems to solve using constraints, i.e. statements that force the variables of the problem to respect a mathematical relation. The constraints of a problem usually have parameters that allow to specify the mathematical relationship to be respected and decision variables that represent the variables on which the mathematical relationship must be applied. Although interesting in itself, constraint programming can also expand on other concepts, such as the automatisation of the modeling process. Constraints acquisition consists in learning the different constraints, including parameter values, which can explain a set of examples provided. Constraint acquisition can be useful in multiple situations, such as learning structures in schedules for hospitals using old schedules. Constraint learning is still a new area for which strategies still need to be adapted or developed. The existing techniques of acquisition varies widely in style, including methods that create artificial solutions to interact with a user or approaches which are based on complex mathematical analyzes of real solutions to make choices without ever communicating with the user. In this thesis, we explore a new method to perform the acquisition of constraints. The main criterion of the developed method is based on the number of solutions of the considered model and uses tools of model counting. Our technique works well on proven problems and opens the door to a new way of approaching acquisition constraint problems
    corecore