Comment on SHINY
bunchberry@lemmy.world 2 weeks agoIt’s always funny seeing arguments like this as someone with a computer science education. A lot of people act like you can’t have anything complex unless some intelligent being deterministically writes a lot of if-else statements to implement it, which requires them to know and understand in detail what they are implementing at every step.
But what people don’t realize is that this is not how it works at all, there are many problems that are just impractical to actually “know” how to solve yet we solve them all the time, such as voice recognition. Nobody in human history has ever written a bunch of if-else statements to be able to accurately translate someone’s voice to text, because it’s too complicated of a problem, no one on earth knows how it works.
Yet, of course, your phone can do voice recognition just fine. That is because you can put together a generic class of algorithms which find solutions to problems on their own, without you even understanding the problem. These algorithms are known as metaheuristics. Metaheuristics fundamentally cannot be deterministic, they require random noise to work properly, because something that is deterministic will always greedily go in the direction of a more correct solution, and will never explore more incorrect solutions, whereby an even better solution may be beyond the horizon of many incorrect ones. Technically speaking, we would say they get stuck in a local minimum.
A simple example of a metaheuristic is that of annealing. If you want to strengthen a sword, you can heat up the metal really hot and let it slowly cool. While it’s really hot, the atoms in the sword will randomly explore different configurations, and as it cools, they will explore less and less, and the overall process leads them to finding rather optimal configurations that strengthen the crystaline structure of the metal.
This simple process can actually be applied generally to solve pretty much any problem. For example, if you are trying to figure out the optimal route to deliver packages, you can simulate this annealing process but rather than atoms searching for an optimal crystaline structure, you have different orders of stops on a graph searching for the shortest path. The “temperature” would be a variable that represents how much random exploration you are willing to accept, i.e. if you alter the configuration and it’s worse, how much worse does it have to be for you to not accept it. A higher temperature would accept worse solutions, at very low temperatures you would only accept solutions that improve upon the route.
I once implemented this algorithm to solve sudoku puzzles and it was very quick at doing so.
There are tons of metaheuristic algorithms, and much of them we learn from nature, like annealing, however, there’s also genetic algorithms. The random exploration is done through random mutations through each generation, but the deterministic and greedy aspect of it is the fact that only the most optimal generations are chosen to produce the next generation. This is also a generic algorithm that can be applied to solve any problem. You can see a person here who uses a genetic algorithm to teach a computer how to fly a plane during a simulation.
Modern AI is based on neural networks, which the greedy aspect of them is something called backpropagation, although this on its own is not a metaheuristic, but modern AI tech arguably qualifies because it does not actually work until you introduce random exploration like a method known as drop out whereby you randomly remove neurons during training to encourage the neural network to not overfit. Backpropagation+dropout forms a kind of metaheuristic with both a greedy and exploratory aspect to it, and can be used to solve any generic problem.
Indeed, that’s how we get phones to recognize speech and convert it to text. Nobody sat down and wrote a bunch of if-else statements to translate text into speech. Rather, we took a generic nature-inspired algorithm that can produce solutions for any problem, and just applied it to speech recognition, and kept increasing the amount of compute until it could solve the problem on its own. Once it solves it, the solution it spits out is kind of a black box. You can put in speech as an input, and it gives you text as an output, but nobody really even knows fully what is going on in between.
People often act like somehow computers could not solve problems unless humans could also solve them, but computers already have solved millions of problems which not only has no human ever solved but no human can even possibly understand the solution the computer spits out. All we know from studying nature is that there are clever ways to combine random exploration and deterministic greed to form processes which can solve any arbitrary problem given enough time and resources, so we just implement those processes into computers and then keep throwing more time and resources at it until it spits out an answer.
We already understand how nature can produce things without anyone “knowing” how it works, because we do that all the time already!
masterofn001@lemmy.ca 2 weeks ago
This is the kind of answer I can appreciate.
Thanks.