[Home]How To Do Real Useful Science In Just Five Minutes

HomePage | RecentChanges | Preferences

A quick tutorial to getting OPTIMAES working and doing something interesting with it.

Step 1

Make sure you have Python installed on your machine. If you don't, I'm afraid this will take a bit longer than 5 minutes as you need to download and get Python running first.

More at http://www.python.org/

Step 2

Download the code in an archive file from : GetTheCode

Open it

Step 3

Set an environment variable called OPTIMAES_ROOT to the optimaes directory containing defaultExperiment.py.

Something like

 export OPTIMAES_ROOT=/home/yourname/optimaes/

should get you going on Linux.

Step 4

Open defaultExperiment.py. Check that the path in the first line, which by default is

 #! /usr/bin/python 

correctly points to Python.

To find the right path in your Linux system, type

 which python

on the command line. If it isn't "#! /usr/bin/python", change the file to the right path

Step 5

Run defaultExperiment.py

You should see something like this ...

Parameters 
Economy of 30 agents of type Agent 
In a Local network (av. 5 arcs per node)
This economy was run 50 times, each time for 10 steps

Summaries
Mean no. agents alive : 6.285714
Average of surplus generated by the economy : 284.204082
Average of total production of the economy during it's run : 448.897959
Mean of standard deviation of wealth : 7.578408 from a mean of 11.233888 
(Smaller sDev the more equal the society)



Parameters 
Economy of 30 agents of type GiftAgent 
In a Local network (av. 5 arcs per node)
This economy was run 50 times, each time for 10 steps

Summaries
Mean no. agents alive : 10.200000
Average of surplus generated by the economy : 352.020000
Average of total production of the economy during it's run : 671.220000
Mean of standard deviation of wealth : 6.254166 from a mean of 8.661083 
(Smaller sDev the more equal the society)



Parameters 
Economy of 30 agents of type BarterAgent 
In a Local network (av. 5 arcs per node)
This economy was run 50 times, each time for 10 steps

Summaries
Mean no. agents alive : 6.306122
Average of surplus generated by the economy : 279.204082
Average of total production of the economy during it's run : 448.387755
Mean of standard deviation of wealth : 7.451643 from a mean of 11.044010 
(Smaller sDev the more equal the society)



Parameters 
Economy of 30 agents of type ProfitSeekingBarterAgent 
In a Local network (av. 5 arcs per node)
This economy was run 50 times, each time for 10 steps

Summaries
Mean no. agents alive : 6.260000
Average of surplus generated by the economy : 287.320000
Average of total production of the economy during it's run : 461.120000
Mean of standard deviation of wealth : 7.539095 from a mean of 11.500528 
(Smaller sDev the more equal the society)



Parameters 
Economy of 30 agents of type MoneyAgent 
In a Local network (av. 5 arcs per node)
This economy was run 50 times, each time for 10 steps

Summaries
Mean no. agents alive : 6.100000
Average of surplus generated by the economy : 254.280000
Average of total production of the economy during it's run : 422.880000
Mean of standard deviation of wealth : 7.103391 from a mean of 10.382554 
(Smaller sDev the more equal the society)

These are the results of running (briefly) the five different kinds of economy that currently exist in the OPTIMAES package.

Step 6

Now look at the table of results in DefaultExperimentResults

Choose some parameters that seem interesting but haven't been tried yet.

Edit defaultExperiment.py to use them.

Run defaultExperiment.py again ...

Step 7

Add the results you got to those on DefaultExperimentResults

Congratulations

You've just contributed something original to the sum of human knowledge ...

If it didn't work

I know it's ugly. I'm working on some better instructions etc. But if this didn't work for you ...


No problem at all technically. The question is how to interpret the results. For example, how can you tell whether a difference between any pair of values is statistically significant? (I assume a random number generator is used in the simulation so some differences will occur randomly.) -- SJ

See ScientificCriticism

Also not a problem, instead a suggestion (which, of course, you are free to ignore). Modifying the sample python script to have use "#!/usr/bin/env python" instead of "#!/usr/bin/python". That would allow it to run unmodified on systems with a python in a different place (but in $PATH). Also sys.path could be modified in the script to automatically add the library subdirectories (that will only work when the script is run from within its own directory - but that should be the case for a first user trial run).

-- sholden

I've made some changes to improve this in the new version -- PhilJones


of course -- PhilJones

HomePage | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited May 16, 2005 1:10 am by RichardP (diff)
Search: