Björn Lindqvist
  • Member for 8 years
  • Last seen more than a month ago
Build a deterministic Go AI
8 votes

Here is my entry to get this challenge off the ground. Python code: print "pass" According to your rules always playing "pass" is a valid (albeit bad) strategy.

View answer
Tell me how many math problems I have to do!
3 votes

Factor - 488 bytes: USING: arrays ascii kernel math math.parser math.ranges pcre sequences ; IN: examples.golf.homework : c ( a -- b ) >lower "(?:[,:]|^) *(\\d+) *(?:- *(\\d+) *(e|o)?)?&...

View answer
Write an interpreter for the untyped lambda calculus
2 votes

Python: 1266 characters (measured using wc) from collections import *;import re A,B,y,c=namedtuple('A',['l','r']),namedtuple('B',['i','b']),type,list.pop def ab(t):c(t,0);p=c(t,0);c(t,0);return B(p,...

View answer
Rotate An Integer Array with an O(n) algorithm
2 votes

Factor has a built-in type for rotatable arrays, <circular>, so this is actually a O(1) operation: : rotate ( circ n -- ) neg swap change-circular-start ; IN: 1 9 [a,b] <circular> ...

View answer
Meta regex golf
2 votes

My solution written in Factor: USING: formatting fry grouping kernel math math.combinatorics math.ranges pcre sequences sets ; IN: xkcd1313 : name-set ( str -- set ) "\\s"...

View answer
Write a compact spelling checker
1 votes

Factor - Bytes: 1342, False +ves: X, False -ves: 0 = Score: X USING: ascii base64 bit-arrays bloom-filters io kernel sequences system ; IN: examples.golf.wordcheck CONSTANT: S "...

View answer
Implement subset of shell script
1 votes

Factor (208 characters) Since the rules doesn't disallow offloading the work to a third party (http://www.compileonline.com/execute_bash_online.php), here is a solution: USING: arrays http.client io ...

View answer
Random Password Generator
1 votes

Factor, 196 characters Same algorithm as MvG and moose's. It is not the shortest but should satisfy all the (current) criteria in the question: USING: io kernel math pcre random sequences sequences....

View answer