Yes and no.
We program in paramaters of things it could do and then let the computer decide what it wants to do. Then we look at the results of all the different choices the computer makes.
For example say you told the computer it has 4 moves it can make. Up, down, right, left. And it must make 4 moves.
The simulations would be all the different possible combinates of those 4 moves.
Now take that and say at move 10 you take add a 5th move (diagonal up right) now the computer adjusts to include that move.
That is essentially what simulations are, only the computer has an end goal as well; get from point A to point B in the shortest amount of time using these 5 moves.
It’ll try different combinations of the moves over and over again until it figures out what combination of moves results in the shortest time.
To use a very simple example, let’s say that I create a program that rolls a 6-sided die.
I didn’t program it to specifically roll a 6. It did that on its own, following the parameters I gave it.
A simulation is like this, but a million times more complex. The creator will input the “rules” that it has to follow, but we don’t know what the output will be.
Let’s say we are running a simulation on the depth a submersible can go down to. We know the pressure at that depth, and let’s say we know the exact schematics of the submersible. We plug those parameters in, and the simulation will tell us when it will fail. We don’t know the result in advance; we gain the result from what we do know, which is what we put into the simulation.
They do.
Think of it more like a calculator. You put in 5 and 6, and have it programmed to calculate an equation (i.e. multiply the two numbers) and it gives you 30. Sure, you knew that was the answer already. But how about 5.543 * 6.21? No freakin idea, but our simulation gives us the answer right away.
So, now make the equation way more complicated, so you can’t just do it in your head. Now put in your input numbers (and it can be a lot of them) and it crunches away and gives you the result.
You can make this ‘equation’ basically do anything you want. You can simulate the atmosphere of earth, and input initial conditions, and then let the “simulation” tell you how it plays out. It is doing exactly what you programmed it to do.
The value is that you can take the simulated atmosphere, and try all kinds of scenarios. What if CO2 increases to twice its current amount? Run the simulations and see what happens.
Yes and no.
A simulation is like a game where you set the rules of the game and where the starting pieces are. You can use random number generators to add some degree of chance, but you’re still giving the range of them in the game rules.
You can easily think of a game you’re always going to win. And you can think of a game which should be even. But those are simple games. When you make very complicated rules, you likely have little idea of the outcomes.
For simulations of real life phenomena like weather and disease progression, the “game rules” are usually vastly oversimplified compared to real life, and often wrong. This is helpful if you can run against reality to discover more about the rules of life, but a simulation can never be anywhere close to proof.
There have been unfortunately scientific sounding papers speaking about the future which are used more for political purposes. It’s always good to look at who funds those kinds of simulations, because it’s possible in those cases the simulation *is* just telling them what they want to hear, using the rules they chose.
In general, yes. You’re giving it a bunch of equations and rules, and then letting it describe what happens when you change some of the inputs. You could still sit down and plug all your inputs into the same equations by hand and follow through all of the logic trees in the simulation and get the same result by hand though.
The reason you make a simulation though is usually speed. Your equations might be really complex and there might be lots of them. Doing it by hand once could take forever, and that’s just got one set of inputs. Now you need to do it for another hundred sets of inputs though, and you better hope you don’t get sleepy and make a mistake. Or you could do it on a computer. You kick it off and you could get the results from 1000 sets of inputs in a fraction of the time, and it’s never gunna forget to carry the 2 like a human might.
Obviously there’s trade offs though. It takes time upfront to make a simulation, so if you’re only gunna check the results once it might take longer to do that than to just do it by hand. You could also code in mistakes, so you need to have some kind of verification. And that’s probably going to be a scenario where you do know the actual result. Maybe you tested what you’re simulating in real life, or maybe you did it by hand for a scenario. So now you’ve got something to compare to and can hope that means your simulation is accurate.
There are maybe some exceptions if you’re using some type of learning algorithm, where you’re not telling it the rules you’re just giving it lots of examples of things that follow the rules and are letting it try to figure out what the rules are. It’s still just math under the hood though, math you could do by hand if you were dedicated enough. But in that case you’re just not “telling it what to do” as directly.
As others mentioned, simulations involve coming up with “rules” that describe how a “system” or “model” behaves. An example of what these “rules” can be are the laws of physics, and an example of a “system” could be our solar system.
A cool example imo is the Three-Body Problem, which asks: if you have three massive objects in space, each of which is pulling on one another via gravity, how will they “evolve” over “time” given their “initial conditions” (positions and velocities)?
For two bodies, like the earth and the moon, this is hardly a problem at all because we can come up with static equations that will tell us exactly where the two bodies will be and how they’re moving, and all we have to do is plug in the “initial conditions”, and “time” as inputs into the equation, and then you get your answer.
For three bodies, however, the situation is a lot more complicated and it winds up not being possible to come up with such nice equations, and so the only way to find out how the three bodies behave, is by simulating them. With simulation, you use the laws of gravity as your “rules” and “step through time” by approximating how the positions and velocities evolve after a very small time step, and then you use those newfound positions and velocities as the initial conditions for the next iteration of the simulation. You repeat this process hundreds, or thousands, or billions of times. The smaller the time-step, the more accurate your simulation will be, but the more iterations it will take to get your answer.
Yes, but…
First terminology.
A model is a set of inputs, outputs and rules that determine, what will be the output based on input. So essentially, per your question, model is the program.
Simulation is a single run of the model.
Models can also be static (no internal memory) or dynamic (has internal memory) and can have feedback loops ie. connecting outputs to inputs.
In the simplest case when the model is static without feedback it is fairly simple to calculate, maybe even on paper, what the output is going to be.
But when dealing with reality, the model will likely be dynamic so running the same model twice with same inputs may generate different results because after running it once the rules inside changed (so on paper, you would also need to calculate it twice) and it will likely have feedback loops, so the output of second run will depend on the First input, internal states, outputs, second set of inputs and internal state after first run. This is getting hard to do on paper.
Now imagine, that you have thousands of inputs, tens of thousands internal rules, hundreds of outputs that that fed back to the input and you want to run it for a minute at a half a second interval, ie. 120 reruns.
So yes, you are correct it only does what we programmed it to do (tens of thousands internal rules) but while for computer applying them 120 times is question of a really short time, on paper, to figure out what the results would be, would take a really long time
The simple answer is that knowing the rules of a system does not always give you an intuitive understanding of what the result will be of those rules interaction with each other over time.
An easy example is chess. The rules for chess are pretty simple. You can learn them in a few minutes. But that doesn’t mean that you can “solve” chess. You can’t beat a grandmaster just because you know how all of the pieces move.
This is called “emergent behavior”. Complex systems wind up behaving in ways which humans can’t predict because the interactions are too complex to track in our heads.
Latest Answers