3 ms·
If I’m working on a specific algorithm, I’ll drill it. Setup a test rig and test my assumptions. I’m often wrong about a lot of things, and playing around with
by mailslot 7y ago
If I’m working on a specific algorithm, I’ll drill it. Setup a test rig and test my assumptions. I’m often wrong about a lot of things, and playing around with something in isolation is great practice.
For example, when learning ant colony optimization, I started with a naive approach. Then I tried to see if I could estimate an ideal termination condition. Then, researched known methods and refined my approach. Then looked at ways to optimize, refactor, specialize for different use cases. The hours I spent would be considered excessive to some, but far more effective than writing something that works and moving on.
As a result, I’ve used ACOs to model NPC swarm behavior for ground troops that respect mutual collisions, multiple openings, and group behavior that looks very convincing with minimal computation cost. It never would have occurred to me if I only saw it as a graph path optimization technique. I can also with an ACO from memory.
I do similar things when learning new languages. Start with something and focus on interactively refactoring it to be as idiomatic to the language as possible. For hybrid languages like Scala & Ocaml, I try different approaches and try to solve in as many ways as possible.