Escolar Documentos
Profissional Documentos
Cultura Documentos
c1-c2-c3-c4 In the game of Mastermind, your job as the code-breaker is to deduce a hidden configuration of 4 coloured pegs ("the solution") chosen by another person (the code-maker), by making guesses at it. The pegs come in six different colours. For the purposes of argument, Green=1, Red=2, Black=3, Blue=4, Yellow=5, White=6.
Problem Descriptions
Hidden from code-breaker
c1-c2-c3-c4
After each guess is played, the codemaker 'marks' the guess, using some smaller, slimmer black and white pegs, which is called "markers". A black marker tells you that one of your pegs (but you don't know which one) is the right colour and in the right position. A white marker tells you that one of your pegs (again you don't know which one) is of a colour which is in the solution, but it's in the wrong position. The player is given ten guesses to try to find the solution.
Basic Configuration
Computer
Code-maker Team 1
Change role
Code-breaker
Team 2
During the match, each team will play against another team via EMU8086 emulator. Each team will take turn to play as code-maker and code-breaker. E.g. Game 1: Team 1 code-maker, Team 2 code-breaker Game 2: Team 1 code-breaker, Team 2 code-maker
Code-maker
Start
E.g. 12, 44 represents Green-Red-Blue-Blue
The secret codes should be shown to ensure that correct hints are given The code-maker should also include an interface to allow the user to enter the codes and show each line of codes (colors) attempted by the user as well as the hints given. The interface can be either text-based or graphic-based.
Yes
End
Game over
Line=10 or XY=40?
Code-breaker
Start
Set Line=1 Generate the first set of codes E.g. 12, 34 for Green-Red-Black-Blue
Initialization
X=#black Y=#white Yes
Line=10 ?
End
Your opponent will be announced during the match day. Each match consists of 2 games. Each team will change between the code-maker and code-breaker. For e.g., Team 1 code-maker, Team 2 codebreaker.
i. Team 1 runs the code-maker, Team 2 runs the code-breaker. ii. Team 2 enters the codes generated by the code-breaker into Team 1s code-maker. iii. Team 1s code-maker generates the hints and Team 2 enters the hints into their code-breaker. iv. Based on the hints given, Team 2s code-breaker generates the next set of codes. v. Steps (ii) to (iv) are repeated until the codes have been broken or 10 guesses have been attempted
The code-maker will be awarded 1 point for every unsuccessful guess from the code-breaker. e.g., if the code-breaker takes 7 steps to get the right answer, then
Matches Marks
Matches marks:
Winner (1) +1 Final (2) +1
Semifinal (4) +1
Quarterfinal (8) +1 Preliminary (16) +1
1 mark will be given to the team that participates in the matches. Each team that successfully proceed to the next round will earn 1 extra mark for the matches. For example, if you manage to enter semifinal, match marks = 1 + 1 + 1 = 3 marks.