I am trying to create a rule called great_show/1 that checks that a show has a rating of at least 8. Here is the fact base:
show(mad_men, 2007, 8.6).
show(breaking_bad, 2008, 9.5).
show(outlander, 2014, 8.5).
show(the_xfiles, 1993, 8.7).
show(friends, 1994, 8.9).
show(general_hospital, 1963, 6.3).
show(the_walking_dead, 2010, 8.4).
show(game_of_thrones, 2011, 9.4).
show(rick_and_morty, 2013, 9.5).
show(the_soprano, 1999, 9.2).
I tried this, but SWI-Prolog gave me an unknown procedure error:
?- great_show(show(movie, year, rating) :- rating>8.5).
Then, I tried this and it gave me several errors including an unknown procedure error and an error message saying that rules should be loaded from a file but that shouldn't be necessary.
?- great_show(Z):-show(X,Y,_),Z>8.5.
What should I do? Thank you in advance for any guidance you can give me.