Skip to content

Instantly share code, notes, and snippets.

View ChristopherKing42's full-sized avatar

Christopher King ChristopherKing42

  • Milky Way Galaxy
View GitHub Profile

This gives a proof of correctness of the algorithm at node_string.rs. Unless otherwise specified, lowercase letters are used for variables for single symbols and group generators, and uppercase letters are used for variables for strings and group elements. 1 is the empty string or the identity element of a group. X$Y means every symbol of A commutes with every symbol of B (as group generators).

Let G be a right-angled coxeter group over the set of generators S. This just means that G is a group presented by aa = 1 for each a in S and any set of equations of the form ab = ba (or equivalently abab = 1) for a ≠ b. In addition, there is a linear order < over S.

The algorithm rewrites strings of the form Xa into a canonical form, assuming X is already in

@ChristopherKing42
ChristopherKing42 / HyperRogue_community_quotes.md
Last active January 6, 2021 03:05
Insane HyperRogue Community Quotes

Note: Links were not in the original, but added to help the reader

  • I want every possible Turing machine running in H2xE in an arrangement that allows me to always navigate to the desired Turing machine. (The 3rd dimension is for the tape).

    - bengineer8

  • I'm surprised by how rare the googol mutant ivy kills achievement is

- Lily

CHRISTOPHER:
Thou art denceis, and the speak
Hos most every and these for his blest constort thee army
As I do many of the seavers,
That an the manst hould have a ther cause
That the world and more than dones,
The gons, I bet my wears in the every litte.
TALBOT:
These thing is and the morses of men with all their martis with
from opensimplex import OpenSimplex
from PIL import Image
import random
from heapq import *
mtns = OpenSimplex(seed = random.getrandbits(32))
hills = OpenSimplex(seed = random.getrandbits(32))
bumps = OpenSimplex(seed = random.getrandbits(32))
def terrain((x,y)):
import Data.Array
import qualified Data.Set as S
import Text.Printf
newtype Puzzle = Puzzle (Array (Int,Int) Int) deriving (Eq, Ord)
instance Show Puzzle where
show (Puzzle arr) = unlines [concat [printf "%02d " $ arr ! (x,y) | y <- [0..3]] | x <- [0..3]]
blank = 0
win = Puzzle $ listArray ((0,0),(3,3)) $ [1..15] ++ [0]
@ChristopherKing42
ChristopherKing42 / GitCoin
Last active April 5, 2018 23:11
A new "cryptocurrency"
/u/TheKing01: 25 git coins
/u/Chiron1991: 10 git coins
/u/polypeptide147: 10 git coins
/u/benderjacob: 5 git coins
sides = 7
order = 3
F.<rotate,move> = FreeGroup(2)
G = F/[rotate**sides, move**2, (rotate*move)**order]
k = G.rewriting_system()
k.make_confluent()
print k
print [(x.Tietze(), y.Tietze()) for x,y in k.rules().items()]
move = False
rotate = True
def hyperbolicTiling(n_sides, n_order):
assert 1/2 + 1/n_sides + 1/n_order < 1
class tiling(object):
sides = n_sides
order = n_order
def __init__(self, cell = ()):
# -*- coding: utf-8 -*-
import random
born = [3,6,7,8]
die = [0,1,2,5]
size = 30
def neighbors((x,y),g):
{-# LANGUAGE Rank2Types, FunctionalDependencies, FlexibleInstances #-}
import Control.Monad (liftM, ap)
import qualified Data.Set as S
newtype SM a = SM {fromSM :: forall r. SetM a r => r}
class SetM a r | r -> a where
{-Instances of 'SetM' must satisfy the following laws:
* @'fromSet' s = 'fromList' $ 'Data.Set.toList' s@