Skip to content

Commit cc8f529

Browse files
committed
Updated readme
1 parent 54aa5b6 commit cc8f529

1 file changed

Lines changed: 53 additions & 9 deletions

File tree

prolog/prolog1/README.md

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,67 @@
11
# Prolog Module 1
22

3-
## trace.pl
3+
An introductory guide to Prolog programming with practical examples and video tutorials. This module covers the fundamentals of Prolog including facts, rules, variables, arithmetic operations, and debugging techniques.
44

5-
[VIDEO](https://youtu.be/360AHAy8U-E) (2:54) - an example of debugging a query using `trace`
5+
---
66

7-
## factsandrules.pl
7+
## Files Overview
8+
9+
### trace.pl
10+
11+
This file demonstrates how to use Prolog's `trace` feature to debug queries step-by-step.
12+
13+
[VIDEO](https://youtu.be/360AHAy8U-E) (2:54) - An example of debugging a query using `trace`
14+
15+
---
16+
17+
### factsandrules.pl
18+
19+
Introduction to Prolog facts (base knowledge) and rules (logical deductions). This example uses a Star Wars family tree to demonstrate:
20+
21+
- Defining facts (father, mother relationships)
22+
- Creating rules (parent, child relationships)
23+
- Using rules to derive new knowledge from existing facts
824

925
[VIDEO](https://youtu.be/zRxNrK4kS5A) (5:49) - Introduction to Prolog, facts & rules
1026

11-
## workingwithnumbers.pl
27+
---
28+
29+
### variables.pl
30+
31+
Example of working with variables in Prolog, including:
32+
33+
- Variable assignment and unification
34+
- Singleton variables and their use cases
35+
- Querying with variables to find multiple solutions
36+
37+
---
38+
39+
### workingwithnumbers.pl
40+
41+
Master working with numbers in Prolog:
42+
43+
- Arithmetic operations
44+
- Converting between temperature scales (Fahrenheit to Celsius)
45+
- Using the `is` operator for arithmetic calculations
46+
- Comparing numeric values with relational operators
47+
- Writing rules that perform calculations and logical comparisons
1248

1349
[VIDEO](https://youtu.be/BtyKhoVooBM) (10:28) - Examples of working with numbers
1450

15-
## moreexamples.pl
51+
---
52+
53+
### moreexamples.pl
54+
55+
This file contains more complex examples building on the fundamentals, including advanced rule definitions and multi-step logical reasoning.
56+
57+
[VIDEO](https://youtu.be/fjw5nif64X8) (17:14) - More complex Prolog examples
58+
59+
(Note: The `same_temp/2` rule shown at the start of the video is not included in this file)
1660

17-
[VIDEO](https://youtu.be/fjw5nif64X8) (17:14) - (note that the same_temp/2 rule that is shown own screen at the start of the video is not included in this file)
61+
---
1862

19-
## otherexamples.pl
63+
### otherexamples.pl
2064

21-
I use this file to store small examples for short videos
65+
A collection of smaller examples created for brief demonstrations.
2266

23-
[VIDEO](https://youtu.be/CFuBfQwtscE) (2:12) - Explaination of why some queries return both true and false
67+
[VIDEO](https://youtu.be/CFuBfQwtscE) (2:12) - Explanation of why some queries return both true and false

0 commit comments

Comments
 (0)