Skip to content

Instantly share code, notes, and snippets.

View Vaguery's full-sized avatar

Bill Tozier Vaguery

View GitHub Profile
@Vaguery
Vaguery / fizzbuzz_3.txt
Created February 19, 2018 00:48
Trace of a new evolved fizz buzz program in Push with input 3333
clojush.core=> (run-push my-program start-state true)
State after 0 steps:
;; program in :exec
:exec = ((in1 integer_dup in1 integer_stackdepth integer_mod in1 in1 "fizz" integer_stackdepth integer_mod integer_mult integer_mult exec_dup_times string_rest integer_dup integer_stackdepth in1 integer_stackdepth integer_mod exec_dup_times exec_y integer_mod integer_div exec_dup_times "buzz" "buzz" string_concat))
:integer = nil
:boolean = nil
:char = nil
:string = nil
:input = (3333)
@Vaguery
Vaguery / fizzbuzz_2.txt
Created February 16, 2018 18:23
Trace of an evolved FizzBuzz program in Push, with input = 14
clojush.core=> (run-push my-program start-state true)
State after 0 steps:
;; program is on :exec
:exec = ((exec_stackdepth integer_mod exec_s string_swap in1 integer_mult exec_stackdepth integer_mod "fizz" exec_do*range (string_parse_to_chars string_rest "fizz" string_shove) in1 boolean_xor exec_swap (string_dup "buzz" string_concat exec_stackdepth integer_mod string_empty boolean_dup string_shove boolean_and) false))
:integer = nil
:boolean = nil
:string = nil
:input = (14)
@Vaguery
Vaguery / fizzbuzz_1.txt
Created February 16, 2018 17:43
Trace of an evolved FizzBuzz program in Push
clojush.core=> (run-push my-program start-state true)
State after 0 steps:
;; program is pushed onto :exec; input is set to 15
:exec = ((exec_stackdepth integer_mod exec_s string_swap in1 integer_mult exec_stackdepth integer_mod "fizz" exec_do*range (string_parse_to_chars string_rest "fizz" string_shove) in1 boolean_xor exec_swap (string_dup "buzz" string_concat exec_stackdepth integer_mod string_empty boolean_dup string_shove boolean_and) false))
:integer = nil
:boolean = nil
:string = nil
:input = (15)

Keynote speakers, Genetic Programming Theory & Practice

speakers missing information:

  • John E Laird (SOAR)
  • Greg Hornby
  • Hod Lipson (?)
  • Theresa Kotanchek
  • Chris Adami (?)
  • Julian Togelius
@Vaguery
Vaguery / 3x3-lattice-possibilities.csv
Last active June 24, 2017 14:19
Some data collected by enumerating 3x3 lattice labelings, for subsets of Manhattan distances
1 120960 {[:x2, :x5]=>1}
1 141120 {[:x2, :x8]=>2}
1 120960 {[:x3, :x4]=>1}
1 80640 {[:x2, :x7]=>3}
1 141120 {[:x0, :x2]=>2}
1 141120 {[:x1, :x7]=>2}
1 80640 {[:x3, :x8]=>3}
1 80640 {[:x5, :x6]=>3}
1 141120 {[:x0, :x6]=>2}
1 120960 {[:x3, :x6]=>1}
@Vaguery
Vaguery / lattice_enumerator.rb
Last active November 16, 2017 20:56
Imperative code to investigate constraint satisfaction
@varnames = (0...9).collect {|i| "x#{i}".intern}
def manhattan_distance(p1,p2)
(p1[0]-p2[0]).abs + (p1[1]-p2[1]).abs
end
def assignment_from_permutation(permutation,pos)
h = Hash.new
permutation.each_with_index do |i,idx|
h[@varnames[i]] = pos[idx]
@Vaguery
Vaguery / ssh-commands.txt
Created April 30, 2017 15:43
Reproducing the Java/ARMv8 `Math/log` bug
# intended to be run on an ARMv8 machine at packet.net
apt-get update
apt-get install default-jre
apt-get install wget
wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
chmod +x lein
mv lein /usr/local/bin
lein repl
# hit ENTER to get past root login warning
@Vaguery
Vaguery / klapaucius-image.txt
Last active April 30, 2017 15:33
Building a clojure dev machine on a pristine Ubuntu 16.04 Docker image
# bash
apt-get update
# updates package list
apt-get install default-jre
apt-get install git
apt-get install wget
# oh yeah I need that too
{:user {:deploy-repositories [["clojars" {:url "https://clojars.org/repo"
:creds {:username "USERNAME" :password "PASSWORD"}
:sign-releases false}]]}}
@Vaguery
Vaguery / benchmarking-in-repo.clj
Last active April 7, 2017 00:06
Using criterium to benchmark every fact in a midge-tested repo
;; lein repl
(use 'midje.repl)
(load-facts 'push.type.*)
(use 'criterium.core)
(defn benchmark-fact
[fact]
(println "\n\n")
(println (:midje/namespace (meta fact)))
(println (:midje/file (meta fact)))
(println (:midje/description (meta fact)))