4 ms·
That reminds me of something else with regex which I thought was extremely clever: implementing an A* search: http://realgl.blogspot.com/2013/08/battlecode.html
by userbinator 11y ago
That reminds me of something else with regex which I thought was extremely clever: implementing an A* search: http://realgl.blogspot.com/2013/08/battlecode.html http://realgl.blogspot.com/2013/08/battlecode.html
- kragen 11y agothat is a very nice hack. this kind of 'do as much work per standard library call as you can' approach is pretty much the way to go in interpreted languages like python or octave, which is in part why numpy is so popular — not only does it allow you to program at a higher level of abstraction, it also makes your program run more efficiently. however, i think that technically, that's not an A* search he implemented, just a breadth-first search. i'm not an expert (i've never even implemented A* search), so i could be mistaken. i'm interested to hear whether other people agree.