Skip to content

Instantly share code, notes, and snippets.

@stackdump
Last active December 11, 2017 21:07
Show Gist options
  • Save stackdump/a5965b683730933ded5f96a392fd0cee to your computer and use it in GitHub Desktop.
Save stackdump/a5965b683730933ded5f96a392fd0cee to your computer and use it in GitHub Desktop.

Explaining Tic-Tac-Toe using Entropy

  • The state space of a game is 9!
  • there are 9 moves per game
  • on average there are 5 degrees of freedom for any given move
  • on average there are 4 previous actions before the 'current turn'

Defining the Board

We can define a board as membership in any of 7 sets:

1 set == The empty Set 3 sets for row membership (A, B, C) 3 sets for column membership (D, E, F)

Defining the gamepiece

A gamepiece is composed of 2 elements: Location and State

Location is defined as the gamepiece being a member of 1 row and 1 column set or the empty set.

State is represented as a membership in a set describing all places containing an 'X' or an 'O'.

Defining Game Branching

Gameplay can be modeled using a branching tree notation.

We can model past moves as:

3^4 # entropy of move history

We can model the X/O alternating game 'choice' (when playing as a single player game):

2^5

Conclusion

By combining all these factors we have shown that the defined set memberships must be correct.

This can be directly applied to Type theory as a means of demonstrating that a given type model correctly describes some target problem set.

9! = 3^4 * 2^5 * 2 * 2 * 5 * 7
@stackdump
Copy link
Author

stackdump commented Dec 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment