Aug. 23rd, 2011

davv: The bluegreen quadruped. (Default)
I finally got a new camera (my old one doesn't work - I think light is getting into the system) and I've been fiddling with it, figuring out what all these new settings are. Did I mention the old one was all manual? So yes, I had a bit to catch up on.

Anyway, I took a picture of my kitty. Well, I took many, but I think one was particularly nice. Have a look at the little tiger!

What else have I been doing? I read something about a way of approximating optimal clustering, and then I promptly fell into a week-long coding hole trying to make a program to draw nation borders the way they would be if every nation had about the same population. In the process, I hacked Dijkstra's algorithm to work as a nearest-neighbor search over a huge space of points[1]. The idea is that I'd start with center points for every nation and then each nation would claim all the places that are closer to its center point than to any other nation's center point. But then I had to go and take travel distance into account... and you can see how I ended up seeing a week of time just disappear.

It turns out the map would look somewhat like this.

The most populous nation of the 192 has on the order of 45 million inhabitants, where the least has eighteen. Not exactly "equal population", but solving it optimally is hard... and this is still much more equal than in the real world.

I like what-ifs :) And I have to say it again, it's really easy to get lost in programming, because all that stands between you and the results is the code (and the mind required to make it). The computer is very fair - it does exactly what you ask, so you just have to find out how to ask what you want.

-

[1] If you're a certain dragon whose name starts in a K, feel free to ask about the details if you're curious :)

March 2018

S M T W T F S
    123
45678910
1112131415 1617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 15th, 2026 12:20 am
Powered by Dreamwidth Studios