Giter Site home page Giter Site logo

maze-solving-prolog's Introduction

maze-solving-prolog

Maze solving implemented in prolog.

Originally, it was an assignment on Introduction to AI course in Innopolis University (Spring 2020, 2nd year).
The original report with more information can be found here.

Table of contents

Example of usage

  • For additional info about available parameters
    swipl -s main.pl -g main -- -h
  • For running random search with defined max path length
    swipl -s main.pl -g main -- --map maps/map.pl --alg random_search --max 500
  • For help running heuristic search with increased vision
    swipl -s main.pl -g main -- --map maps/map.pl --alg heuristic_search -v 2

Structure of input files

Each input file should contain:

  • Exactly one size/1 rule, which defines size of the map. For example, size(5) would mean that map is 5 by 5.
  • Exactly one start/2 rule, which defines on which cell maze starts. Usually it is start(0, 0)
  • Any amount of o/2 rules. Defines the unpassable wall.
  • Any amount of t/2 rules. Defined the end points of the maze.
  • Any amount of h/2 rules. Defines the "teleport" field. It is possible to teleport to such a field from any distance, if it is on the same line. Works diagonally.

However, more than one o/2, h/2 and/or t/2 can’t be at the same coordinates.

Other information

The code is tested only on SWI-Prolog (threaded, 64 bits, version 8.1.21-198-gd129a7435).
The code uses a clpfd library for convenient working with integers.

maze-solving-prolog's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.