Write match(taste, movie): how much you’ll enjoy a movie. taste says how much you like each genre (negative means you dislike it). movie says how much of each genre the movie has.
You love action, dislike romance, don’t care about horror and like comedy. This movie has lots of action and a bit of romance and comedy. How much will you enjoy it?
match(taste, movie)| taste | how much you like each genre [action, romance, horror, comedy] | e.g. [2, −1, 0, 1] |
| movie | how much of each genre the movie has | e.g. [1, 0, 0, 0] |
| returns | one number: how much you'll enjoy it | |