Reference no: EM132397599
Bar Brawl
Problem Description
You are the proprietor of an establishment that sells beverages of an unspecified, but delicious, nature. The establishment is frequented by a set P of patrons. One of patron is the instigator and another is the peacemaker.
On a given evening, a subset S ⊆ P is present at the establishment. If the instigator is in S but the peacemaker is not in S, then a fight will break out. If the instigator is not in S or if the peacemaker is in S, then no fight will occur.
Your goal is to predict whether a fight will break out among a subset of the patrons without initially knowing the identity of the instigator or the peacemaker.
Procedure
Develop a KWIK learner for this problem. When presented with S, the patrons at the establishment, your learner will respond with "FIGHT", "NO FIGHT", or "I DON'T KNOW". Additionally, it should be capable of learning from the tuple of S and the true outcome for the evening.
For each problem, the following input will be given:
atEstablishment : boolean[0..numberOfEpisodes][0..numberOfPatrons]
fightOccured : boolean[0..numberOfEpisodes]
Specifically:
? For each episode, you should present your learner with the next row of atEstablishment and the corresponding row of fightOccured.
? If your learner returns “FIGHT” or “NO FIGHT”, you may continue on to next episode.
? If your learner returns “I DON’T KNOW”, then you should present the pair (atEstablishment, fightOccured) to you learner to learn from.
You will submit a list of strings of the output of from you learner each time it is presented with an episode.
Attachment:- Input File.zip