I’ve spent some time testing Project Nightjar EggLab: clicking on algorithmically generated eggs on backgrounds taken from nightjar nest sites and recording the time it takes for each egg. It’s designed for lots of people to play in parallel, but I wanted to test it before coming up with more gameplay mechanic ideas.
The timing is used to rank the eggs, I keep the top 1024 individuals that took longest to find, and generate new ones from them. The idea is that successful traits will increase throughout the population and the average score will increase – from this small test it seems to be the case, a slow but consistent rise over the latest 500 eggs:
Most of the eggs are still really easy to see, but some of them take a few seconds and every now and again there is a good one that can take longer. These are some nest sites from the fiery-necked nightjar, which seems to consistently favour leafy ground – the last one took me a while to spot:
This are the top 50 eggs for the fiery-necked population, it’s quite noisy with false positives due to the fact that if you get distracted when playing the egg will score highly (this is one of the things to fix):
For comparison, here is the top 50 for the Mozambique nightjar:
These birds nest on a bigger variety of sites, including bare earth – here’s a good one of them:
The other project nightjar citizen science games, where you can search for real nightjars and nesting sites can be found here.
We’ve had tens of thousands of people spotting nightjars and donating a bit of their time to sensory ecology research. The results of this (of course it’s still on-going, along with the new nest spotting game) is a 20Mb database with hundreds of thousands of clicks recorded. One of the things we were interested in was seeing what people were mistaking for the birds – so I had a go at visualising all the clicks over the images (these are all parts of the cropped image – as it really doesn’t compress well):
Then, looking through the results – I saw a strange artefact:
Uncompressed high res version
My first thought was that someone had tried cheating with a script, but I can hardly imagine that anyone would go to the bother and it’s only in one image. Perhaps some form of bot or scraping software agent – I thought that browser click automation was done by directly interpreting the web page? Perhaps it’s a fall back for HTML5 canvas elements?
It turns out it’s a single player (playing as a monkey, age 16 to 35 who had played before) – so easy enough to filter away, but in doing that I noticed the click order was not as regular as it looked, and it goes a bit wobbly in the middle:
Someone with very precise mouse skills then? 🙂
We’ve released a new game for Project Nightjar called Where is that nest? This is an adaptation of Where is that nightjar?, but the variety of species of birds is greater, some of the nests are much harder to find than the birds were so we added two levels – and a hall of fame high score table!
A couple of screenshots from the upcoming Project Nightjar citizen science game – the genetic programming pattern generator is now working in a simple test framework, and even with myself as the only player at the moment, it’s gradually producing eggs that are harder and harder to find against one of the background images from the field site in South Africa. Today I’ve been working on a viewer for the pattern genome itself, which displays all the base images and the operations and intermediate steps as it builds up the final image. Unlike any natural form of genetics, genetic programming is all about growing trees of functions connected together, and here we are interested in combining simple images using HTML5 canvas’s composite operations to make complex patterns.
This will be useful for debugging mutations, where the sub-trees are jumbled up, but as we’re building a citizen science game, we’re also going to be exposing as much as possible about how it’s working – from the game mechanics like this to the underlying camouflage theories we’ll be testing. If you recognise the graph drawing algorithm, I’ve been plundering a long forgotten project: fastbreeder.
The first Project Nightjar game was a big success, with 6 thousand players in the first few days – so we’ll have lots of visual perception data to get through! Today I’ve been doing a bit more work on the egg generator for the next citizen science camouflage game:
I’ve made 24 new, more naturalistic base images than the abstract ones I was testing with before, and implemented the start of the genetic programming system – each block of 4×4 eggs here are children of a single randomly created parent, each child is created with a 1% mutation rate. The programs trees themselves are 6 levels deep, so a maximum of 64 binary composite operations.
All the genetic programming effort will happen in HTML5, thus neatly scaling the processing with the number of players, which is going to be important if this game proves as popular as the last – all the server has to do then is keep a record of the genotypes (the program trees) and their corresponding fitness.
One catch with this approach is the implementation of globalCompositeOperation in HTML5, the core of the image synthesis technique I’m using, is far from perfect across all browsers. Having the same genotype look different to different people would be a disaster, so I’m having to restrict the operations to the ones consistently supported – â€œsource-overâ€,â€source-atopâ€,â€destination-overâ€,â€destination-outâ€,â€lighterâ€ and â€œxorâ€.
The first Project Nightjar game is online!
It’s a perception test to see how good you are at spotting the camouflaged birds – a great use of the photos the researchers are collecting in the field, and we can also use the data as an experiment by comparing our timing when searching for birds with different predator perception, Monkeys – who see the same colours we do, or Mongeese – who being dichromats can’t differentiate between red and green.
We also had a great chance to test the game very thoroughly at the Science in the Square event in Falmouth last week, set up by Exeter University to promote science to the public. We had a touchscreen computer set up that people could use, and had a large range of people hunting for nightjars (4155 attempted spotting “clicks” in total!).
Part of the ‘Project Nightjar’ camouflage work I’m doing for the Sensory Ecology group at Exeter University is to design citizen science games we can build to do some research. One plan is to create lots of patterns in the browser that we can run perceptual models on for different predator animals, and use an online game to compare them with human perception.
A nice aspect of this is that it’s easy to artistically control the patterns by changing the starting images, for example much more naturalistic patterns would result from noisier, less geometric base images and more earthy colours. This way we can have different ‘themes’ for levels in a game, for example.
I’m using the scheme compiler I wrote for planet fluxus to do this, and building trees that look like this:
("terminal" (124 57 0 1) "stripe-6")
("terminal" (42 23 0 1) "dots-6"))
("terminal" (36 47 0 1) "stripe-7")
("terminal" (8 90 1.5705 1) "red")))
("terminal" (108 69 0 1) "green"))
Ops are the blend mode operations, and terminals are images, which include translation and scale (not currently used). The egg trees get drawn with the function below, which shows the curious hybrid mix of HTML5 canvas and Scheme I’m using these days (and some people may find offensive 🙂 Next up is to actually do the genetic programming part, so mutating and doing crossover on the trees.
(define (draw-egg ctx x y program)
(if (eq? (program-type program) "terminal")
(find-image (terminal-image program)
;; centre the rotation
(ctx.translate 64 64)
(transform-rotate (terminal-transform program)))
(ctx.translate -64 -64)
;; make the pattern translate by moving,
;; drawing then moving back
(transform-x (terminal-transform program))
(transform-y (terminal-transform program)))
(- 0 (transform-x (terminal-transform program)))
(- 0 (transform-y (terminal-transform program)))
(* 127 2) (* 127 2))
(- 0 (transform-x (terminal-transform program)))
(- 0 (transform-y (terminal-transform program)))))
;; slightly overzealous context saving/restoring
;; set the composite operation
(set! ctx.globalCompositeOperation (operator-type program))
(draw-egg ctx x y (operator-operand-a program))
(draw-egg ctx x y (operator-operand-b program))
Responsive web design is about how to deal with the multitude of different shaped screens that people are now using. Although it has some interesting technological aspects, it’s the philosophy that I find appealing – the idea of designing for the smallest and most limited form first, and then looking at how it can be progressively changed as the capabilities improve, in a continuous way rather than targeting specific devices. The idea is that this tends to be more successful than the other way around – i.e. thinking about the best case first, and taking stuff away as capabilities reduce.
For the design for Project Nightjar, we needed something colourful and accessible, and something we can build as we add games and other experiments later on. I decided to use compass, starting with fffunction’s tool sassaparilla for building the front end and django for the framework. This has meant that I’ve been able to quickly put together a site that the researchers can edit themselves, and that works on all devices.
Here are some quick screenshots, as the site isn’t public yet:
One of the things that caught me out was how to stop mobile browsers trying to display the site as a normal web page, it turns out they report the screen width differently unless you specifically tell them not to with:
<meta name="viewport" content="width=device-width">
It’s great to settle down to a few days of drawing and planning on paper for the Nightjar camouflage project I’m working on with the sensory ecology and evolution group. First things first, exploring the data, identifying potential groups of people who will find it useful and exciting, working out ways to bring it to their attention – and a bit of rough and ready ‘mobile first’ web design.