Artificial Intelligence Expert Systems Prolog - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Artificial Intelligence Expert Systems Prolog

Description:

Negative premises (potentially) and positive conclusion ... No negative conclusions (fact) C1 ... Use when only one direction is desired from a certain point on ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 11
Provided by: justin79
Category:

less

Transcript and Presenter's Notes

Title: Artificial Intelligence Expert Systems Prolog


1
Artificial Intelligence / Expert SystemsProlog
  • Justin Gaudry
  • June 19, 2007

2
Logic Programming
  • Horn clauses
  • Formalized notation to express logical statements
  • Negative premises (potentially) and positive
    conclusion (potentially) ORed together
  • At most one positive literal (component)

3
Horn Clauses
  • 3 forms
  • No positive premise (conclusions to be
    discovered)
  • p ? q ? r
  • No negative conclusions (fact)
  • C1
  • At most one positive conclusion and all negative
    premises (rule)
  • C1 ? p ? q ? r

4
Horn Clauses
  • Modify
  • C1 ? p ? q ? r
  • p ? q ? r ? C1
  • (p ? q ? r) ? C1
  • (p ? q ? r) ? C1
  • ? together premises and imply the conclusion

5
Prolog
  • Horn clauses directly translate into Prolog
  • Goals to be achieved queries
  • Facts
  • Rules

6
Rules
  • Rules such as
  • (p ? q ? r) ? C1
  • translate to
  • C1 - p, q, r.
  • Facts such as
  • C1
  • translate to
  • C1.

7
Backward Chaining
  • Starting with conclusion, prove premises one by
    one until no goals left
  • When a premise fails, backtracks and another is
    tried until no others can be found to try at
    which point the argument at that point fails and
    further backtracking higher up may be tried

8
Cut
  • !
  • Dont backtrack, fail the parent predicate.
  • Use when only one direction is desired from a
    certain point on
  • Allows for nonchronological backtracking

9
  • holiday(friday, may1).
  • weather(friday, fair).
  • weather(saturday, fair).
  • weather(sunday, fair).
  • weekend(saturday).
  • weekend(sunday).
  • We go for picnics on good weekends and May 1st
  • picnic(Day) - weather(Day,fair), weekend(Day).
  • picnic(Day) - holiday(Day,may1).

10
Examples
  • Do not look at the solution to Project 2
  • (site not provided)
  • http//www.unf.edu/jgaudry/Courses/acadinteg.html
  • http//www.cs.nuim.ie/jpower/Courses/PROLOG/
  • http//www.sics.se/isl/sicstuswww/site/links.html
Write a Comment
User Comments (0)
About PowerShow.com