Thursday, April 12, 2012

Ever wondered how many possible games of Tic-Tac-Toe there are?

Well, probably you haven't. But, I'm that kind of geek. And, it's a game with simple rules, so I've long thought it should be a simple thing to write a program to figure it out.

Well, I did just that a few nights ago. Here's (part of) its output:


 | |  
-+-+- 
 | |  
-+-+- 
 | |  
      
1 game states

X| |   |X|   | |  
-+-+- -+-+- -+-+- 
 | |   | |   |X|  
-+-+- -+-+- -+-+- 
 | |   | |   | |  
                  
3 game states

{...}
(it get's more interesting really quickly; after the 6th move, there are 204 game states, not counting states that are reflections or rotations of another game state). Here is the python source code, along with the full output showing all game states possible, without duplication by rotation or reflection. Enjoy!

Thursday, April 5, 2012

It *was* real. For a time.

Some folks said it was just an April Fool's joke, so when I logged-in to Google Maps and found that they really *did* have an 8-bit "adventure" map, I was thrilled. What a fun idea!

Alas, they were right. It was an April Fool's joke, just not the way I understood that to mean. They've taken it away, and now I'm sad. But, for reasons that aren't apparent to me, I did make a screenshot of it while it was there.

This map covers most or all of Salt Lake county, and bits of neighboring counties. The main north-south highway, just to the east of center, is Interstate 15, and the major east-west highway is Interstate 80. The large blue swatch to the north is the Great Salt Lake.

It was fun while it lasted. *sniff*.