Yes, all you have to do is train it using multiple examples of every possible situation and combinations thereof --- which is practically impossible.
Yes, all you have to do is train it using multiple examples of every possible situation and combinations thereof --- which is practically impossible.