` ANTIC VOL. 7, NO. 7 / NOVEMBER 1988`

# LOTTOPIK

Pick the winning numbers with your Atari. By Dr. John Ferguson

Use the Atari's random number generator to create ready-to-use lists of Lotto number choices. Your odds against winning may still be impossible, but at least you won't need to agonize over which numbers to pick. This BASIC program works on all 8-bit Atari computers of any memory size, with disk or cassette.

Win millions! The dream is wonderful, even if the odds are nearly impossible...

...Nevertheless, most states now have their Lotto games, and playing them has become a national pastime. Playing is easy, but choosing "lucky" numbers can really be agonizing. People play "favorites," birthdays, ages, addresses, telephone numbers, hunches, or just close their eyes and point.

One thing is for sure-any set of numbers is just as likely to win as any other. The people running lotteries go to great lengths to ensure this. On the other hand, prizes are divided among those that choose the same winning numbers, so your best chance of winning-remote as that may be-is to pick numbers other people don't. Such numbers have an equal opportunity to win, but pay more.

The question is, what are those less-used numbers? How do you avoid all the psychological biases that lead to picking numbers that are too popular? The obvious answer is to match the way the lottery numbers are chosen in the first place-use a purely random system. The catch is that picking numbers randomly, even with your own ping-pong balls, is not very easy

However, your Atari computer has a built-in function that generates pseudo-random numbers. LottoPik is a short BASIC program designed to pull these numbers out of the computer and display them for you in an easy-to-read, printable format.

So get lucky. Type in Listing 1, LOTTOPIK.BAS, check it with TYPO II and SAVE a copy before you RUN it.

WHAT LOTTOPIK DOES
Actually there are a number of useful steps that LottoPik carries out for you. Of course, it first must calculate a random integer within the correct range. Then LottoPik does this five more times to create the set of six numbers in the Lotto format. It also makes sure that none of the six numbers are duplicates.

Making it easier to read and transfer the numbers, LottoPik sorts and displays them in ascending order. The program also uses a string function to convert the numbers into a consistent two-digit form, just to keep things neat. Since a Lotto card usually lets you play as many as five games at once, the program repeats the above steps five times and displays all the numbers needed to complete a single card. To display another full set of numbers, press [RETURN]. Finally, LottoPik lets you print the results, using a simple driver that should work with any printer.

Choosing
"lucky" numbers
can be agonizing.

LottoPik is very easy to use. But before you RUN it, change the variable X in line 5 and make it equal to the highest number which can be chosen in your state's Lotto.

I haven't won yet, but I have had my money's worth of fun. I hope you have better luck.

Dr. John Ferguson is a marine biology professor at Eckerd College in Florida. An expert on starfish, he published Beer Party Atari in the May 1985 Antic.