Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rndmcnlly
rndmcnlly / Platformer Visualization.ipynb
Created May 2, 2017 06:09
Developing a simple PIL-based visualizer for platform level designs, starting from a JSON scene description file
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rndmcnlly
rndmcnlly / Grid Embedding.ipynb
Created May 7, 2017 21:24
Recreating the grid embedding tool from https://adamsmith.as/papers/fdg2012generation.pdf with Clingo-5
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rndmcnlly
rndmcnlly / README.md
Last active February 22, 2021 19:04
A search engine in a gist!

This gist implements a self-contained search engine for the VisualGenome scene corpus. The user interface is built from ipywidgets and presented with Voilà. The corpus is downloaded in the postBuild script so that fresh Binder sessions don't need to wait for this each time. Ideally even more pre-processing would be done here so that the interface gets to a responsive state faster.

launch binder

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rndmcnlly
rndmcnlly / sudoku.als
Created September 2, 2022 20:50
Sudoku solving in Alloy
sig Number {}
sig Group {contains: disj set Number} {
#contains = 3
}
one sig Board {
assign: Number -> Number -> one Number
} {
all n, x: Number | one assign.n & x -> Number
all n, y: Number | one assign.n & Number -> y
@rndmcnlly
rndmcnlly / interstellar.als
Created September 3, 2022 22:54
Alloy model of space trading simulation game
-- This a mostly-faithful translation of interstellar.lp from https://gist.github.com/rndmcnlly/cc801233012df3cb0883
-- Integer-indexed orbitals were dropped in favor of systems just having a set of planets because the order isn't interesting.
-- This first block of definitions defines the static configuration of the story world.
sig Commodity {}
private enum Equipment { Jumpdrive }
private enum Location { Orbit, Surface }
fun shuttleDestination: Location -> one Location { Orbit -> Surface + Surface -> Orbit }