4 ms·
Well, this is where we really get to the "low effort/high impact" philosophy: The bots don't look for circles. That's too hard/I'm too lazy. So they do somethin
by jjwiseman 6y ago
Well, this is where we really get to the "low effort/high impact" philosophy: The bots don't look for circles. That's too hard/I'm too lazy. So they do something much easier, and generally better: They look for a net change in heading equal to 4*360 degrees.
(defn curviness
"Computes the total curvature of a sequence of headings."
^double [headings]
(Math/abs
^double (reduce (fn [^double sum [^double a ^double b]]
(let [d (heading-diff a b)]
(if (spurious-heading-diff d)
sum
(+ sum d))))
0.0
(partition 2 1 headings))))
This is what allows the bots to find interesting activities I didn't think of ahead of time.