virtualcommons / foraging Goto Github PK
View Code? Open in Web Editor NEWSpatially explicit, multiplayer foraging experiment for studying collective action
License: MIT License
Spatially explicit, multiplayer foraging experiment for studying collective action
License: MIT License
aggregate participant round data into summary files:
Chris at UoL ran into an issue where trailing whitespace in server.address
mucked up the config. Trim them on load:
Key data variables:
add ability to page through multiple sections of instructions.
Need to update the treatment instructions to the new StringTemplate-based format and go through updated configuration properties for an upcoming replication test.
Deployment at Carleton is unsuccessful, possibly due to OpenJDK vs Oracle JDK classloader issues:
# ant demo
...
compile:
prepare-demo:
demo:
check-configuration:
BUILD FAILED
/opt/foraging/build.xml:202: The following error occurred while executing this line:
/opt/foraging/build.xml:311: Did not find any configuration files in src/main/resources/configuration, please copy over an appropriate set of configuration files into src/main/resources/configuration
Total time: 3 seconds
# java -version
openjdk version "1.8.0_71"
OpenJDK Runtime Environment (build 1.8.0_71-b15)
OpenJDK 64-Bit Server VM (build 25.71-b15, mixed mode)
For coding expedience the quiz results are shown alongside the current round instructions. Daniel would like to change this into separate screens but this would involve adding another GUI click through window for quiz results, or (better long-term) refactoring how quizzes are rendered.
Relevant code in GameWindow2D.createQuizListener
Currently costly sanctioning is only allowed if there are still resources on the board to prevent revenge sanctioning after the round is effectively over. Dan would like to disable this rule for the next set of treatments.
in round chat panel is disabled but still displayed (so participants could view old chat history but not communicate further). @decarolab would like to remove it entirely so as not to distract participants
During in-round-chat, no need for duplicate time remaining label. Also the thread of execution that updates it is not being cleaned up when we manually start a round while chat is running, creating spurious time remaining data
we are asking them how long a round takes before telling them how long a round takes
I've been unable to get the demo configuration files and the docker setup included in the repository to work properly. Whenever we run the facilitator and connect to it with 5 clients, each client is placed in it's own harvesting group instead of all competing on the same board. The initial practice round and questions seems to work fine.
We've tried setting clients-per-group and removing that configuration value (as 5 appears to be the default group size in the code).
I know it's loading the configuration files correctly since other changes I've tried, like board size, are reflected in the clients. Any help or advice you could provide would be really appreciated. It's entirely possible I'm misunderstanding what the demo files are supposed to produce.
the token collected counts at the top right of the screen are only updating on full sync
https://github.com/flyingsaucerproject/flyingsaucer
Consider replacing JEditorPane with XHtmlPanel.setDocumentFromString
Java 8 clients appear to make a separate initial request that generates an invalid stream header exception on initial socket connect - need to investigate and fix. Killing the server and restarting it pops up a notification on the client saying "Do you want to connect to x.x.x.x?". At that point if you click OK on the client, it will connect normally to the server.
Mar 21, 2015 1:09:15 PM edu.asu.commons.net.ServerSocketDispatcher processIncomingConnections
INFO: incoming connection: Socket[addr=/72.201.66.20,port=49539,localport=16001]
java.io.StreamCorruptedException: invalid stream header: 47455420
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:806)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
at edu.asu.commons.net.SocketDispatcherWorker.<init>(SocketDispatcherWorker.java:38)
at edu.asu.commons.net.SocketDispatcherWorker.<init>(SocketDispatcherWorker.java:42)
at edu.asu.commons.net.ServerSocketDispatcher.processIncomingConnections(ServerSocketDispatcher.java:91)
at edu.asu.commons.net.AbstractServerDispatcher$2.run(AbstractServerDispatcher.java:118)
Mar 21, 2015 1:09:15 PM edu.asu.commons.net.AbstractServerDispatcher$2 run
SEVERE: IO Exception while processing incoming connections: java.io.StreamCorruptedException: invalid stream header: 47455420
It's likely the quick time movie processor will no longer work due to missing / aging libraries. Check if it's still functional and see if there are any viable replacements to generate movies from the data files again.
Either look into communicating via parallel port:
http://www.oracle.com/technetwork/java/index-jsp-141752.html
https://docs.oracle.com/cd/E17802_01/products/products/javacomm/reference/api/javax/comm/ParallelPort.html
Or do a net time sync between computers and emit relative timestamps in the save file converter.
After a dedicated chat round ends display summarized instructions instead of the original round instructions
Pretest 2 participants in a group, full vision, twice as large as private property
work with Simon and Philip to unify the biopac data with the summary data
Private property round had spontaneous generation after all tokens appeared to be gone
Either use qualtrics or embed directly like the quiz
Current JNLP setup will need to be replaced with new jlink tool
Should be aggregated across the entire experiment:
Timestamp, Round, Group ID, Participant ID, Player Number, Chat Message
Round -> Stage
Repeated Round Index -> Round
Single player version can be optimized to maintain the game state on the client and send it to the server in batches.
rename aggressive/cooperative types to chase/nochase and add a givespace bot that values distance to the player
After the last TokenCollectedEvent collapses the resource we should split up the data for pre-collapse / post-collapse:
Will need to do something about xstream serialization, either disable it or figure out how to permit "illegal" access.
[java] WARNING: An illegal reflective access operation has occurred
[java] WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/home/alllee/workspace/foraging/lib/xstream-1.4.10.jar) to field java.util.TreeMap.comparator
[java] WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
[java] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[java] WARNING: All illegal access operations will be denied in a future release
emit a boolean that signifies whether a participant moved from a cell with a token on each movement event
needs to be added to configuration files
Jetty + experiment server
Super annoying bug related to the new FMRI config parameterization. Will reliably generate SAXParseExceptions whenever the 25 line is changed in source control. Changing it locally gets rid of the exception, but once it's committed it starts up again.
[copy] Copying 150 files to /home/alllee/workspace/foraging/target/classes/conf [22/1833]
[java] java.util.InvalidPropertiesFormatException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
[java] at sun.util.xml.PlatformXmlPropertiesProvider.load(PlatformXmlPropertiesProvider.java:80)
[java] at java.util.Properties$XmlSupport.load(Properties.java:1201)
[java] at java.util.Properties.loadFromXML(Properties.java:881)
[java] at edu.asu.commons.conf.PropertiesConfiguration.loadProperties(PropertiesConfiguration.java:55)
[java] at edu.asu.commons.conf.ExperimentRoundParameters$Base.<init>(ExperimentRoundParameters.java:71)
[java] at edu.asu.commons.foraging.conf.RoundConfiguration.<init>(RoundConfiguration.java:146)
[java] at edu.asu.commons.foraging.conf.ServerConfiguration.createRoundConfiguration(ServerConfiguration.java:49)
[java] at edu.asu.commons.foraging.conf.ServerConfiguration.createRoundConfiguration(ServerConfiguration.java:28)
[java] at edu.asu.commons.conf.ExperimentConfiguration$Base.loadParameters(ExperimentConfiguration.java:181)
[java] at edu.asu.commons.conf.ExperimentConfiguration$Base.loadServerProperties(ExperimentConfiguration.java:170)
[java] at edu.asu.commons.conf.ExperimentConfiguration$Base.<init>(ExperimentConfiguration.java:150)
[java] at edu.asu.commons.conf.ExperimentConfiguration$Base.<init>(ExperimentConfiguration.java:137)
[java] at edu.asu.commons.foraging.conf.ServerConfiguration.<init>(ServerConfiguration.java:40)
[java] at edu.asu.commons.foraging.server.ForagingServer.<init>(ForagingServer.java:135)
[java] at edu.asu.commons.foraging.server.ForagingServer.main(ForagingServer.java:1181)
[java] Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
[java] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
[java] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
[java] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
[java] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
[java] at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
[java] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:999)
[java] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
[java] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
[java] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
[java] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
[java] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
[java] at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
[java] at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
[java] at sun.util.xml.PlatformXmlPropertiesProvider.getLoadingDoc(PlatformXmlPropertiesProvider.java:106)
[java] at sun.util.xml.PlatformXmlPropertiesProvider.load(PlatformXmlPropertiesProvider.java:78)
[java] ... 14 more
[java] Exception in thread "main" java.lang.IllegalArgumentException: Couldn't loadFromXML using resource: conf/ and stream: java.io.ByteArrayInputStream@a09ee92
[java] at edu.asu.commons.conf.PropertiesConfiguration.loadProperties(PropertiesConfiguration.java:58)
[java] at edu.asu.commons.conf.ExperimentRoundParameters$Base.<init>(ExperimentRoundParameters.java:71)
[java] at edu.asu.commons.foraging.conf.RoundConfiguration.<init>(RoundConfiguration.java:146)
[java] at edu.asu.commons.foraging.conf.ServerConfiguration.createRoundConfiguration(ServerConfiguration.java:49)
[java] at edu.asu.commons.foraging.conf.ServerConfiguration.createRoundConfiguration(ServerConfiguration.java:28)
[java] at edu.asu.commons.conf.ExperimentConfiguration$Base.loadParameters(ExperimentConfiguration.java:181)
[java] at edu.asu.commons.conf.ExperimentConfiguration$Base.loadServerProperties(ExperimentConfiguration.java:170)
[java] at edu.asu.commons.conf.ExperimentConfiguration$Base.<init>(ExperimentConfiguration.java:150)
[java] at edu.asu.commons.conf.ExperimentConfiguration$Base.<init>(ExperimentConfiguration.java:137)
[java] at edu.asu.commons.foraging.conf.ServerConfiguration.<init>(ServerConfiguration.java:40)
[java] at edu.asu.commons.foraging.server.ForagingServer.<init>(ForagingServer.java:135)
[java] at edu.asu.commons.foraging.server.ForagingServer.main(ForagingServer.java:1181)
[java] Caused by: java.util.InvalidPropertiesFormatException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
[java] at sun.util.xml.PlatformXmlPropertiesProvider.load(PlatformXmlPropertiesProvider.java:80)
[java] at java.util.Properties$XmlSupport.load(Properties.java:1201)
[java] at java.util.Properties.loadFromXML(Properties.java:881)
[java] at edu.asu.commons.conf.PropertiesConfiguration.loadProperties(PropertiesConfiguration.java:55)
[java] ... 11 more
[java] Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
[java] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
[java] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
[java] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
[java] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
[java] at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
[java] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:999)
[java] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
[java] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
[java] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
[java] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
[java] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
[java] at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
[java] at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
[java] at sun.util.xml.PlatformXmlPropertiesProvider.getLoadingDoc(PlatformXmlPropertiesProvider.java:106)
[java] at sun.util.xml.PlatformXmlPropertiesProvider.load(PlatformXmlPropertiesProvider.java:78)
[java] ... 14 more
update configuration:
Add a simple install script for centos for Carleton. The Docker build still has issues with older kernels / distributions.
Add new ResourceDispenser.Type for non-neighboring-density-dependent (still spatially explicit / overall density dependent).
Algorithm:
raw regrowth = number of trees * regrowth rate
Affects payment results and debriefing
[java] java.lang.NullPointerException
[java] at edu.asu.commons.foraging.data.MovementStatisticsProcessor.process(MovementStatisticsProcessor.java:58)
[java] at edu.asu.commons.experiment.SaveFileProcessor$Base.process(SaveFileProcessor.java:125)
[java] at edu.asu.commons.experiment.SaveFileProcessor$Base.process(SaveFileProcessor.java:100)
[java] at edu.asu.commons.experiment.Persister.processSaveDirectory(Persister.java:241)
[java] at edu.asu.commons.experiment.Persister.processSaveFiles(Persister.java:215)
[java] at edu.asu.commons.experiment.Persister.processSaveFiles(Persister.java:220)
[java] at edu.asu.commons.experiment.Persister.processSaveFiles(Persister.java:220)
[java] at edu.asu.commons.foraging.data.ForagingSaveFileConverter.convert(ForagingSaveFileConverter.java:38)
[java] at edu.asu.commons.foraging.data.ForagingSaveFileConverter.main(ForagingSaveFileConverter.java:53)
in-round chat's layout isn't effective - too small in the BorderLayout.EAST
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.