Live data from Hacker News

Planner programming blows my mind

hillelwayne.com

61–70 of 75 posts

Re: Planner programming blows my mind

#61
This approach to programming is not all new to me (I studied Prolog at university which looks very similar but does not have the planner feature) but the planner is a very elegant and simple way of solving problems.

The comments about video game at the end of the article makes me wonder: the planner feature allows solving problems very easily by writing few lines of clear code. However, how does the performance compares against an algorithm written in imperative programming?

Picat seems to be fairly efficient compared to similar languages [1] but I don't find a comparison against "standard" languages.

[1]: https://arxiv.org/abs/1405.2538

Re: Planner programming blows my mind

#62
post #3

I've actually used Picat's planning mode at work! I prototyped a system to orchestrate maintenance on fleets of devices. The idea was that, rather than telling the system how to do it (e.g. workflows to roll out an update), you'd tell the system what you wanted (e.g. up to date machines), what actions were available (e.g. pull a machine from rotation, apply an update), and what constraints to obey (e.g. X of Y machin…

There are plenty of commercial solvers out there that beat the pants off the open source options in terms of performance and in terms of depleting one's wallet :) CPLEX, Xpress, GUROBI, and Hexaly all come to mind. Hexaly is really good for scheduling problems and things like vehicle routing. You typically access these via an API they offer you for the popular industry languages. This approach seems to make a lot mor…

Thanks so much for sharing these. I had no idea that there were commercial API offerings for this kind of stuff. Just never worked for a business that had this sort of need.

I will definitely bookmark them for the future.

Re: Planner programming blows my mind

#63
post #35

Earlier quoted context omitted.

I just hate it when you go to the pricing page and theres NO PRICING. None.

A lot of these companies started out with listed pricing and then grew and got crazy expensive. One of the nice things about the Mosek solver is that the price is listed and it is reasonable. I just dislike their API and documentation as it's written for mathematicians and not business SMEs.

> their API and documentation as it's written for mathematicians and not business SMEs

I've never worked with any of these, but that's what I would expect as well. API documentation that describes how to solve each kind of mathematical optimization problem.

Do you have an example of an optimization solver with API documentation for business SMEs?

Re: Planner programming blows my mind

#65
post #12

I'm a little confused about how planning is different from vector reachability, which, from what I understand, has Ackermann complexity rather than EXPTIME. Can anyone help me out with the constraints on "planning" that allow it to be solved in a sane amount of time? https://www.quantamagazine.org/an-easy-sounding-problem-yiel...

General planning is undecidable; you can pretty easily encode a Turing machine as actions and make the goal state `Halt`.

Re: Planner programming blows my mind

#67
post #31

Really hating the trend of putting half of the document behind series of “click here to unhide the content” dropdowns.

Funny, I actually appreciated that. I only wanted broad strokes and didn’t want to dig into detail, so having the explanation hidden made it easier for me to read.

Seems that a "expand all" button would be a good compromise.

Re: Planner programming blows my mind

#69

Earlier quoted context omitted.

A lot of these companies started out with listed pricing and then grew and got crazy expensive. One of the nice things about the Mosek solver is that the price is listed and it is reasonable. I just dislike their API and documentation as it's written for mathematicians and not business SMEs.

> their API and documentation as it's written for mathematicians and not business SMEs I've never worked with any of these, but that's what I would expect as well. API documentation that describes how to solve each kind of mathematical optimization problem. Do you have an example of an optimization solver with API documentation for business SMEs?

Yeah. GUROBI makes it really easy to just do something like

m.addConstr(x+yWhere m is a model object, x & y are decision variables and limit is a constant.

The above is a no brainer for any business expert. Some solvers are a LOT more low level though and you have to think of the problem in matrix form and specify row/column stuff and it's a lot more involved and assumes significantly more knowledge of the user than the former.

Re: Planner programming blows my mind

#70
post #33

Earlier quoted context omitted.

I found Optaplanner to be nice, but supremely unergonomic to use. I could replicate their example problems and not much else. > All OptaPlanner features are part of Community Edition, except for Multithreaded Solving Of course, because why not. If you can take features away from an existing thing to make more money.

Could you elaborate on how OptaPlanner/Timefold wasn't ergonomic? I 'd love to understand this better, so we can improve it in Timefold Community. To help deal with new problems, we're creating out-of-the-box quickstarts for common use cases: https://github.com/TimefoldAI/timefold-quickstarts As for the Community/Enterprise split - we want to continue the open source project, but we need to eat too :) Geoffrey (Timef…

Basically, the documentation was set up so that I could come in and do a bunch of the example problems fairly easily, but the part where I model my own problem and execute/solve that was always underserved. Or it felt like that to me anyway. I don’t have a background in the theory, but I can easily see that it could solve my problems if only I could figure it out.

> As for the Community/Enterprise split - we want to continue the open source project, but we need to eat too :)

Yeah, I don’t begrudge you that. It’s just that when I see that multithreading is locked away I just know that the moment I start using the product I’ll find out my toy problems are enterprise scale. Sort of like murpheys law, but for software features.

Post reply on HN