什么是算法算法有些什么特性

    科技2025-03-29  16

    什么是算法算法有些什么特性

    What you need to know about the simple concept that powers the modern world.

    您需要了解为现代世界提供动力的简单概念。

    BY RACHEL KRAUS

    由RACHEL KRAUS

    Mashable’s series Algorithms explores the mysterious lines of code that increasingly control our lives — and our futures.

    Mashable的系列 算法 探索了越来越多地控制我们的生活以及我们的未来的神秘代码行。

    “The Algorithm” is impenetrable. It’s mysterious, it’s all-knowing, it’s omnipotent. Except that it’s not.

    “算法”是难以理解的。 它是神秘的,它是无所不知的,它是万能的。 除了不是。

    An algorithm is a simple concept that, today, has many complex manifestations. Algorithms’ central and opaque position at the heart of social networks like Facebook cause some to view algorithms in general with a sort of mystical reverence. Algorithms have become synonymous with something highly technical and difficult to understand, that is either an arbiter of objective truth, or, on the other end of the spectrum, something wholly untrustworthy.

    算法是一个简单的概念,如今已具有许多复杂的表现形式。 在诸如Facebook这样的社交网络的核心位置,算法处于中央和不透明的位置,这使一些人对算法总体上持一种神秘的敬意。 算法已成为某些技术性高且难以理解的事物的代名词,这些事物要么是客观真理的仲裁者,要么在另一端是完全不可信的事物。

    But when people refer to “the algorithm” — whether Facebook’s or another tech company’s recommendation algorithm, or just “algorithms” in general — do they really know what it means? Judging by how widely the term is used and misused, most likely not. As Mashable embarks on our exploration of algorithms, we wanted to get something straight right off the bat: What is an algorithm, anyway?

    但是,当人们提到“算法”时(无论是Facebook还是其他科技公司的推荐算法,还是一般来说只是“算法”),他们真的知道这意味着什么吗? 从使用和滥用这个术语的广泛程度来判断,很可能不会。 当Mashable着手进行算法探索时,我们想马上获得一些收益:无论如何,什么是算法?

    Mashable spoke with Pedro Domingos, a computer science professor at the University of Washington who has also written a book about the ever-growing role algorithms play in our lives. Before you go being alternatively impressed by or distrusting of the next computer algorithm you encounter, get back to basics on the concept that’s powering our world.

    Mashable采访了华盛顿大学计算机科学教授Pedro Domingos,他还写了一本书,讲述算法在我们的生活中扮演着越来越重要的角色。 在对您遇到的下一个计算机算法印象深刻或不信任之前,请回到为我们的世界提供动力的概念的基础。

    算法是一组非常具体的指令 (1. An algorithm is a set of very specific instructions)

    How to bake a cake, find the sum of two plus two, or even run a country according to the U.S. Constitution are all examples of algorithms. Why? Because, according to Domingos, the definition of an algorithm is “a sequence of instructions.” That’s it!

    算法的例子包括如何烤蛋糕,求二加二的总和,甚至根据美国宪法管理一个国家。 为什么? 因为根据Domingos的说法,算法的定义是“一系列指令”。 而已!

    Today, an algorithm usually refers to “a sequence of instructions that tells a computer what to do.” A computer program is an algorithm, written in a computer programming language, that a computer can understand and execute.

    如今,算法通常指的是“告诉计算机做什么的一系列指令”。 计算机程序是以计算机编程语言编写的算法,计算机可以理解并执行。

    Algorithms written for computers also have to be extremely precise, often using the instructions “if,” “then,” and “else.” For example, a self-driving car might run on an algorithm for navigating that says “IF the directions say turn left, THEN turn left.” See how specific you have to be to make a computer follow a seemingly simple set of instructions?

    为计算机编写的算法也必须非常精确,通常使用“ if”,“ then”和“ else”指令。 例如,无人驾驶汽车可能会在导航算法上显示“如果方向向左转,然后向左转”。 看看使计算机遵循一组看似简单的说明需要多么具体?

    In the popular imagination, recommendation algorithms have come to dominate our idea of what an algorithm is. That is, when many people think about or refer to algorithms, they’re referencing something like what TV show Netflix thinks you might like, or which international travelers belong on the no-fly list. While these are extremely complicated algorithms, at their hearts, they’re still just a set of instructions a computer follows to complete a specified task.

    在流行的想象中, 推荐算法已经主导了我们对算法的理解。 也就是说,当许多人考虑或提及算法时,他们所指的是诸如Netflix认为您可能喜欢的电视节目,或者哪些国际旅行者属于禁飞名单 。 尽管这些算法极为复杂,但从本质上讲,它们仍然只是计算机完成特定任务所遵循的一组指令。

    “With computers, the algorithm can get vastly more complex,” Domingos said. “Addition is an algorithm that’s defined in a few lines of text. Computers can have algorithms that take millions of lines to define.”

    “使用计算机,该算法会变得更加复杂,” Domingos说。 “加法是一种在几行文本中定义的算法。 计算机可以具有需要数百万行定义的算法。”

    2.人们早在计算机还没有存在之前就编写和使用算法 (2. People wrote and used algorithms long before computers even existed)

    As early as the Babylonian era, humans were writing algorithms to help them do the mathematical equations that allowed them to manage their agricultural society.

    早在巴比伦时代,人类就在编写算法,以帮助他们建立数学方程式,从而使他们能够管理自己的农业社会。

    “There were algorithms before computers, because you don’t need a computer to execute an algorithm, the algorithm can be executed by a person,” Domingos said.

    “在计算机之前就有算法了,因为您不需要计算机来执行算法,因此算法可以由人执行,”多明戈斯说。

    Algorithms using computers first rose to prominence in the mid-20th century, when the military began writing formulas for, say, determining where to aim a missile at a moving object. The concept then moved into business administration, with computers running formulas for administering payroll and such, and in science, for tracking the movements in the sky.

    使用计算机的算法最早在20世纪中叶问世,当时军方开始编写公式,例如,确定将导弹对准移动物体的位置。 然后,这个概念进入了商业管理领域,其中的计算机运行着用于管理工资等的公式,在科学上可以跟踪天空的运动。

    A turning point for modern algorithms came when Larry Page and Sergei Brin wrote the Google PageRank algorithm. Instead of just relying on information within a page to determine how relevant it was to a search term, the search engine algorithm incorporated a host of other signals that would help it surface the best results. Most notably, how many other links pointed to the article, and how reputable those articles were, based on how many links pointed to those pages, and so on. That was a powerful sign of relevance. And the rest is history.

    拉里·佩奇(Larry Page)和谢尔盖·布林(Sergei Brin)编写Google PageRank算法时,现代算法出现了转折点。 搜索引擎算法并不仅仅是依靠页面中的信息来确定它与搜索词的相关性,还结合了许多其他信号,这些信号将帮助它获得最佳结果。 最值得注意的是,基于指向这些页面的链接数量,还有多少其他链接指向该文章,以及这些文章的声誉如何。 这是相关性的有力标志。 剩下的就是历史。

    3.今天,您到处都能找到算法 (3. Today, you can find algorithms everywhere)

    While we might think of algorithms as mathematical equations, algorithms, according to Domingos, “can compute anything from anything, there might be no numbers involved at all.” One prominent and extremely complex algorithm is the algorithm that governs the Facebook News Feed. It’s an equation that Facebook uses to determine what pieces of content to show its users as they scroll; in other words, a set of instructions to decide what goes on the News Feed.

    尽管我们可能将算法视为数学方程式,但是根据多明戈斯说,算法“可以从任何事物中计算出任何东西,可能根本不涉及任何数字。” 一种重要且极其复杂的算法是管理Facebook新闻提要的算法。 这是Facebook用于确定在用户滚动时向其显示哪些内容的等式。 换句话说,有一组指示来决定新闻订阅源上的内容。

    “There’s no end of things that Facebook could put on your News Feed but it has to choose.”

    “ Facebook可以在您的新闻订阅源上放无止境,但必须选择。”

    “There’s no end of things that Facebook could put on your News Feed but it has to choose,” Domingos said. “And it’s usually a combination of things like how much do you care about the people that produced directly or indirectly that post? How close are they to you in your social network, how relevant it is in its own terms because of the subject, and also how recent.”

    多明戈斯说:“ Facebook可以在您的新闻源上放上无止境的东西,但必须选择。” “而且通常这是多种因素的结合,例如您对直接或间接产生该职位的人员有多关心? 他们在您的社交网络中与您有多近,与主题相关的信息本身和最近的情况。”

    Facebook, Google, Amazon, and other big tech companies all rely on algorithms to serve content and products to their customers. But there are also algorithms throughout your life that you might not be aware of.

    Facebook,Google,Amazon和其他大型科技公司都依靠算法为客户提供内容和产品。 但是在您的一生中,还有一些您可能不知道的算法。

    For example, Domingos explained that an algorithm governs how your dishwasher knows when it’s time to transition from washing to drying, or how your car regulates fuel intake and knows when its tank is full while at the gas station, or how shadows appear in a digitally animated movie to perfectly replicate the sun in the real world.

    例如,多明戈斯(Domingos)解释说,一种算法控制着您的洗碗机如何知道何时需要从洗涤到干燥的过渡时间,或者您的汽车如何调节燃料的摄入量以及如何知道加油站的油箱何时装满,或者如何在数字形式中显示阴影动画电影,完美再现真实世界中的太阳。

    “Clearly, every time you interact with the computer, or you’re on the internet, there’s algorithms involved,” Domingos said. “But these days algorithms are also involved in just about everything.”

    “很明显,每次您与计算机进行交互或上网时,都会涉及算法,” Domingos说。 “但是如今,算法几乎还涉及到所有内容。”

    4.最复杂的算法使用机器学习 (4. The most complex algorithms use machine learning)

    As we learned, an algorithm typically has to be written in “excruciating detail” for a computer to understand what to do. However, that’s not the case when the people who write algorithms incorporate machine learning — a type of artificial intelligence — which leads to the most sophisticated algorithms.

    正如我们所了解的那样,计算机通常必须以“令人费解的细节”编写算法,才能理解要做什么。 但是,编写算法的人员并入了机器学习(一种人工智能)却导致最复杂的算法时,情况并非如此。

    “In traditional programming, a human being has to write down every little detail of what the other has to do, and that is very time consuming, very costly,” Domingos said. “Machine learning is the computer discovering its own algorithms instead of being told what to do.”

    多明戈斯说:“在传统编程中,一个人必须写下对方要做的每一个小细节,这非常耗时,而且成本很高。” “机器学习是计算机发现自己的算法,而不是被告知要做什么。”

    Put another way, machine learning is when a programmer feeds a program some raw data as a starting point, then submits the end point of what an organized, classified version of that data looks like, and leaves it up to the program to figure out how to get from point A to point B. Consider an onion: A human who knows how to cook can turn that onion from a pungent raw sphere into strips of caramelized goodness. In a traditional algorithm, a programmer would write every single step of the cooking instructions. But in an algorithm developed by artificial intelligence, given the end point as a goal, the program would figure out how to get from raw to caramelized itself. Hence, the machine learned.

    换句话说,机器学习是指程序员向程序提供一些原始数据作为起点,然后提交该数据的组织化,分类版本的终点,然后交给程序确定如何处理。以从A点到达B点。考虑一个洋葱:知道如何做饭的人可以将洋葱从刺鼻的原始球体变成焦糖状的条状。 在传统算法中,程序员将编写烹饪指令的每个步骤。 但是在由人工智能开发的算法中,以终点为目标,该程序将弄清楚如何将其从原始变成焦糖。 因此,机器学会了。

    These types of algorithms become even more powerful when a human being wouldn’t know how to get from point A to point B. For example, a human process like being able to recognize that a cat is a cat takes so much complicated brain power that it would be impossible to write out step by step. But by giving a program a bunch of images of a cat, and images that are not a cat, and showing the desired endpoint as categorizing a cat image as a cat, the computer can learn to execute that process itself.

    当人类不知道如何从点A到达点B时,这些类型的算法将变得更加强大。例如,人类过程(例如能够识别出猫是猫)需要非常复杂的脑力,一步一步地写出来是不可能的。 但是,通过给程序提供一堆猫的图像和非猫的图像,并将所需的端点显示为将猫图像归类为猫,计算机可以学会自己执行该过程。

    “It’s the computer learning to program itself instead of having to be programmed by people,” Domingos said. “This, of course, is extraordinarily powerful when it works, because now you can, you know, create very powerful, very complex algorithms with very little human intervention.” It’s also very funny when it doesn’t work.

    多明戈斯说:“这是计算机在学习自己编程,而不是必须由人们编程。” “当然,它在工作时非常强大,因为现在您可以创建非常强大,非常复杂的算法,而无需人工干预。” 当它不起作用时,这也非常有趣。

    5.尽管这个词最近被使用过,但是算法并不是魔术 (5. Despite the term’s recent cache, algorithms aren’t magic)

    Thanks to the sheer amount of data algorithms process, it might seem like they’re all-knowing mystery boxes built to reveal secrets. However, remember that an algorithm just means a set of instructions. What’s more, humans create algorithms, which means they can be flawed.

    由于大量的数据算法处理,它们似乎完全知道用来揭秘秘密的神秘盒子。 但是,请记住,算法仅意味着一组指令。 而且,人类会创建算法,这意味着它们可能存在缺陷。

    “There’s also a lot of misconceptions about algorithms, partly because people don’t really see what’s going on inside the computer,” Domingos said. “A very common one is that people think that algorithms are somehow perfect.”

    多明戈斯说:“对算法也有很多误解,部分原因是人们没有真正看到计算机内部正在发生什么。” “人们通常认为算法在某种程度上是完美的。”

    Domingos explained that programmers spend enormous amounts of time fixing mistakes in algorithms so that the lines of code produce the appropriate results. However, humans don’t always catch those mistakes. What’s more, an algorithm is based around the output a human wants to see, or what that human is optimizing for. Take a hiring algorithm, which ostensibly should find the best candidate for a job. If a human sets the instructions to look at qualifications that aren’t necessarily relevant to a job (say, university pedigree), just because the algorithm then says “candidate A is the best person,” doesn’t make it the truth.

    Domingos解释说,程序员花费大量时间来纠正算法中的错误,以便代码行产生适当的结果。 但是,人类并不总是会发现这些错误。 而且,算法基于人们想要看到的输出或人们正在优化的内容。 采用招聘算法 ,表面上应该找到工作的最佳人选。 如果一个人设置指令来查看不一定与工作相关的资格(例如,大学血统),只是因为该算法然后说“候选人A是最好的人”,就没有道理。

    Often, that’s because of bias. And problems with bias can get even worse with algorithms that utilize artificial intelligence.

    通常,这是由于偏见。 利用人工智能的算法会使偏差问题变得更加严重。

    “In traditional programming you have to worry about the biases of the programmer,” Domingos said. “In machine learning, mainly, you have to worry about the biases that come from the data.”

    “在传统编程中,您必须担心程序员的偏见,” Domingos说。 “主要在机器学习中,您必须担心数据带来的偏差。”

    For example, a hiring algorithm powered by machine learning might use as its starting point a bunch of resumes of candidates, and as its output the resumes of people who were hired in the past. However, most tech companies are not racially diverse. So an automated algorithm that makes hiring recommendations could mirror that real world inequality.

    例如,由机器学习提供支持的招聘算法可能将一堆应聘者简历作为起点,并将过去雇用的人员的简历作为输出。 但是,大多数科技公司的种族并不相同 。 因此,提出招聘建议的自动算法可以反映现实世界中的不平等现象。

    Studies have shown that artificial intelligence can mirror the gender and race stereotypes of the humans that train them. In one study, an algorithm that produced word associations used the entirety of the English language on the web as its training data to learn associations between words. Thanks to the biases that exist in our world, the algorithm determined that female names were more associated with the arts, while male names were more associated with math and science. Studies like these show that algorithms are not inherently neutral, perfect, or malevolent: They simply do what the humans and data that train them say to do. In short, they’re just as flawed as we are.

    研究表明 ,人工智能可以反映出受过训练的人类的性别和种族刻板印象。 在一项研究中,产生单词联想的算法使用网络上的全部英语作为其训练数据来学习单词之间的联想。 由于我们世界中存在偏见,该算法确定了女性名字与艺术之间的联系更加紧密,而男性名字与数学和科学之间的联系更加紧密。 此类研究表明,算法并非天生就具有中立性,完美性或恶意性:它们只是按照训练它们的人员和数据来做。 简而言之,它们和我们一样存在缺陷。

    6.算法正在引发技术革命 (6. Algorithms are ushering in a technological revolution)

    Algorithms may be imperfect, but they are nonetheless transforming our world.

    算法可能并不完美,但它们仍在改变我们的世界。

    “All these things that we take for granted like the web and social media, and on and on, they wouldn’t exist without algorithms,” Domingos said.

    多明戈斯说:“所有这些我们想当然的东西,例如网络和社交媒体,等等,没有算法就不会存在。”

    “Algorithms are doing for mental work what the Industrial Revolution did for manual work.”

    “算法为脑力劳动做的工作,就像工业革命对体力劳动所做的那样。”

    As these automated sets of instructions become more and more widespread — from your dishwasher to the government’s supercomputers — humans have the ability to exercise our knowledge more quickly and efficiently than ever before. Domingos views that as nothing short of revolutionary.

    从您的洗碗机到政府的超级计算机,这些自动化的指令集变得越来越普及,人类比以往任何时候都能够更快,更有效地运用我们的知识。 多明戈斯认为这无非是革命性的。

    “Algorithms are doing for mental work what the Industrial Revolution did for manual work,” Domingos said. “Algorithms are the automation of intelligence. And if you think about that, this is a very powerful thing: to do something that used to take, you know, human thinking and labor to do, now can be done by an algorithm.”

    多明戈斯说:“算法为脑力劳动做的工作,就像工业革命为体力劳动所做的那样。” 算法是智能的自动化。 而且,如果您考虑到这一点,这将是一件非常有力的事情:要做到以前需要做的事情,如人类的思想和劳动,现在可以通过算法来完成。”

    Algorithms are here to stay. But how we design them — biased or equitable, helpful or harmful — and how much we unquestionably accept their presence, is up to us.

    算法将保留下来。 但是,我们如何设计它们(有偏见或公平,有益或有害)以及我们毫无疑问地接受它们的存在,取决于我们。

    Originally published at https://mashable.com

    最初发布在 https://mashable.com

    翻译自: https://medium.com/mashable/what-is-an-algorithm-anyway-13bb77e2fea

    什么是算法算法有些什么特性

    相关资源:jdk-8u281-windows-x64.exe
    Processed: 0.010, SQL: 8