Ideation Project DA Ruwe
This program provides us with an agent based simulation of an ideation game.
|
Provides the main method and surrounding methods for running multiple games in concession to achieve general results and a statistically significant "experiment" - normally only one instance is needed hence some values are static, but an expansion to multiple instances is easy and possible.
This program was created by me in six months as part of my Diplomarbeit (equivalent to Master Thesis). Please do consult the thesis first when questions arise, especially when this has to do with the design of the algorithms, the analysis etc.. The purpose of this program is to simulate an ideation game as described in the first chapter of the thesis. By this simulation the sense of the algorithms will hopefully be proven.
You should have received this program as part of a package including jar files. Thereby without installation the program should run in the JAVA runtime environment. A JAVA runtime environment is needed. Depending on the switches chosen in the input file please install R, xelatex and make sure you have proper xslt backends included in your java environment.
Under ubunut the commands
sudo apt-get install R
do the trick.
In windows environments it is a little bit more tricky. If this program itself fails to be completely platform independent please provide bugtracking information.
Just run
java -jar ./bin/ideationthingy.jar input.xml
where the input.xml has to be structured in the same way as the example you can find in ./examples/
Depending on the size of the experiment it might be a good idea to allocate java more heap space: -Xmx2048M
Since I am an engineer and economist it is not sure whether I will pursue research in this field. Still I will enjoy people using this program. Contact me and I will gladly provide help. The idea is of course, that contributions should be merged into the main trunk, maybe with some supervision by me. Something will be arrangeable. I also can provide a svn repository.
Currently this program is not 100% system independent: We manually used the slash once to separate directories and filenames. This is rather unfortunate, but can be quickly resolved. Hopefully this has been done in all occurrences. See the following code sample for reference: {verbatim} assume that the first command-line arg contains a file name
This program is written quite efficiently. The size of the output data could of course be reduced, but this way analysis is much easier, hence efficiency is not the first goal. However, runtimes can approximately be halved by keeping the xml output file in memory and not reloading it from the disk.
This is the input file provided in the package as example. It should explain all the necessary switches and values. It is passed to the program as the only parameter on the command line.
There are several things to note:
booleans
will be treated as true
, if the text is true without preceding or trailing whitespaces, case-insensitive. All other strings are valid but will be treated as false. pathnames
See ToDo. Always including trailing seperator which means /home/ideationOutput/ is a valid example under Linux. As is ~/ideationOutput/ or ./bla/ but /tmp is invalid. Under Windows C:\ is a valid example as is schmu\ . isFixAgents
and isRandoomAgents
should never be both set to true or both set to false. Algorithm
The algorithm is set as an integer, although all other values are usually set by Strings. This should be kept and kept in mind when adding new algorithms. Please alter the documentation and the list of algorithms in the xml. The use of this is that an integer is more error resistant: You can easily type PerformaceTwo instead of PerformanceTwo but 3 and 4 are easily distinguishable. Integers are harder to interpret by a human reader, however. Errors in the choice of algorithm are hard to find, but a broken incentive scheme will be quickly noticed even when only looking at the GameSummary. Therefore Strings are used mostly and the only exception are the algorithms. Copy of input file: (Status 22.08.2012)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testcase> <rscriptOn>true</rscriptOn> <xelatexOn>true</xelatexOn> <xsltOn>true</xsltOn> <directoryStylesheets>/home/ruediger/ideationPlayground/Packages/stylesheets/</directoryStylesheets>
<directoryOutput>/home/ruediger/ideationPlayground/saxon/</directoryOutput>
<directoryScripts>/home/ruediger/ideationPlayground/Packages/scripts/</directoryScripts>
<rscriptCommand>Rscript</rscriptCommand>
<xelatexCommand>xelatex</xelatexCommand>
<gameLength>5</gameLength> <gameRepetitions>3</gameRepetitions> <isFixAgents>true</isFixAgents> <isRandomAgents>false</isRandomAgents> <fixAgentsNumber>1</fixAgentsNumber> <randomAgentsNumber>1</randomAgentsNumber> <incentiveType>PerformancePrivate</incentiveType> <fixAgentsType>10</fixAgentsType>
</testcase>