3. Two players, A and B, are playing a table tennis match, agreeing that the winner of each game gets 1 point and the loser gets 0 points. The match stops when one player is 2 points ahead or after 6 games have been played. Suppose the probability of A winning each game is $\frac{2}{3}$, and the probability of B winning each game is $\frac{1}{3}$, with the outcomes of each game being independent. Then, the expected value $E \xi$ of the number of games $\xi$ played when the match stops is
A. $\frac{241}{81}$
B. $\frac{266}{81}$
C. $\frac{274}{81}$
D. $\frac{670}{243}$
Since the winner is ahead by 2 points when the match is less than 6 games, the number of games can only be $2, 4, 6$. Among these, the situation where the match is decided in 2 games is when either A or B wins 2 games; the situation where the match is decided in 4 games is when either A or B wins 3 games and loses 1 game, and the lost game is in the first 2 games. Therefore, the situation requiring 6 games is when, in the first 4 games, either A or B wins 1 game and loses 1 game in both the 1st and 2nd games and the 3rd and 4th games. The corresponding distribution is thus $E \xi=2 \times \frac{5}{9}+4 \times \frac{20}{81}+6 \times \frac{16}{81}=\frac{266}{81}$. Therefore, the answer is $B$.