Live data from Hacker News

Linear Programming in Python (2023)

slama.dev

11–20 of 56 posts

Re: Linear Programming in Python (2023)

#11
post #5

Fwiw, reinforcement learning offers objectively better optimization and more efficient inference than LP in many cases.

This is such a sweeping generalization with no context whatsoever, that it's really hard to say anything about this.

They're two different methodologies that are most of the time applied to vastly different problems.

Re: Linear Programming in Python (2023)

#12
Author here (and a long time HN lurker), really cool to see someone post this here :). As mentioned at the beginning, the article was created mostly as additional resources for my video about LP (https://www.youtube.com/watch?v=E72DWgKP_1Y), which I think is definitely worth a watch if you find this interesting!

Re: Linear Programming in Python (2023)

#14
post #9
post #7

Earlier quoted context omitted.

Any good examples or notebooks using RL to solve typical optimization problems?

I also am curious about this statement. If a problem becomes too complex for linear programming solutions, how easy is it to know that a reinforcement learning solution is actually a global optima and not just local?

> how easy is it to know that a reinforcement learning solution is actually a global optima and not just local?

If the problem is too complex for LP then you're probably not going to get a global optimal from RL either.

Re: Linear Programming in Python (2023)

#15
post #5

Fwiw, reinforcement learning offers objectively better optimization and more efficient inference than LP in many cases.

Citation needed.

RL makes sense when you don’t know the dynamics of the environment and have interactions with it.

Linear programming can be done when you can encode a problem as linear constraints which means you know the dynamics. You can then find the optimal set of points of the convex polyhedron defined by the constraints via interior point methods.

That’s it. You don’t need exploration and you can get an optimal solution to the constraints because the feasible space is convex.

Re: Linear Programming in Python (2023)

#16
post #14
post #9

Earlier quoted context omitted.

I also am curious about this statement. If a problem becomes too complex for linear programming solutions, how easy is it to know that a reinforcement learning solution is actually a global optima and not just local?

> how easy is it to know that a reinforcement learning solution is actually a global optima and not just local? If the problem is too complex for LP then you're probably not going to get a global optimal from RL either.

Fair enough. I'm not invested in LP or RL, but my background is in agriculture and LP forms the basis of a lot of cropping/feeding decision trees. I'd be curious to explore new techniques, but it sounds like the discussion here is for a different set of linear programming problems than the ones I see most often, and that there's likely a limited upside toward implementing RL.

Re: Linear Programming in Python (2023)

#17
post #5

Fwiw, reinforcement learning offers objectively better optimization and more efficient inference than LP in many cases.

Not only you provide no evidence, but also your statements are flat out wrong.

Not even the founding fathers of RL (Bertsekas et al) have made such claims.

RL almost always solves an approximation of the dynamic program. Aka no guarantees of consistent optimality.

RL does not guarantee constraint satisfaction.

RL needs tons of data to learn the state space and still is not enough. LPs solve nowadays Traveling salesman problems to optimality with millions of nodes. RL close to optimality for less than 1000 nodes.

Re: Linear Programming in Python (2023)

#18

Author here (and a long time HN lurker), really cool to see someone post this here :). As mentioned at the beginning, the article was created mostly as additional resources for my video about LP ( https://www.youtube.com/watch?v=E72DWgKP_1Y ), which I think is definitely worth a watch if you find this interesting!

Your video is really excellent. I've subscribed to your channel and hope you produce more. Any way we can support your work?

Re: Linear Programming in Python (2023)

#19
post #5

Fwiw, reinforcement learning offers objectively better optimization and more efficient inference than LP in many cases.

"reinforcement learning offers objectively better optimization" I don't follow. Linear programming (with the simplex method) finds the optimal solution set for any linear program eventually. How can reinforcement learning be "better" apart from efficiency?

It can't. They're talking out of their backend.

Re: Linear Programming in Python (2023)

#20
post #5

Fwiw, reinforcement learning offers objectively better optimization and more efficient inference than LP in many cases.

Citation needed. RL makes sense when you don’t know the dynamics of the environment and have interactions with it. Linear programming can be done when you can encode a problem as linear constraints which means you know the dynamics. You can then find the optimal set of points of the convex polyhedron defined by the constraints via interior point methods. That’s it. You don’t need exploration and you can get an optima…

[deleted]
Post reply on HN