Production graph search

Started by
11 comments, last by comfy chair 11 years, 5 months ago

Anything that converges on a solution rather than trying to build one from scratch is a good bet.

Also, when the user changes an order to 3 instead of 2 products, it would be really nice if the computer could continue where it left off with the previous solution instead of starting over, and thereby save tons of computation. This would give real-time responsiveness and make the game a lot more fun.
MCTS seems to have this ability.
Advertisement

Combine solving the traveling salesman problem with the knapsack problem and you have two NP-hard problems -- at the same time. Don't be fixated on getting "the right answer". You won't. However, you can get something that is reasonable.


Do we know that traveling salesman and/or knapsack can be reduced to the poster's problem? I don't think we've established that the problem is NP-hard. In fact, I don't think we've committed to a particular problem statement at all.

Also: For a very long time, I have been inclined to dismiss NP-hard problems as unsolvable and move directly to heuristics or stochastic search (my current favorite is the cross-entropy method). But there is a middle ground: Many np-hard problems can be solved to within "epsilon" in polynomial time -- and some algorithms that can have exponential complexity practically never do (e.g., simplex algorithm). I'm developing a newfound respect for the Operations Research guys.


The linear programming approach looks suitable for this problem. I don't have much experience with LP though. I hope you will post again if you think of more.
With this solution, will it be possible to present the user with a production plan for each of his orders, that he can inspect (and possibly cancel)?
The production plan would be: "Produce x items a, y items b" and so on.


Sure, that's what's the flows represent. If you were to cancel production partway through, you'd be left with whatever quantities flow into the nodes corresponding to that timestep.

Let me play with this a little and see what I can do.


Also, when the user changes an order to 3 instead of 2 products, it would be really nice if the computer could continue where it left off with the previous solution instead of starting over, and thereby save tons of computation. This would give real-time responsiveness and make the game a lot more fun.


You can "warm start" most solvers with an old solution to a similar problem.

In fact, I don't think we've committed to a particular problem statement at all.

Now that you mention it, there are some additional features that I would really like to have in this game system.

The first is choice between inputs.[s] Instead of requiring "2 of a", I would like to see "2 of a" OR "2 of b". This opens the door to a lot of realistic simulation of assembly processes.
Perhaps this requirement could be fulfilled by just adding more processes, I don't know.[/s]
On second thought, I think I will implement this as separate processes, but give the designer some shorthand tags to make it easier for him to make alternative processes.

The second is a quality level computed on each item. Each process would contain a formula that calculated the value of properties on its output(s), from the properties of its inputs.
The optimizer would then try to optimize for speed, quality, or a balance between the two.

This topic is closed to new replies.

Advertisement