Barcode Epidemic: Difference between revisions
No edit summary |
|||
Line 15: | Line 15: | ||
** Not all TVs are friendly. Check the notes about the laptop you're planning to use - whether it has a DisplayPort (HP), HDMI port (Lenovo and others), or a VGA port (almost everything). Check carefully you have the right cable as they are similar! And verify that what you're plugging the cable into supports it and works... | ** Not all TVs are friendly. Check the notes about the laptop you're planning to use - whether it has a DisplayPort (HP), HDMI port (Lenovo and others), or a VGA port (almost everything). Check carefully you have the right cable as they are similar! And verify that what you're plugging the cable into supports it and works... | ||
* Check that laptop is joined to mrc_outbreaks network. | * Check that laptop is joined to mrc_outbreaks network. | ||
* | * Run the Live Epidemic Java app on the laptop | ||
* Turn some tablets on. Check they join mrc_outbreaks network. | * Turn some tablets on. Check they join mrc_outbreaks network. | ||
* Start scanning barcodes. | * Start scanning barcodes. |
Revision as of 14:40, 9 January 2017
Work in Progress!
Playing the Game
Getting Started
Usually, everything will have already been set up. So to get everything working, the sequence of events will normally be along these lines:-
- Plug in the router and switch it on.
- Plug in the laptop (server) and switch it on.
- Plug in projector/tv screen, and connect laptop to it.
- Test that in advance of any public event.
- Not all TVs are friendly. Check the notes about the laptop you're planning to use - whether it has a DisplayPort (HP), HDMI port (Lenovo and others), or a VGA port (almost everything). Check carefully you have the right cable as they are similar! And verify that what you're plugging the cable into supports it and works...
- Check that laptop is joined to mrc_outbreaks network.
- Run the Live Epidemic Java app on the laptop
- Turn some tablets on. Check they join mrc_outbreaks network.
- Start scanning barcodes.
How The Game Works
- The game works in social events of maybe 30+ people, in a well bounded arena, with a big screen.
- Start it by giving one or two people in the crowd a barcode. (Seed infections).
- Tell them to go to "infection control" - the people with the tablets.
- The victim sees the infection controller and presents the barcode.
- We have run two variations of this game; one of the following will apply:-
- The infection controller asks whether the victim is a member of the department, or a visitor. Later on, we look at the graphs to see whether infections spread differently within the two groups, or between them.
- Alternatively, at the Centenary event, we allowed a vaccination probability, giving the victim immunity, and causing them to make no further contacts. The immunity would either be pre-defined (in which case the victim would know already), or their status could be determined by pointing the tablet mysteriously at them and pushing a button.
- The infection controller scans their barcode, then destroys it.
- The tablet tells the infection controller how many infections they should make.
- The infection controller scans a barcode for each of those new infections, and gives it to the victim.
- The victim is told to spread these infections to whoever they want. Tell each new victim to visit "infection control".
- The victim is told they are now immune to further infections. However, it's most fun to keep this fact secret.
- If the victim is given any more barcodes, they must accept them, but they shouldn't visit infection control again.
- Graphs and movies of the current epidemic will be shown in bright colours somewhere in the room.
The Parameters
- The tablets communicate with a web server; the dynamics of the epidemic can therefore be changed on-the-fly, without the infection controllers knowing about it.
- If appropriate for the game being played, the vaccination probability can be set.
- The number of contacts is assumed to be poisson distributed around a specified mean.
- However, in practise, we want to truncate the tail quite tightly, so there is a ceiling parameter.
- And in some cases, we wanted to ensure people made at least one contact, so there is a floor parameter too.
- These can be set by browsing to the web server (pehaps http://192.168.2.2/epi - see below) when connected to the mrc_outbreaks network.
Installation from Scratch
If something has gone wrong, or the Barcode Epidemic needs setting up on new equipment, then the following should be everything you need to know. I'll use the current equipment to describe the process; steps will differ with different equipment obviously, but the principles should still work!
The Web Server
We need to run a lightweight HTTP server that supports PHP, and we'll use it to run a tiny website that supports the communication and data collection. The same platform supports the Herd Immunity app, so I'll put the setup for the common web-related parts on a separate page: Web Platform for MRC Outreach Events. This includes setting up the server software and hardware.
The Live Display App
This is a small Java Application which can display a slideshow of graphs of the live epidemic data, interspaced perhaps with movies or images that might be interesting and attractive. One of the graphs is a network graph connecting people's contacts together, which relies on R.
Install Prerequesties
- Java from Oracle.
- R from R.
- Inside R, we need the statnet package, so install that in the R interface.
Install and Configure the App
- Download THIS ZIP which I'll put here when I've finished developing it, and extract to anywhere you like.
- The zip contains some sample movies and images in the media folder. If you don't want them, delete them, but edit the script file below.
- If you want to translate the text on the graphs into new languages, look in the lang.txt file for instructions.
- To configure the app and the slideshow, look in script.txt, which has instructions inline, but briefly:
- Edit Language:EN if you want a different language. The one you choose must have matching references in the lang.txt file.
- Edit TimeZone:GMT to match where you are, so that the graphs match the time the tablet thinks it is. Either
- Edit RScript: to point to where Rscript.exe is. (On Windows this is a full path, but Linux/Mac I think is just Rscript)
- RNetGraph: must point to the R script that creates the network graph - we'll return to that later. (OR I'll fix this so it's not necessary to think about).
- Lastly, between the Script: and Loop lines, is the set of things that the live app will display. See the instructions in the file.
The tablet
- Test by taking a tablet.
- Join the mrc_outbreaks.
- Browse to 192.168.2.2 to test it.
- You need two extra apps. Pic2shop does the barcode scanning for us, and there's the Live Epidemic app itself.
- To install these apps, I'm going to assume you've installed the Android tools, and the hack for the HP tablets described here.
- Connect a single tablet at a time to the laptop. In a command window, change directory to where you put your Android Development Tools (eg, cd \Program Files\Android).
- Then cd sdk/platform-tools. Might be a good idea to copy any apk files you want to install into that folder.
- adb install app.apk (where app.apk is the path to the package you want to install - pic2shop.apk or liveepi.apk)
- The apps will install.
- You might need to tell the Live Epi app where the web server is. Click the "three dots" icon in the top left corner, and set the website to http://192.168.2.2/epi/
- Then scan a barcode. If it appears to work, then it probably does!