I bet that if this algorithm had come up today it would be called AI resizing
londons_explore 35 days ago [-]
This is a very discrete 'pixel based' approach. I wonder if it could be generalized into the continuous image space, and if that would improve results.
alexhwoods 35 days ago [-]
That's super cool. Love the visualizations!
mnjksd 34 days ago [-]
[dead]
nsjolj 35 days ago [-]
[dead]
Murky3515 36 days ago [-]
[flagged]
_a_a_a_ 36 days ago [-]
[flagged]
dang 35 days ago [-]
Please don't cross into name-calling, regardless of how wrong another comment is or you feel it is. That only makes the thread worse.
I would wager that over the last several decades
BLAST (basic local alignment search tool)
has done more to advance our knowledge of biology than any other algorithm.
BLAST isn't a dynamic programming algorithm. It's not guaranteed to find an optimal solution, unlike a DP algorithm. It has some elements of DP, but that's it.
_a_a_a_ 36 days ago [-]
"BLAST is a heuristic method which means that it is a dynamic programming algorithm..."
"The heart of many well-known programs is a dynamic programming algorithm, or a fast approximation of one, including sequence database search programs like BLAST..."
All DP algorithms guarantee an optimal result. It's a defining characteristic of DP. BLAST doesn't. I'm really surprised that you're attempting to debate this.
I'm clearly not going to understand your motivation so I think I'll stop here.
(edit: There is absolutely nothing stopping heuristics and DP being combined; in fact they have to be in eg. database optimisation. A pure DP solution to query optimisation will be optimal, but will take unbounded (lthough finite) time, which is unacceptable. DP and heuristics are combined to both guide the DP search and bound it after a strict time (usually a couple of seconds CPU) by when it is hopefully 'good enough').
Murky3515 36 days ago [-]
You're wrong, and I don't know why you're being stubborn about this. HDP is a different class of algorithms that uses DP, but it is not DP. A basic read of wikipedia of dynamic programming reveals the key pieces of DP:
There are two key attributes that a problem must have in order for dynamic programming to be applicable: optimal substructure and overlapping sub-problems. ... Optimal substructure means that the solution to a given optimization problem can be obtained by the combination of optimal solutions to its sub-problems.
That's not true. You can of course use DP for heuristic and approximation algorithms. There's an FPTAS for Knapsack using DP, for instance.
Murky3515 36 days ago [-]
It is true. DP always deals with optimization. Just because my car has a radio, doesn't mean my car is a radio.
JohnKemeny 35 days ago [-]
Well, perhaps you use different definitions than I do, but it should be obvious that it is possible to design an algorithm using dynamic programming that does not solve the problem optimally. By optimally here, I mean always output the optimal solution.
If you, by optimization mean that there's a function value you are maximizing or minimizing, than that's not true either, since Subset Sum and Hamiltonian path are canonical decision problems for which DP is used.
Heck, you can even take the standard TSP DP algorithm and, instead of looking at all possible "exit vertices" in linear time, look at a randomly chosen constant number of candidates, thereby reducing the running time by a factor n and getting a randomized heuristic function not guaranteed to give the optimal value.
tejtm 32 days ago [-]
Technically if you car is recent, it is a cell phone with wheels but I digress.
This reminds me of biologists bickering about what is or is not a gene,
and endless snorefests of ontologists bickering about the semantics of a label on an edge in a graph.
It was not amusing then either.
36 days ago [-]
Murky3515 36 days ago [-]
There aren't many useful applications. People who think otherwise are on par with delusional interviewers that feel compelled to ask problems with DP solutions. The vast majority of us will go our entire careers without needing to solve the Towers of Hanoi or the Egg Drop Puzzle.
hinkley 36 days ago [-]
I cut almost a minute off of our startup time by removing a recursive nightmare one of my coworkers inflicted on some code I wrote by replacing the whole thing with DP.
But you’d have to look pretty close to see that’s what I did because unlike him I’m not obsessed with people thinking I’m clever. I’d rather be seen as wise.
(I started fixing it because we had found a couple mystery bugs caused by his solution not being reentrant. By the time I had full code branch coverage, it was actually six separate bugs I fixed)
JohnKemeny 36 days ago [-]
Knapsack/subset sum, travelling salesman, longest common subsequence, dynamic time warp/edit distance/sequence alignment, Q-learning, line breaking/paragraph layout, ...
Rendered at 08:07:24 GMT+0000 (Coordinated Universal Time) with Vercel.
Real-world dynamic programming: https://news.ycombinator.com/item?id=20285242 (66 comments)
Parallel seam carving: https://news.ycombinator.com/item?id=24117330 (37 comments)
Seam carving (2020) [video] https://news.ycombinator.com/item?id=26844121 (35 comments)
Seam carving (Wikipedia) https://news.ycombinator.com/item?id=21192868 (11 comments)
This is in the site guidelines: https://news.ycombinator.com/newsguidelines.html.
I would wager that over the last several decades BLAST (basic local alignment search tool) has done more to advance our knowledge of biology than any other algorithm.
https://en.wikipedia.org/wiki/BLAST_(biotechnology)
https://bioinformaticsreview.com/20210503/how-blast-works-co...
"The heart of many well-known programs is a dynamic programming algorithm, or a fast approximation of one, including sequence database search programs like BLAST..."
https://www.nature.com/articles/nbt0704-909
https://html.duckduckgo.com/html?q=%22%20heuristic%20dynamic...
I'm clearly not going to understand your motivation so I think I'll stop here.
(edit: There is absolutely nothing stopping heuristics and DP being combined; in fact they have to be in eg. database optimisation. A pure DP solution to query optimisation will be optimal, but will take unbounded (lthough finite) time, which is unacceptable. DP and heuristics are combined to both guide the DP search and bound it after a strict time (usually a couple of seconds CPU) by when it is hopefully 'good enough').
There are two key attributes that a problem must have in order for dynamic programming to be applicable: optimal substructure and overlapping sub-problems. ... Optimal substructure means that the solution to a given optimization problem can be obtained by the combination of optimal solutions to its sub-problems.
See the words optimal and optimization?
https://en.wikipedia.org/wiki/Dynamic_programming
If you, by optimization mean that there's a function value you are maximizing or minimizing, than that's not true either, since Subset Sum and Hamiltonian path are canonical decision problems for which DP is used.
Heck, you can even take the standard TSP DP algorithm and, instead of looking at all possible "exit vertices" in linear time, look at a randomly chosen constant number of candidates, thereby reducing the running time by a factor n and getting a randomized heuristic function not guaranteed to give the optimal value.
This reminds me of biologists bickering about what is or is not a gene, and endless snorefests of ontologists bickering about the semantics of a label on an edge in a graph.
It was not amusing then either.
But you’d have to look pretty close to see that’s what I did because unlike him I’m not obsessed with people thinking I’m clever. I’d rather be seen as wise.
(I started fixing it because we had found a couple mystery bugs caused by his solution not being reentrant. By the time I had full code branch coverage, it was actually six separate bugs I fixed)