Skip to content

Instantly share code, notes, and snippets.

View lifedispenser's full-sized avatar

Spencer Ying lifedispenser

View GitHub Profile
@lifedispenser
lifedispenser / setOps.js
Created July 29, 2016 18:58 — forked from jabney/setOps.js
Fast JavaScript set operations: union, intersection, difference, complement, and equals. Includes support for objects.
// setOps.js MIT License © 2014 James Abney http://github.com/jabney
// Set operations union, intersection, symmetric difference,
// relative complement, equals. Set operations are fast.
(function(so) {
'use strict';
var uidList = [], uid;
// Create and push the uid identity method.
/**
* Copy paste in the console, then restart the game (space bar)
*
* Greedy Algorithm for : http://gabrielecirulli.github.io/2048/
* Plays the game using a naive greedy method. i.e. Local maximum
*
* Azaan
*
* ---
* Added Simple Heuristics to the algorithm. Tuning ftw! And... it won!