Tic Tac Toe Poker

The classic book BASIC Computer Games, published by Creative Computing, inspired a generation of programmers. The games were written by many people, and compiled by David H. Ahl. The fabulous illustrations accompanying each game were done by George Beker.

I've included all the games here for your tinkering pleasure. I've tested and tweaked each one of them to make sure they'll run with Vintage BASIC, though you may see a few oddities. That's part of the fun of playing with BASIC: it never works quite the same on two machines. The games will play better if you keep CAPS LOCK on, as they were designed to be used with capital-letter input.

And unlike tic-tac-toe and checkers, poker involves luck, betting, and bluffing, factors that make it impossible to find a strategy that guarantees a win or a draw on every hand. Printable Instruction Sheet for a Tic Tac Toe Game: My friends over at Simply Shoe Boxes made a printable instruction sheet to pack with your tic tac toe game – which makes it perfect to include in overseas gifts where some might never have played before. She uses 2 different color Poker Chips as her markers! CLICK HERE for the instructions. Tic Tac Toe is a two-player game in which the objective is to take turns and mark the correct spaces in a 3x3 (or larger) grid. Think on your feet but also be careful, as the first player who places three of their marks in a horizontal, vertical or diagonal row wins the game!

The table below includes both links to the pages of the book at atariarchives.org, and the source code for each game. I obtained most of the source code from classicbasicgames.org, with the exception of Civil War and Super Star Trek, which I entered myself. The descriptions mainly come from an earlier edition of the book, 101 BASIC Computer Games, via the scans at digibarn.com. All book content is provided with the express consent of David H. Ahl, editor.

You can download the entire set of games as a tarball (bcg.tar.gz) or a ZIP archive (bcg.zip).

On This Page

Introduction

Tic Tac Toe is a casino game based on the actual game by the same name. A reader told me he saw it at Coushatta Casino Resort in Kinder, LA. There are three bets available: X, O, and a tie. Cards marked X or O are drawn randomly on a tic tac toe board to determine the winning outcome.

Rules

  1. The game utilizes four 52-card decks. Each deck consists of 26 cards marked X and 26 cards marked O.
  2. Cards are drawn from the shoe and placed on the 9 squares of the tic tac toe board. Cards are placed until there is a winner (X or O with three in a row), or each square on the board is covered, whichever happens first.
  3. A winning bet on X or O shall pay even money. In the event of a tie, bets on X or O shall lose half.
  4. A winning bet on a tie shall pay 14 to 1.

Analysis

The following table shows the probability of 0 to 9 X cards, and the probability of a tie given that number of Xs. The first column is the number of Xs out of 9. The second column is the probability of the given number of Xs on the card. The third column is the conditional probability of a tie, given the number of Xs for that row. The fourth column is the product of the second and third column. The lower right cell shows the probability of a tie is 6.3735%.

Tie Probability in Tic Tac Toe — Four Decks

Number XsProbabilityConditional Probability of a TieProduct
00.00163100
10.01589800
20.06752600
30.16399100
40.2509550.1269840.031867
50.2509550.1269840.031867
60.16399100
70.06752600
80.01589800
90.00163100
Total1.0000000.063735

If there are 4 Xs and 5 Os, then there are combin(9,4)=126 ways to place the Xs and Os on the board. Of those 126, 16 result in a tie. The image below shows the three tie patterns, and the number of ways each can be rotated or reflected. So the probability of a tie, given 4 or 5 Xs, is 16/126 = 12.70%.

Once it can be accepted that the probability of a tie is 6.3735%, the rest is easy. The probability that there is not a tie is 100%-6.3735% = 93.6265%. The probability of X or O winning is each half of that, or 46.8133%.

The following table shows the probability and contribution to the return of each outcome of the X and O bets. The lower right cell shows a house edge of 3.19%.

X/O Bet Return — Four Decks

EventProbabilityPaysReturn
Win0.46813310.468133
Tie0.063735-0.5-0.031867
Loss0.468133-1-0.468133
Total1.000000-0.031867

The following table shows the probability and contribution to the return of each outcome of the Tie bet. The lower right cell shows a house edge of 4.40%.

Tie Bet Return — Four Decks

EventProbabilityPaysReturn
Win0.063735140.892286
Loss0.936265-1-0.936265
Total1.000000-0.043980

The final table shows the house edge of each bet for 4 to 8 decks, assuming no other rule changes.

House Edge — 4-8 Decks

Poker

Tic Tac Toe Poker Game

DecksX/OTie
43.19%4.40%
53.17%4.78%
63.17%5.03%
73.16%5.20%
83.16%5.34%

How To Play Tic Tac Toe Poker

Written by:Michael Shackleford