John and Mary are playing the popular
game "rock, paper and scissors". We suppose that each of
them selects one sign in a completely random way, equally
probable for the three cases. Rock wins to scissors,
scissors wins to paper and paper wins to rock.
What to do
Model the scenario in P-log so that we can conclude any of
the facts, winner(mary)
, according to the game result. Then,
compute with P-log the following probabilites
- The probability of winner(mary).
- The probability of winner(mary)
conditioned to the observation play(john)=rock.
- The probability of a tie.
Now suppose that Mary is sometimes quick enough to see
John making the "paper" sign. In fact, 2 of each 3
times, she is able to foresee John's "paper" and so, she
marks "scissors". Model this variant and recompute the
three probabilities above in this new situation.
You must deliver three files: two files with the
domains in P-log (the original one and the second
variant) plus a text file listing the obtained results
(and, if possible, explaining their values).