PAPERBACK
\$10.95

• #### Credits 165-166

mal strategies in general) without justification, even though he or she may give the "correct answer" that Roberto's strategy is better.

Even an accurate answer to question 8 (such as: "I'm not sure I found the best strategy, because all I did was to guess") would not lift the response out of the low category.

#### Appendix

The following is a program written in Applesoft BASIC to simulate the playing of HOG. It calls for the number of number cubes to be put in the cup and for the number of rolls to be made. It then prints out the average score obtained.

 10 INPUT "HOW MANY NUMBER CUBES DO YOU WANT TO PUT IN THE CUP?"; D 20 INPUT "HOW MANY GAMES DO YOU WANT TO PLAY?"; G 30 T = 0: REM THIS COUNTS TOTAL SCORE 40 FOR I = 1 TO G 50 S = 0: REM THIS IS THE SCORE WITHIN A SINGLE GAME 60 FOR J = 1 TO D: REM LOOK AT EACH CUBE 70 R = INT(6 * RND(1))+1: REM THIS IS A RANDOM WHOLE NUMBER BETWEEN 1 AND 6 80 IF R = 1 THEN GOTO 200: REM THE PROCESS IS SHORT-CIRCUITED AS SOON AS A 1 APPEARS 90 S = S + R: REM THE CUBE ISN'T 1, SO ADD IT TO THE SCORE 100 NEXT J 110 T = T + S 120 NEXT I 130 PRINT "THE AVERAGE SCORE, PLAYING ";G;" GAMES, WITH ";D;" NUMBER CUBES, WAS '';T/G;"." 140 PRINT: PRINT "DO YOU WANT TO PLAY AGAIN? (Y/N)" 150 GET Q\$ 160 IF Q\$ = "Y" THEN GOTO 10 170 END 200 S = 0: J = D: GOTO 100

The National Academies | 500 Fifth St. N.W. | Washington, D.C. 20001