Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
wt-lab-exam authored May 26, 2024
1 parent b3e48b7 commit f12ed2b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions CSP & Prolog/movierecc.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
% Facts representing movies and their genres
movie(iron_man, action).
movie(the_shawshank_redemption, drama).
movie(inception, sci-fi).
movie(the_dark_knight, action).
movie(pulp_fiction, crime).
movie(frozen, animation).
movie(coco, animation).
movie(black_panther, action).
movie(finding_nemo, animation).
movie(forrest_gump, drama).

% User preferences
user_likes(john, action).
user_likes(alice, animation).
user_likes(bob, drama).

% Predicate to track watched movies
watched(john, pulp_fiction).
watched(john, finding_nemo).
watched(alice, frozen).
watched(bob, the_dark_knight).
watched(bob, forrest_gump).

% AI predicate for movie recommendation
recommend_movie(User,Movie) :-
user_likes(User, Genre),
movie(Movie, Genre),
\+ watched(User, Movie).

0 comments on commit f12ed2b

Please sign in to comment.