Skip to content

Instantly share code, notes, and snippets.

View helloandre's full-sized avatar

Andre Bluehs helloandre

View GitHub Profile

Keybase proof

I hereby claim:

  • I am helloandre on github.
  • I am helloandre (https://keybase.io/helloandre) on keybase.
  • I have a public key ASCsF93coLzbFsMqTjqD9BVFQjF76HUG8ySfJ-Ib4amwCgo

To claim this, I am signing this object:

@helloandre
helloandre / robot.js
Created December 3, 2012 21:49
pumpernickel
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.turn(rand_dist(180));
robot.ahead(rand_dist(100));
robot.rotateCannon(rand_dist(360));
};
@helloandre
helloandre / ga_hello.py
Created April 4, 2012 04:11
Genetic Hello World
import random, string
from operator import attrgetter
max_iters = 1024
start_pop = 4096
mutate_chance = .25
elite_chance = .10 # keep the top
elite = int(start_pop*elite_chance)
goal = "Hello, World!"
goal_len = len(goal)