项目作者: bonhamdaniel

项目描述 :
Simple Prolog programs demonstrating the basics of the language.
高级语言: Prolog
项目地址: git://github.com/bonhamdaniel/prolog-basics.git
创建时间: 2017-05-14T11:38:20Z
项目社区:https://github.com/bonhamdaniel/prolog-basics

开源协议:

下载


prolog-basics

Simple Prolog programs demonstrating the basics of the language.

The repository includes the following solutions:

  1. factorial: myfactorial.pl and README.md - accepts an integer from the user, calculates the factorial of that integer, and displays the result.
  2. list: mylist.pl and README.md - accepts a single integer x and a list of integers L from the user, then displays all the positions in L where x resides.
  3. acyclic-path: acyclicpath.pl and README.md - accepts a graph, a start node, and an end node from the user, then displays one or more acyclic paths, if present given the parameters.
  4. minimum-path: minimumpath.pl and README.md - accepts a start node, and an end node from the user, then displays the minimum-cost path found given these parameters and a graph hard-coded into the program.
  5. word-syllables: wordsyllables.pl and README.md - accepts a word from the user, then divides that word into syllables based on two specified rules and displays the result.
  6. farmer-problem-breadth-first: fgwc-breadth-first.pl and README.md - displays a solution to the farmer problem, including search strategy details, using a breadth-first search approach.
  7. farmer-problem-depth-first: fgwc-depth-first.pl and README.md - displays a solution to the farmer problem, including search strategy details, using a depth-first search approach.
  8. farmer-problem-expert-system: exshell.pl, knowledgebase.pl, and README.md - displays a solution to the farmer problem, including a proof of the solution details, using an expert system approach.