Planning and Entropic Forces

The Foundation series is a classic science fiction series by Isaac Asimov. In it Harry Seldon, a scientist of the fictional field of psychohistory, predicts the collapse of the galactic empire by modeling the future of humanity with entropic forces. Seldon devises a plan to ensure the best future for humanity after the collapse. He forecasts a thousand years of future, then sets up a series of actions in motion to ensure humanity is able to go down a highly unlikely specific path and end up at the desired future.

I think he got it wrong.

By focusing on one path, Seldon limits the potential good futures to one very unlikely path. Spoiler: guess how that worked out. Despite understanding how entropic forces made the end of the empire all-but-inevitable, he never turns this idea to humanity’s advantage. He should have taken actions that maximized the potential future paths with desirable states.

What does this mean?

The more ways a plan has of succeeding, the more robust it is. Robust plans don’t fail at the first unforeseen challenge. Consider an example from technology – database redundancy. If everything is stored in one database and the database goes down, the entire system stops working. However, if there are three copies of the database (far enough away that failures are independent) then the likelihood of the entire system going down are minuscule. As we increase system redundancy, the entropy of a state where all systems are failing approaches zero, and the entropy of states we want grows without bound.

(In this situation there are practical redundancy limits, and the best practice is usually to go for at least two more than the number of databases for the system to run under the heaviest expected load. It may be interesting to explore the math later …)

How do I use this in planning?

Have more than one path towards what you consider “success”. Suppose your goal is to work in position X at Company Y. Naively, your path forward is to apply for position X. You have some probability of getting the position, and you either get it or you don’t.

There are more paths than these.

What are other paths that accomplish your needs? Do you need the position right now or can it wait a year? Does it need to be that position at that company, or are there similar opportunities at the same (or at similar) companies? Is it acceptable to apply, fail and get feedback, then try again? Is there, perhaps, an intermediary stepping-stone job? A degree that might increase your chances? A meetup group where you might run into employees who could refer you?

The answers to all of these depends on your constraints – your requirements. If you want one specific future then you really only have one option and entropic forces will (statistically) work against you. If more than one future – or more than one path – is acceptable, then you can use them in your favor. In general the more paths and the more likely you make the success of the paths, the higher the entropy of desired futures is.

But what does that look like?

I recently switched jobs. I decided I wasn’t happy on my current team and I needed a change. There wasn’t anything urgently wrong, so I was fine with waiting up to a year. After thinking about the sorts of changes I wanted, I realized there were three main categories of futures I would consider a success:

  1. finding a team I would be more happy with at my current company,
  2. finding a new company I would be more happy at, or
  3. going back to school for a graduate degree.

I added constraints to each future. For example, there are companies with cultures I would never want to work at. I wanted to stay in the Bay Area, so that limited both schools and companies I could look into.

Then, I broke each general future into a general sequence of tasks required to make that future happen and ones that would make the future more likely. Required tasks generally fit into two groups: ones that cut off my ability to pursue other paths (e.g. accepting a job offer) and ones that moved the path along while changing (usually reducing) the likelihood of the others (e.g. doing an onsite interview). While the required tasks varied greatly, the optional tasks presented a lot of overlap in the futures: networking, studying, and understanding my desired team qualities were common to all three.

By doing the tasks that made all of the successful futures more likely, I increased the entropy of futures where I succeeded in my goal. My plans were robust in that there was no single point of failure that could topple them – there were more companies to apply to, many possible teams, and if those didn’t work out in a year then I also had applications for school in the works. Throughout it all, I would be gradually improving the likelihood of each subsequent attempt.

Briefly, these are the steps this approach suggests:

  1. What futures do you consider successful?
  2. What are your constraints on these futures?
  3. What increases the likelihood of each future?
  4. What are common actions that increase the likelihood of multiple futures?
  5. In general do as much towards the common actions as your constraints allow, and do specific actions as necessary.

Healing Through Cooking

Life sucks. I’m going to use cooking to make it better.

Long story short, I’m living out of a coworker’s house for the week. I’ve just experienced the worst two weeks of my life. They’re finally over, and I need to heal. Cooking is going to be part of that.

For my birthday, I bought myself a copy of Alton Brown’s new cookbook, Everyday Cook. Over the weekend I sat down in coffee shops and planned stuff to make this week. Most importantly: Bad Day Bitter Martini.

The hardest part of the Bad Day Bitter Martini was crushing the ice. After folding the ice in a clean towel as directed, I smashed the ice between two cutting boards.

Obviously, I made the strong version so I didn’t need no fancy Boston-style cocktail shaker. I’m not really a fan of bitter alcoholic drinks. I’m a sweet and fruity kinda guy. Basically, if it’s bright pink and basically candy, I’m in. I was pleasantly surprised that this simple drink was quite delicious. Normally bitter drinks make the back of my throat involuntarily contract as if it’s afraid to let anything else down. This … didn’t. I can tell the aroma of the grapefruit peel played a big role in this, but what’s doubly odd is that I really don’t like grapefruit. Somehow the bitter-sweet of the Amaro and the bitter-sour of the grapefruit balanced to make something palatable to me.

Unfortunately, my host’s wife has gone to bed, so it’s too late for me to make another (crushing ice is loud).

Why I make procedural art

It’s like writing. It’s a way of communicating ideas. I use procedural art to understand the world, what it looks like, and how it is put together. Procedural art is a way of describing this world. It’s a completely unambiguous description what I mean. When I understand the tool I’m using well enough, there’s this giddy freedom given by the ability to express anything (given enough time).

EquationNotebook.pngI don’t look at the world and see formulas that describe things. It’s like I see things and can’t resist taking them apart in my head. Not necessarily piece-by-piece like legos. Imagine looking at a wooden chair. Think of each piece independently – the pieces of wood brought together to make its form. Now separate the shape of one of the chair legs from the texture of the wood. We can go further. The shape is most precisely describable as the mathematical objects that could be used to create it – the one in my mind is an inverted truncated pyramid with rounded beveled edges. Roughly, this means that the chair leg has a square base that is slightly smaller than the top and has smoothed corners. This can be further generalized, but not indefinitely (not in any way I find satisfying, at least). Eventually I’m left with a set of parameters (chair leg height, how rounded the corners are, …) and functions (rounded bevel, pyramid, …). The same reductionist procedure can be applied to the texture of the chair leg, with analogous results. In some sense, it really is just legos.

beveled-tile.pngI can see why Plato was so fixated on his idea of Forms. He thought that everything in the natural world was a projection of idealized, abstract Forms. For instance, that the abstraction of a “table” meaningfully exists outside the minds of sentient beings and everything we call “table” has some connection to it. While it misunderstands the nature of reality, it does a great job at representing reality. If I can reduce a given object into forms I can mathematically describe, then I can not only recreate that object but myriad variations with the same essence. When I develop a brick texture I don’t just want to make one brick, I want to make every brick. How alluring the idea is that these equations are “more real” than any one instance they take.

StreetBricks2.pngI’ve been away from procedural art for some time. Diving back in was … refreshing. Like writing after a day spent reading. Since my main fascination is with photorealistic procedural textures, it’s like everything I see is a page waiting to be read. Some, like bricks, are simple and easy to read (any introductory procedural texture text will devote at least a chapter to bricks). Others are much harder – I lack the vocabulary and grammar – but will get easier to decipher with time.

My old tools are still there, much improved but with the same flavor. I mainly use a program called Vue. Partly because it’s the one my parents happened to buy me ten years ago, but mostly because it now supports Python scripting and function graph refactoring. My math degree and my professional knowledge will come in handy.

It’s nice to be back.

Design Patterns and Cybernetics

I want to start practicing implementing existing design patterns from the Gang of Four’s Design Patterns. Per Robert C. Martin’s suggestion in Clean Coder, I should achieve mastery of these if I want to be a professional.

I’ve used design patterns in my work, but I wouldn’t in any way say I’ve mastered them. I want to create a set of code kata, one for each design pattern from Design Patterns. Before I do so, I’d like to point out how design patterns and cybernetics are intertwined.
Continue reading

The Woes of Changing Data Sources

Turns out, it isn’t a great idea to collect data on bus routes when you aren’t already on the optimal route. In the afternoon a bus that gets me 2 miles from where I live, and it gets me there 30 minutes earlier than the route I was taking before. There are no intermediate stops between Google and my drop-off (just like my morning commute). I could collect data and do statistics on my bus route, but this isn’t a compelling enough problem for me to remember to take down the data. Both bus routes have no stops between being my pickup and drop-off, so the problem would be just using departure time as a predictor of arrival time.

I’ll be on the lookout for something else I can collect data on. I’m certain that as I do this more finding things to take data on will become easier.