An implementation of Penney's Game in Javascript; an example of a non-transitive game. You can play the game online at https://danq.me/penney/.
This is an example of a non-transitive game. The player calls three consecutive coin flips (e.g. Heads, Tails, Tails) and then the computer does the same (e.g. Heads, Heads, Tails, in this case). A coin is repeatedly flipped, and the winner is the player whose sequence comes up first. The computer will generally win more often than it loses, because of the nature of the game.
Read more about the game on its Wikipedia article: https://en.wikipedia.org/wiki/Penney's_game
The author's blog post about this game (and other non-transitive games): https://danq.me/2013/03/23/non-transitive-games/