From the course: Learning Grasshopper

What's an algorithm?

From the course: Learning Grasshopper

Start my 1-month free trial

What's an algorithm?

- [Instructor] Working with algorithms is fundamental to getting the most out of Grasshopper, but what exactly is an algorithm? Simply put, an algorithm is a step-by-step procedure. In math and computer science, algorithms are used for calculations or problem solving, but the concept can be seen elsewhere too, in places like recipes, games, or even instructions for assembling things like furniture. Algorithms are defined by lists of successive, but not necessarily sequential steps, each with well-defined instructions. Since they are sort of like lists. algorithms have beginnings and ends. In their beginning states, algorithms take data in the form of variable inputs. Inputs are processed through the algorithm steps and transformed into some kind of information or output which is given in the end state. Algorithms exist in many different forms, from written instructions to flow charts to formal computer language, to electrical circuits, just to name a few. Let's take a look at this example of a flow chart and here our input will be temperature data and maybe that's an automatic reading from a thermometer or a temperature sensor, or maybe from somebody just typing in the temperature that they read themselves. Now, the process will be to compare that reading to a standard value, so in this case, it's zero degrees Celsius. Based on whether that temperature data is above or below zero, we could output information as to the state of our temperature reading and that would bring us to the end of the algorithm. Now, in other videos, we'll get into many more details about how exactly to set up an algorithm inside of Grasshopper, but we'll still often start with exactly this kind of overview of the ways in which our algorithm will flow from step to step.

Contents