 
 
 
 
 
   
Tunnel is a card game invented by the instructor.
 .
.
Here's an example of the play of the cards. We will call the players North, South, East and West, and will always assume South is the dealer. Suppose North/South have the following cards:
 
 
 
 
 
 
 
 
 ,
K
,
K
 ,
and A
,
and A .
So n1=3.  After those cards have been played,
East/West have 7 high cards, namely Q
.
So n1=3.  After those cards have been played,
East/West have 7 high cards, namely Q
 ,
J
,
J
 ,
A
,
A
 ,
K
,
K
 ,
A
,
A
 ,
K
,
K ,
and
Q
,
and
Q .
So n2=7.  North/South then have 7 high cards, but
since 10 cards have already been played, n3=3.
.
So n2=7.  North/South then have 7 high cards, but
since 10 cards have already been played, n3=3.
The sequence can't be longer than 5 entries. (Why? What is the probability of exactly five numbers in the sequence?)
Scoring. The score of a player depends on how close the predicted sequence is to the actual sequence. The following pseudo-code describes how the score is calculated:
score = 0;
index = 1;
score_per_index = 60/(actual_sequence_length);
while (index <= actual_sequence_length) {
      score += score_per_index;
      if (guess[index] != sequence[index])
           {
            score -= 3*abs(guess[index]-sequence[index]);
            break;
           }
}
Suppose there are 3 elements in the real sequence, as above.
Then, if the first number in the sequence is correct, you score 20
points plus the score for the subsequence starting with n2.
Otherwise you score 20 points less three times
the absolute difference between
your guess for n1 and the real value, with no additional contribution
from the rest of the sequence.  Thus there is a high incentive to get the
first elements of the sequence exactly correct.
The maximum possible score is always 60.  It is theoretically possible
to obtain a negative score.
With a correct sequence of (3,7,3), a guess of (3,7,3) would score 60, a guess of (3,6,4) would score 37, a guess of (5,7,1)would score 14, and a guess of (3,5,4,1) would score 34.
Strategy. The aim is to maximize your score. You can see your cards, but need to make inferences about your partner's cards (and, by elimination, about your opponents' cards). The dealer's team may have an inherent advantage because they start the play, and we will try to quantify that advantage during class. Your partner will be predicting the sequence too, so you will be competing with him/her/it to accurately predict the outcome.
Some initial tips for deciding which cards to ask for:
We will provide software that chooses four players at random and plays a game between them, tallying the scores. At the end of the project, we will run a tournament between all players.
In addition to programming a good strategy, you should also try to determine a good value of r for a balanced game. If r is too small, scores will be consistently low. If r is too large, scores will be consistently high. Try to find a range of rs such that the variance of the score from game to game is high.
Your program must conform to interface specifications that will be supplied later.
 
 
 
 
