botmaster
2007-03-24 11:31:16
World Simulator 0.5 BETA
This is yet another attempt at a world simulator :P. I scripted it 3 days ago. Looking at all the other world simulators, I saw that they didn't have a good method of outputting data over time. So I started scripting one that would output a graph to the debug window.
This one also has an additional feature - thought. A "person" in the sim can have a belief/thought and this is seen as the persons "conciousness", which is put to graph. You can think of it as the political convictions of the person.
{======================[Description and Release Notes]=========================}
{ Reality Simulator V 0.55 }
{==============================================================================}
{ }
{ Reality Simulator is a freely distributed script according to the GNU public }
{ license as of 1991. If you bought this program or the script, you have been }
{ scammed. }
{ }
{==================================[About]=====================================}
{ }
{ At it's most basic level, this script can simulate how a population evolves }
{ in size over the years. Birthrate, life expectancy, and probability of a }
{ life to reproduce are all factors in this important part of the simulation. }
{ }
{ On a more complex level, this simulation seeks to recreate the thought }
{ processes of conscious beings. This is the color that is represented in the }
{ results. An exact numerical value can be gathered by looking at the }
{ "Thought" value of the sim output. }
{ }
{ On the graph, blue represents the number of people in the simulation, and }
{ red is the thought of the people (whatever you want it to be). }
{ }
{=============================[How to use this]================================}
{ }
{ Set up the following values, then run the script by pressing the play }
{ button. It's really simple, there really isn't anything complex. }
const
InitialPeople = 10000; { starts the simulation with this many entities in the }
{ simulation. Sometimes this is practical if you want to see your population }
{ degenerate with birthrate 0. }
Birthrate = 5; {Maximum ammount of kids that a person in the sim can have. }
{ note that this is per YEAR and not in total lifespan of the person. }
Factor = 0.01; { Factor affecting birthrate. This affects the probability }
{ of an entity to have kids in a year. }
LifeExpectancy = 50; { Minimum age until death. Maximum age is 99 + this. }
MaxPopulation = 10000; { If there are more people in the sim than this, }
{ the birthrate will drop to 0 for that year. }
YearSimStops = 2007; { Kind of obvious; sim will run this many years. }
MsPerYear = 1; { Number of milliseconds the sim waits per year - keep it }
{ low if you have a high MaxPopulation because the computer will take a long }
{ time calculating!!! }
{ }
{=============================[Version History]================================}
{ }
{ 0.1 - I got bored so I started out with the general idea - what I would }
{ want the script to do, what it's purpose was. }
{ 0.2 - I finished the conscious/life part. Still no output system besides }
{ debug window. }
{ 0.3 - Created the debug image output and the color system. I get type }
{ incompatibility errors because of incredibly high population rates. }
{ 0.4 - Created maxpopulation, and lifeexpectancy. The sim runs smooth, but }
{ there is still no cutoff year and the numbers fly so fast I can't see }
{ them. }
{ 0.5 - Made the script wait a little between each year. Also, made the }
{ script stop once it reached a certain time. Fixed up appearance. }
{ Release of BETA! }
{ 0.55 -Bug fixes with death of entities. No more "Zombies". }
{ }
{==============================================================================}
{ }
{ DO NOT DELETE BELOW THIS LINE }
{ (* A }
{ .--. . . }
{ | ) _|_ _|_ }
{ |--: .-. | .--.--. .-. .--.| .-. .--. }
{ | )( )| | | |( ) `--.| (.-' | }
{ '--' `-' `-'' ' `-`-'`-`--'`-'`--'' }
{ script production*) }
{ }
{ ADD LIST OF CONTRIBUTERS/EDITORS/MODIFIERS HERE: }
{------------------------------------------------------------------------------}Summary of features:
- Graphs output
- Shows exact numerical value of output
- Life expectancy, birth rate, birth probability
- "Thought" of a person
- Runs till a specified year
The blue line represents the number of people, the red line represents how many people think a certain "thought" at the same time.
Below a preview of the graph:

Hmm.. I think I may be adding a few things to it in the future, like avg. population age, average life expectancy, etc.
Known bugs/problems:
- If theres a lot of people, it slows down
- The graph gets a little large sometimes
EDIT:
Hotfix, there was a bug with the death of citizens; there were some with a negative age. That's now fixed, so to all you who got the file "World Simulator.scar", update to the new version.
Well, anyways, I think I've wasted enough time. Try it, and if you like it, send me a progress report and: