istediğim şey friendNetwork içindekilerin hepsininde ortak olan filmi önermesiç Buna göre suggest yazar mısın : Kodum :friend(chris, lee).
friend(dale, myrna).
friend(chris, spike).
friend(pat, chris).
friend(myrna, sean).

friends(A, B) :- friend(A, B).
friends(A, B) :- friend(A, X), friends(X, B).

wants(pat,comedy).
wants(sean,adventure).
wants(dale,any).
wants(lee,different_than(sean)).
wants(myrna, thriller).
wants(spike, this_century).
wants(chris, comedy_1980s).


movie_genre(the_shining,horror).
movie_genre(a_nightmare_on_elm_street , horror).
movie_genre(the_ring , horror).
movie_genre(the_exorcist, horror).
movie_genre(paranormal_activity , horror).
movie_genre(get_out, horror).
movie_genre(hereditary, horror).
movie_genre(the_babadook, horror).
movie_genre(scream, horror).
movie_genre(it, horror).
movie_genre(indiana_jones, adventure).
movie_genre(back_to_the_future , adventure).
movie_genre(the_matrix , adventure).
movie_genre(pirates_of_the_caribbean:_the_curse_of_the_black_pearl, adventure).
movie_genre(the_dark_knight , adventure).
movie_genre(jurassic_park , adventure).
movie_genre(mad_max, adventure).
movie_genre(mission_impossible, adventure).
movie_genre(the_lord_of_the_rings_trilogy, adventure).
movie_genre(the_hunger_games , adventure).
movie_genre(airplane, comedy).
movie_genre(ferris_bueller_day_off, comedy).
movie_genre(the_mask, comedy).
movie_genre(dumb_and_dumber , comedy).
movie_genre(bridesmaids, comedy).
movie_genre(superbad, comedy).
movie_genre(the_hangover, comedy).
movie_genre(anchorman:_the_legend_of_ron_burgundy , comedy).
movie_genre(step_brothers, comedy).
movie_genre(mean_girls, comedy).
movie_genre(friday_the_13th, thriller).
movie_genre(cujo, thriller).
movie_genre(silkwood, thriller).
movie_genre(die_hard, thriller).
movie_genre(uno, thriller).
movie_genre(rambo_iii, thriller).
movie_genre(betrayed,thriller).
movie_genre(fallen, thriller).
movie_genre(drive, thriller).
movie_genre(romeo_and_juliet, romance).
movie_genre(pretty_woman, romance).
movie_genre(dirty_dancing, romance).
movie_genre(when_harry_met_sally, romance).
movie_genre(ghost, romance).
movie_genre(issiz_adam, romance).
movie_genre(the_notebook, romance).
movie_genre(titanic,romance).
movie_genre(before_sunrise, romance).
movie_genre(blue_valentine, romance).
movie_genre(schindler_list,drama).
movie_genre(the_shawshank_redemption,drama).
movie_genre(the_pianist,drama).
movie_genre(american_beauty ,drama).
movie_genre(life_is_beautiful ,drama).
movie_genre(brokeback_mountain ,drama).
movie_genre(the_green_mile ,drama).
movie_genre(the_tree_of_life ,drama).
movie_genre(a_separation,drama).
movie_genre(shrek, animation).
movie_genre(lion_king, animation).
movie_genre(toy_story, animation).
movie_genre(aladdin, animation).
movie_genre(beauty_and_the_beast, animation).
movie_genre(the_little_mermaid, animation).
movie_genre(finding_nemo , animation).
movie_genre(wall_e, animation).
movie_genre(how_to_train_your_dragon, animation).
movie_genre(zootopia, animation).
movie_genre(blade_runner,drama).
movie_genre(the_silence_of_the_lambs, thriller).
movie_year(the_shining, 1980).
movie_year(a_nightmare_on_elm_street, 1984).
movie_year(the_ring, 2002).
movie_year(the_exorcist, 1973).
movie_year(paranormal_activity, 2007).
movie_year(get_out, 2017).
movie_year(hereditary, 2018).
movie_year(the_babadook, 2014).
movie_year(scream, 1996).
movie_year(it, 2017).

movie_year(indiana_jones, 1981).
movie_year(back_to_the_future, 1985).
movie_year(the_matrix, 1999).
movie_year(pirates_of_the_caribbean:_the_curse_of_the_black_pearl, 2007).
movie_year(the_dark_knight, 2008).
movie_year(jurassic_park, 1993).
movie_year(mad_max, 2010).
movie_year(mission_impossible, 2000).
movie_year(the_lord_of_the_rings_trilogy, 2003).
movie_year(the_hunger_games, 2014).
movie_year(airplane, 1980).
movie_year(ferris_bueller_day_off, 1986).
movie_year(the_mask,1994).
movie_year(dumb_and_dumber,1994).
movie_year(bridesmaids, 2011).
movie_year(superbad, 2007).
movie_year(the_hangover, 2009).
movie_year(anchorman:_the_legend_of_ron_burgundy, 2004).
movie_year(step_brothers, 2009).
movie_year(mean_girls, 2004).
movie_year(the_silence_of_the_lambs,1991).
movie_year(friday_the_13th,1980).
movie_year(cujo,1983).
movie_year(silkwood,1983).
movie_year(die_hard,1988).
movie_year(rambo_iii,1988).
movie_year(betrayed,1988).
movie_year(fallen,2021).
movie_year(drive,2012).
movie_year(uno,2024).
movie_year(issiz_adam,2008).
movie_year(romeo_and_juliet,1992).
movie_year(pretty_woman,1990).
movie_year(dirty_dancing, 1987).
movie_year(when_harry_met_sally  , 1989).
movie_year(ghost, 1990).
movie_year(the_notebook, 2004).
movie_year(titanic,1997).
movie_year(before_sunrise, 1995).
movie_year(blue_valentine, 2010).
movie_year(blade_runner,1982).
movie_year(schindler_list ,1993).
movie_year(the_shawshank_redemption,1994).
movie_year(the_pianist,2002).
movie_year(american_beauty,1999).
movie_year(life_is_beautiful,1997).
movie_year(brokeback_mountain,2005).
movie_year(the_green_mile,1999).
movie_year(the_tree_of_life,2011).
movie_year(a_separation,2011).
movie_year(shrek, 2001).
movie_year(lion_king,1994).
movie_year(toy_story, 1995).
movie_year(aladdin, 1992).
movie_year(beauty_and_the_beast, 1991).
movie_year(the_little_mermaid, 1989).
movie_year(finding_nemo , 2003).
movie_year(wall_e,2008).
movie_year(how_to_train_your_dragon,2010).
movie_year(zootopia,2016).

ok_with(X, Movie) :- wants(X, G), movie_genre(Movie, G).
ok_with(lee, Movie) :- \+ (ok_with(sean, Movie)).
ok_with(dale, Movie).
ok_with(spike, Movie) :- movie_year(Movie, Y), Y >= 2000.
ok_with(chris, Movie) :- movie_year(Movie, Y), Y >= 1980, Y < 1990, movie_genre(Movie,G) , G=comedy.

loop_through_list(List) :-
    member(item, List),
    ok_with(item,Movie).
    fail.

loop_through_list(_).


suggest(Person, Movie) :-
    setof(Friend, friends(Person, Friend), FriendNetwork),
    loop_through_list(FriendNetwork).