Simulation Program
Simulation Program
This is a simple one, to prove it works at least. What it does:
Person is made, makes food, eats food, loops again. If starve, loose health each loop then die. Each loop theres a 1/10 chance that person makes another person (Once again, this is a simple simulation to prove this works at least)
It seems that the amount Shakes down to, if you can make as much as you can eat you live. Anymore people either make more then they eat, or die. Other wise the system levels out. Keep restarting the program and tell me your highest numbers! Don't expect anything amazing though. I am getting into simulations and find it very amusing!
PS This is very CPU intense! (well, kinda) And uses alot of ram when the numbers hit the millions (dead = deallocated objects, alive = allocated objects)
Person is made, makes food, eats food, loops again. If starve, loose health each loop then die. Each loop theres a 1/10 chance that person makes another person (Once again, this is a simple simulation to prove this works at least)
It seems that the amount Shakes down to, if you can make as much as you can eat you live. Anymore people either make more then they eat, or die. Other wise the system levels out. Keep restarting the program and tell me your highest numbers! Don't expect anything amazing though. I am getting into simulations and find it very amusing!
PS This is very CPU intense! (well, kinda) And uses alot of ram when the numbers hit the millions (dead = deallocated objects, alive = allocated objects)
- Attachments
-
- Sim.zip
- (5.95 KiB) Downloaded 82 times
-
- Member
- Posts: 95
- Joined: Thu Jan 29, 2009 9:13 am
Re: Simulation Program
a million forkbombs when all you need is a plate.
Re: Simulation Program
Sorry kid, Its not in anyway going to damage your computer.Merlin wrote:a million forkbombs when all you need is a plate.
-
- Member
- Posts: 95
- Joined: Thu Jan 29, 2009 9:13 am
Re: Simulation Program
nor should any decent operating system be damaged by a simple fork bomb. your explination has a person making food, then eating said food, and follows with a check to see if they are starving and then gives a 1/10 chance that it will grow in population. i see no competition or anything that could trigger the starvation check to be true. I of course am only going by your description.
Re: Simulation Program
Your idea on how you see its purpose is different then mine. Its more a study of what it does
-
- Member
- Posts: 95
- Joined: Thu Jan 29, 2009 9:13 am
Re: Simulation Program
I get that, but you have not told me how there will be any variation between the "people"/ if each person is in effect its own thread, then all they do is
1)make food
2)eat food
3)maybe make another one of itself
4)goto 1
you have not explained how there will ever be a shortage of food. no starvation, no variation, this description is not one of a simulation, but one of a fork bomb. Please provide more details of what the simulation does.
1)make food
2)eat food
3)maybe make another one of itself
4)goto 1
you have not explained how there will ever be a shortage of food. no starvation, no variation, this description is not one of a simulation, but one of a fork bomb. Please provide more details of what the simulation does.
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: Simulation Program
I... don't know what it's supposed to do, but it runs prohibitively slowly on an i7.
At the beginning there I was getting refreshes every second or so. I closed the program around two minutes in. Numbers were 8/5/1544 I think.
At the beginning there I was getting refreshes every second or so. I closed the program around two minutes in. Numbers were 8/5/1544 I think.
Re: Simulation Program
It pretty much levels off at 16 people alive. I felt guilty about the rising death toll, so I closed the program.
Really? It's quite fast on my Intel Core 2 Duo.Blacklight wrote:I... don't know what it's supposed to do, but it runs prohibitively slowly on an i7.
-
- Member
- Posts: 255
- Joined: Tue Jun 15, 2010 9:27 am
- Location: Flyover State, United States
- Contact:
Re: Simulation Program
I don't trust executable files with no source so I scanned it with a virus, it came up clean.
Then I ran it in a sandbox, it doesn't seem to be harming anything. I can't figure out what the program is though.
The number of people alive is stabilized at around 200, the amount of food is almost always 1, and the number of people dead keeps rising.
What does this program even do?
Then I ran it in a sandbox, it doesn't seem to be harming anything. I can't figure out what the program is though.
The number of people alive is stabilized at around 200, the amount of food is almost always 1, and the number of people dead keeps rising.
What does this program even do?
Re: Simulation Program
Think of it like a giant Supply and Demand system. The reason why it comes down to one food is because, the population growth has flat lined. The amount of people there only make enough for them selves, and others are the ones who end up surviving. Its a huge system where everyone works together with their food making capabilities, and the 1/100 chance of making another person. More people die because its becoming more and more 1:1 supply demand. Its becoming perfect. This is a very simple sim only because i wanted to test that i could get it working.
Imagine a graph going up very fast, then flat lining out. Restart the program for different results.
Eventually i will release a more meaningful and controllable program (AS THIS WAS ONLY FOR TESTING) to make sure it would work. I will add variables like education, disease resistance, even disease objects that can mutate according to resistance and die off according to education.
The amount of people dead keep rising because they can not make as much as they eat. They make less then they can eat, starve, health runs low, and die off. At the core the capabilities (how much they can make or eat) is randomized. So it can spike, or immediately die.
Imagine a graph going up very fast, then flat lining out. Restart the program for different results.
Ran very well on my E8400. Its meant to lag like that, the original version ran as fast as possible. This one is frame limited.smcerm wrote:Really? It's quite fast on my Intel Core 2 Duo.
Eventually i will release a more meaningful and controllable program (AS THIS WAS ONLY FOR TESTING) to make sure it would work. I will add variables like education, disease resistance, even disease objects that can mutate according to resistance and die off according to education.
The amount of people dead keep rising because they can not make as much as they eat. They make less then they can eat, starve, health runs low, and die off. At the core the capabilities (how much they can make or eat) is randomized. So it can spike, or immediately die.