项目作者: bonhamdaniel
项目描述 :
Simple Prolog programs demonstrating the basics of the language.
高级语言: Prolog
项目地址: git://github.com/bonhamdaniel/prolog-basics.git
prolog-basics
Simple Prolog programs demonstrating the basics of the language.
The repository includes the following solutions:
- factorial: myfactorial.pl and README.md - accepts an integer from the user, calculates the factorial of that integer, and displays the result.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.