Hacker News new | ask | show | jobs
by progn 4893 days ago
Optimization problems like that are fascinating. We can treat them generically without having to teach our program about the specific problem it's trying to solve. All we have to do is come up with proposed solutions and pare them down.

For starters, we need a "cost function" so we can see which solutions are better than others. That's the easy part: render the model on 3D hardware, lighting it with a distant point light source. The "cost" (the value we're trying to minimize) is 1 - Σ(face_brightness); modern hardware can easily handle precise geometric shadowing using a stencil buffer or similar well-known technique. Handle the thermal constraints by setting the "cost" to 1 when the space station disintegrates.

Now we just need to find some ways of coming up with proposed solutions and pruning all but the best solutions. This problem has path dependencies, so we can't just apply a greedy algorithm. That is, solar panel actuators take time to move, so the best solution for time [T_1, T_3] isn't necessarily the concatenations of the best individual solutions for intervals [T_1, T_2] and [T2, T_3].

What you're left with is actually a graph search problem, where our graph nodes are actuator inputs at specific (quantized) times; I feel like something like the veneralbe A* algorihm would be a good place to start looking for paths through this graph.

1 comments

A good solution should also minimise movement, to conserve energy and reduce mechanical wear. And part of the orbit is in darkness - the criteria would be different there (not optimising illumination, but needing to be ready for the return to daylight).