Skip to content

Commit

Permalink
Day 12 shorter.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfoad committed Dec 12, 2018
1 parent bdbd946 commit af20451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions p12.dyalog
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
⎕IO0 ⎕PP17
s15p'#'=⎕NGET'p12.txt'1 initial state
u5¨2p v¨2p patterns and replacements
f{v[u0 ¯1(5,5+)0 0 0 0,]} next generation
u5¨2p v¨2p patterns and replacements
f{v[u5,/4,8/0]} next generation
g{+/()-0.5×()-s} score function
g f20s part 1
tf{/(-/)¨}s iterate until pattern stabilises
Expand Down

0 comments on commit af20451

Please sign in to comment.