https://github.com/natthasath/use-case-prolog
Prolog (Programming in Logic) is a high-level programming language associated with artificial intelligence and computational linguistics. It features a declarative programming paradigm, where logic and rules are defined, allowing the system to infer conclusions from given facts.
https://github.com/natthasath/use-case-prolog
prolog use-case
Last synced: 4 months ago
JSON representation
Prolog (Programming in Logic) is a high-level programming language associated with artificial intelligence and computational linguistics. It features a declarative programming paradigm, where logic and rules are defined, allowing the system to infer conclusions from given facts.
- Host: GitHub
- URL: https://github.com/natthasath/use-case-prolog
- Owner: natthasath
- License: mit
- Created: 2024-06-21T08:55:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-21T09:10:49.000Z (about 2 years ago)
- Last Synced: 2026-01-17T20:33:57.355Z (5 months ago)
- Topics: prolog, use-case
- Language: Prolog
- Homepage: https://www.swi-prolog.org/
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 🎉 Use Case Prolog
Prolog (Programming in Logic) is a high-level programming language associated with artificial intelligence and computational linguistics. It features a declarative programming paradigm, where logic and rules are defined, allowing the system to infer conclusions from given facts.



### ✅ Requirements
- [SWI Prolog](https://www.swi-prolog.org/download/stable)
### 🏆 Run
- Open SWI Prolog
```shell
swipl
```
- Run `hello.pl`
```
1 ?- [hello].
true.
2 ?- parent(X, mary).
X = john.
3 ?- grandparent(john, Y).
Y = kate ;
```
- Run `game24.pl`
```
1 ?- [game24].
true.
2 ?- solve24(4, 8, 3, 1, Expr).
Expr = (4+8)*(3-1) ;
Expr = (8+4)*(3-1) ;
Expr = (3-1)*(4+8) ;
Expr = (3-1)*(8+4) ;
false.
```
- Run `prime_factor.pl`
```
1 ?- [prime_factor].
true.
2 ?- prime_factors(84, Factors).
Factors = [7, 3, 2, 2] .
3 ?- prime_factors(101, Factors).
Factors = [101] .
```