Skip to content

Commit

Permalink
Day 12 golfing part 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfoad committed Dec 12, 2018
1 parent af20451 commit fd1e99f
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
Expand Up @@ -4,5 +4,5 @@ u←5↑¨2↓p ⋄ v←⊃∘⌽¨2↓p ⍝ 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
(g t)+((g f t)-g t)×50E9-0.25×(t)-s part 2
zg tf{/(-1)¨}s iterate until pattern stabilises
z+(z-g f t)ׯ50E9+4÷(t)-s part 2

0 comments on commit fd1e99f

Please sign in to comment.