logoalt Hacker News

bbminner • yesterday at 9:18 PM • 0 replies • view on HN

Here's what I've been thinking about lately. Many problems in constrained optimization can be solved much more easily if you know *which* constraints to the solution are actually important and how their relative importance looks like (dual variables). A similar effect can be found in learning - it could be framed as identifying relative importance of training examples. Both of these approaches are "soft" in that they allow exploration steps to venture into technically invalid states to "get a feel for where the problem gives and where it does not", and arrive to the final conclusion by summarizing this knowledge.

It appears that proper summarization of how much soft constraints push against invalid but promising attempts works better than hard constraining the search to the valid solution space.

Despite how promising it sounds, if one were to design a language that does not allow you to express certain types of harmful patterns or code that disagrees with coders intent, it might constraint one to a search space so narrow that searching it would become too hard.

It feels like TLA+ and rust borrow checker are more of a hard constraint. I am not sure what would count as soft constraints here through? A very smart linter that takes your smart expression of the guarantees for different parts of the code and checks them against guarantees provided by the implementation? But that's kinda like what rust checker does. Not sure how to make it even softer..