My book will be released soon — and it will be open-access

Good news, open science fans — my upcoming book from Springer is now in editing/typesetting, and on track for a spring release under a Creative Commons with Attribution licence.  This means you can download, share, adapt and modify the work however you see fit, so long as you cite the original and link to a copy of the licence.

I have to take a moment here to thank the MRC/CSO Social and Public Health Sciences Unit, my new home, for supporting open science and widening the audience of this book.

Springer is keen to get this moving along so they’ve put up a website for the book here!   You can even pre-order it, if you want.

Advertisements
Tagged , , ,

Some light reading recommendations

So I just handed in the final draft of my upcoming book for Springer’s Methodos Series, which is about the application of agent-based modelling techniques to the social sciences, with some specific applications to demography.

I thought I’d share two other books related to this topic that just came out recently, both of which are open-access and freely downloadable as PDF or epub ebooks:

Model-Based DemographyEssays on Integrating Data, Technique and Theory by Thomas K Burch.  Tom has been in demography a long time (six decades, in fact), and has brought together this volume based on his methodological critiques of demography in recent years.  I very much share his view that demography is far more than applied statistics, and that the field has a lot to say about the development and evolution of society and the behaviour of those within it.  If you’re interested in a detailed examination of demography as a science I can highly recommend this book.

Agent-Based Modelling in Population Studies: Concepts, Methods and Applications edited by André Grow and Jan Van Bavel.  This is a collection of papers on agent-based modelling in population studies presented at the University of Leuven in 2014 — and, full disclosure, I’m an author on one of the papers so my views here may be biased!  Having said that, I think this weighty tome (over 500 pages) offers some fascinating perspectives on the use of ABMs to study population, as well as some interesting examples of the methodology in action.  

As for my book — it should appear in early 2018, from what I understand — I’ll post here of course when Springer sets a final publication date.

 

Tagged , , , ,

Joined the University of Glasgow

I haven’t posted here in awhile, but it’s not for lack of activity — as of 2 October 2017, I’m now a member of the MRC/CSO Social and Public Health Sciences Unit at the University of Glasgow.  The Unit, as it’s known around here, will soon celebrate its 20th year of core funding from the Medical Research Council, and produces research covering a broad range of public health themes.

I’m a part of the Complexity in Health Improvement programme, and will be helping the Unit develop a variety of research projects applying agent-based modelling techniques to complex problems in public health, including obesity, alcohol use, social care provision, and more besides.  I’ll be working closely with the Unit Director, Professor Laurence Moore, and other members of the Complexity programme to develop these projects.

In typical style the move to Glasgow was hectic to say the least, and despite starting our apartment search many weeks in advance my partner and I only managed to secure a flat five days (!) before my start date.  We were lucky enough however to find a very nice flat in Mount Florida, to the south of Glasgow city centre.  The city itself is great so far, with plenty of great places to eat and drink and lots of friendly people around, though the weather is pretty bad (and for the UK, that’s really saying something).

All in all, I’m really excited to be a member of the SPHSU now, and even after just a week there are plenty of interesting projects taking shape.  Watch this space from here on out, I’ll be making an effort to post more now that I’ve finally made the move!

Tagged , ,

Paper submitted to ECAL 17

Just submitted a new paper to ECAL 17, the European Conference on Artificial Life.  I wrote this together with Richard Shaw, Mark McCann and Laurence Moore in the MRC/CSO Social and Public Health Sciences Unit at the University of Glasgow.

The goal here is to get some of the Alife community interested in some key problems in population health to which we think Alife can make a strong contribution.  The paper describes the current state of computational modelling in population health, the reasons behind the growing popularity of ABMs/complex-systems-based approaches, and describes in detail some specific key problems where complex social and environmental determinants play important roles.

And before anyone asks, yes we’re already working on stuff like this, we just want more people joining the fun!

A little preview snapshot below:

ecal17cap

In other news:

Major projects: We’re still working on some significant attempts at gaining funding for longer-term projects in agent-based modelling for population health.  Watch this space.

Game development: Somewhat predictably, development on my game has been stalled since spring semester started and teaching took up all my energy and most of my research time.  I’m making an effort to read up on design principles, both for roguelikes specifically and in general, to improve the gameplay whenever I have the time to get back to it.

Music: I discovered recently that some old DJ mixes I had online for years now that I never promoted in any way actually attracted a decent number of listens and some very positive comments in my inbox, so I’ve dug my DJ kit out of the closet and am getting caught up on new DnB and hardcore releases.  I’ll put something new up on MixCloud or somewhere when I’m back in the groove.

On a side note, I’m so out of touch that I only just found out that Vestax, makers of my beloved DCI-300 DJ controller and my turntables before that, went out of business in 2015.  RIP Vestax, you made great gear that lasted forever and I loved you for that, although in retrospect maybe that’s why you had trouble keeping sales up!

Tagged , , , ,

Paper submitted to Agent-Based Modelling of Urban Systems workshop

Just submitted a new paper with several colleagues from Teesside to the ABMUS 17 workshop at this year’s AAMAS conference in Brazil.  This is an overview of early-stage work on an agent-based modelling framework incorporating a 3D virtual environment.  The intention is to create an ABM that can be used as a research tool, simulating the actions and interactions of simulated agents in order to study some pressing problems in public health, and also as a learning tool that allows users to interact with the virtual world and see the health impact of changes to agent behaviour or their environment.

Here’s a little preview in the form of a screenshot of the paper itself — I’ll post the whole thing as usual if it’s accepted.

virtualenvpaper

Tagged , , ,

Holocaust Memorial Day 2017

It’s Holocaust Memorial Day in Britain, and I’m following my personal tradition of reading something about those terrible events on this day every year. This year I’m reading portions of the transcripts of the Nuremberg Trials, in which 21 Nazi war criminals were prosecuted for crimes against humanity. The dispassionate way in which some of these men report killing tens of thousands of people at a time turns my stomach.
 
Today during spare moments I have been reading the opening statement from the prosecution (21 November 1945), a passionate and compelling summary of the indictment which took up quite a few hours on the second day of the trial:
 
What makes this inquest significant is that these prisoners represent sinister influences that will lurk in the world long after their bodies have returned to dust. We will show them to be living symbols of racial hatreds, of terrorism and violence, and of the arrogance and cruelty of power. They are symbols of fierce nationalisms and of militarism, of intrigue and war-making which have embroiled Europe generation after generation, crushing its manhood, destroying its homes, and impoverishing its life. They have so identified themselves with the philosophies they conceived and with the forces they directed that any tenderness to them is a victory and an encouragement to all the evils which are attached to their names. Civilization can afford no compromise with the social forces which would gain renewed strength if we deal ambiguously or indecisively with the men in whom those forces now precariously survive.
 
Justice Jackson was right, of course, and their sinister influences do indeed still lurk in the world. I’ve been distraught today by the realisation that on a day when the UK is supposed to remember the brutal consequences of fascism, the Prime Minister is off in America begging favours from a white nationalist government.
 
The complete official trial proceedings (42 volumes) are available via the Library of Congress here. The opening statement above is in Volume 2
Tagged , , ,

Looking for PhD students again

Teesside University will be recruiting another cohort of PhD students shortly, so a number of us will be looking for students interested in some ongoing research projects we’ve got going on here.  I’ll post the link to the appropriate page once it goes up, but for now here’s a sneak preview:

Agent-based computational modelling for public health

As the UK population ages and demand for health and social care services continues to rise, new solutions are needed to better manage resources and plan for a challenging and uncertain future.   This project will use agent-based computational models to unravel the complexities of health policy implementation and service delivery by modelling the multiple interacting processes underlying the health system. These models will investigate challenges in health and social care service delivery across a variety of spatial and temporal scales — from short-term studies of demands on accident and emergency services, to longer-term explorations of the pressures facing social care over the next several decades.

Contact: Dr Eric Silverman (E.Silverman@tees.ac.uk)

Tagged

Game Dev Update: Twisty little passages, all alike

A quick update this time — I’ve been working here and there on implementing some maze generation code for the game, so that I could have a few different types of dungeon levels to generate.  At last I’ve got it working, and can now generate some intimidating mazes using the ‘growing tree’ algorithm:

maze16

By altering the likelihood of new branches in the path, I can change the feel of the maze significantly.  The maze above has a high likelihood of producing new branches; the one below produces much longer hallways:

maze19

 

Tonight I’ve just added a variation of this algorithm which mimics another well-known maze generation method, the ‘recursive backtracker’.  This one needs some fine-tuning, though, as currently it produces very long, meandering corridors that can be a little annoying to navigate:

maze20

The next step is to make the maze generator a bit more flexible.  Ultimately what I’d like to do is allow the normal dungeon generator to create maze rooms which can be integrated into the rest of the dungeon.  This will add some more variety in the dungeon without forcing the player to navigate an entire level-spanning maze every time the dungeon generator decides to mix things up.

I do think I want to have one dungeon level that’s entirely a maze, though, and encourage exploration by sticking a powerful artifact somewhere within and dropping some hints that the player might find it if they have a look around.  I’ll also scatter some Scrolls of Clairvoyance about, which will reveal the location of the level exit and make navigating the maze less directionless.

As you might’ve guessed, in these screenshots I’ve switched off the ‘fog of war’ for the player so that I could observe and test the results of the maze generator.  In actual play things look more like this:

maze17

By way of comparison, here’s how a maze level looks in the famous(ly difficult) roguelike Nethack:

Image result for nethack gehennom

More to come next time, when hopefully I’ll have maze rooms working.

 

Tagged , , ,

Game Dev Update: Upping the Challenge

So it’s been a little bit since the last update on my hobbyist game development efforts, but a lot’s been going on whenever I can snatch some time in between the constant, endless presentations I’ve had to prepare for recently on the academic side of my life.

My focus in the last few weeks has been on some core gameplay systems.  Originally I was going to work on the dungeon environment, but I figured that fancy dungeons wouldn’t be that useful if the player couldn’t do interesting stuff in them, so I went for under-the-hood gameplay systems instead:

Hunger system

Hunger systems are a classic feature of roguelikes — since the original Rogue, in fact!  The idea is that the player needs to seek out food within the dungeon and eat it regularly, otherwise they gradually begin to starve to death.  Since food is limited and can only be found within the dungeon and not created by the player, it serves as a time pressure mechanism; the player has to keep moving further down the dungeon to find food in order to stay alive.  Currently my system is very basic: the player starts with three rations, and can find two different types of food items within the dungeon that refills their hunger meter.  If at any point your Satiety stat dips below 50, you start getting warnings, and at 0 begin taking damage every turn.  At -50 you’ll die of starvation.  I’ve added an indicator to the interface that shows this stat directly, unlike Rogue and some other games that keep it hidden and only warn you shortly before death:

satiety7

Turn Scheduling:

In order to make monster fighting more interesting, I wanted to add a system for variable attack and movement speeds between different creatures.  This is kind of a weird thing to implement in a turn-based game, and I wasn’t sure of the best way to go about it at first.  Eventually I settled on a central turn scheduling system in which all monsters (and the player) schedule their next turn each time they take an action.  The number of turns they have to wait until they can move or attack again depends on their Speed stat.

It sounds simple, but it turned out to be a big pain to get right!  I had a lot of weird bugs where certain monster turns didn’t register, or the game would suddenly stop running in turn-based mode and let monsters run rampant while the player was unable to move, and all sorts of other problems.  Eventually I got all that ironed out, and finally had fast-moving wolves and bats, slow-moving zombies, etc… only to find that in certain circumstances the player would encounter invisible and invincible enemies after moving to a new dungeon level.

After a few days of annoyance I worked out the problem — monsters were dying in combat, but a reference to them was remaining in the turn schedule, meaning that memory was still being allocated for their monster data by the program.  In certain situations that meant the scheduler would find that reference, say to itself ‘hey this here says there should be an orc doing something’ and the player would end up fighting a ghostly remnant of a previously defeated enemy!

I was able to fix that relatively easily once I figured it out — this is why we keep backups, kids.  Also it was a useful reminder to be more careful about my coding practices in some parts of the game, so I did quite a few bits of refactoring of the code to prevent anything like that happening again.

Combat System Changes:

Again in service of making combat more interesting I made some significant changes to the combat system to better differentiate enemies.  My favourite series of Japanese RPG games is the Shin Megami Tensei series, which are known for being set in a dark demon-infested version of Tokyo and for being really difficult.  What I love most about these games is that the combat system encourages tactical thinking by having weapons and spells deal a number of different types of damage, which demons can be weak to, immune to, or resistant to depending on their nature.

I implemented something similar to this, where each monster has weaknesses to certain types of physical damage (in this game they’re called Phys for general slashing attacks, Blunt for hammers/clubs, Pierce for arrows and spears, alongside numerous magical damage types like Fire, Ice, Thunder, etc.).  Hitting a monster’s weakness will do double damage to it, while hitting if it’s resistant you’ll deal only half damage.  Some monsters are immune to certain types of damage entirely — Skeleton Warriors, for example, aren’t bothered at all about being poked by arrows given their total lack of fleshy bits.

The idea is that this will push the player to experiment with different weapons, spells and items in order to dispatch enemies more quickly — particularly when they reach later dungeon levels, where monsters start appearing in large swarms and have powerful attacks.  I want damage types to be a major focus for the player, and for good attack choices to have significant rewards (and for bad choices to have a big impact!).

To make things a little easier for the player, I’ve added a Look command so that you can see some details about monsters in visual range:

look-command

Other than these big changes, mostly I’ve been squashing bugs and adding bits and pieces of content.  At this point, the player can face about 300 different monsters, collect 50 different weapons and items, and visit 15 different dungeon levels.  As time goes on I’ll keep adding new monster types, then randomly-generated weapons and items, and finally some super-tough boss monsters including a final boss.  At that point I think I’ll be ready for a playable alpha release to get some gameplay feedback.

This week has marked the official start of the academic year, so there’s been a ton of things to do at the university — which means there hasn’t been much time for game development!  I’ve been keeping careful track of all my additions and to-do lists and such, so when I have time to get back to things I’ll remember what I’d planned to do next.

All in all it’s a hell of a lot of fun so far, even when I’m getting frustrated by weird bugs.  I’m definitely gaining some major Python proficiency thanks to all this, and it’s forced me to tighten up my coding practices and embrace proper version control.

After some more work on damage types and attack variety I’ll be modifying the game UI and sprucing up the general look of things, so hopefully I’ll have some more interesting screenshots next time 🙂

I’ll leave you now with some game recommendations:

SDL Rogue: a well-done Windows port of the original Rogue, with some nice additional options (including a graphical tile option).  Type ‘?’ to see all the commands (there’s a lot of them!).  The same site also has similar ports of other classic roguelikes, including Hack (the predecessor to Nethack), Larn, and Moria (predecessor to Angband).  Check ’em out.

DoomRL:  This is a fantastic free game that combines two of my favourite things — the original Doom (in my opinion the greatest computer game of all time, and one I still play regularly), and roguelikes.  It masterfully combines frantic Doom-style demon-blasting with turn-based roguelike gameplay and character progression, and to top it off has the original Doom music and sound effects, and some fantastic 2D graphical tiles.  Download it!

Some enterprising fan has developed a server for DoomRL, too, so you can see how you stack up against other players and even play in your browser (or via a Telnet client).  ASCII text mode only though!

Crypt of the NecroDancer:  This game kicks my butt all over town, but it’s incredibly creative and fun.  It’s a turn-based roguelike with a twist: the entire game world is tied to the rhythm of the music for the level, and making your moves along with the beat gives you various bonuses (and moving out of time leaves you open to attack!).  All the items and monsters play on this theme.  The graphics are incredibly charming, the music is by Danny Baranowsky (of Binding of Isaac and Super Meat Boy fame) and is absolutely fantastic, and it’s packed to the brim with cool features and secrets to unlock.

It’s also 50% off on Steam right now, so now’s a great time to take the plunge!

Tagged , ,

Postdoc simulation analysis (spoiler alert: job insecurity is bad)

Once again I’ve been working with the academic job security simulation again.  Yesterday I’d finished altering the research funding model so that our poor agents no longer lived in a world of government largesse where population increases are always matched by an increase in funding to keep grant acceptance rates at 30%.

After tweaking things a lot last night and earlier today, I found that a funding level set at an initial 30% with a 2% increase per timestep led to research output levels very close to the previous version of the model.  The proportion of grants funded slowly drops over the course of 100 timesteps, heading from that starting 30% down to about 17% at the end of an average run.

I also added a simple retirement mechanism to this version: after 40 semesters, agents start to think about retirement and have a fixed chance (20% at the moment) of leaving the sector forever.  The result of this is a significant rise in the return-on-investment measure as the senior academics start to leave the sector; seems we had a lot of senior academics coasting along without producing much in the way of research!  Compared to the previous version, the older academics produce significantly less research-wise — I’m presuming this is because the rich-get-richer aspect of the increasingly competitive funding environment leads to a larger proportion of failed applicants deciding to bow out of the rat-race altogether.

Having taken a brief look at all this I decided to test the feedback given to me at Alife XV.  In the initial simulation, promotions had a huge positive impact on research output regardless of whether they were made entirely at random or based on research quality.  Several people at the conference suggested that this may no longer be the case if I implemented a more constrained funding system.

So, I ran the simulation 800 times across a range of parameter values with limited funding and retirement mechanisms both turned on.  I then used my old pal, the software called Gaussian Emulation Machine for Sensitivity Analysis (GEM-SA), to crunch the numbers and come up with a statistical model of the agent-based model, and then ran that 41,000 times.  The final output of interest is the total research produced across the agent population at the end of the simulation.  The analysis looks like this:

gemsa1-cropped

Turns out my colleagues were onto something, which I expected (and hoped for, because otherwise that might mean the simulation might have some problems).  In this version of the sim altering the chances of promotion for postdocs does little on its own, accounting for only 0.11% of the output variance.  This factor interacts with the level of stress induced by impending redundancy, however, and this interaction accounts for 11.03% of the output variance.

The largest effect here is driven by Mentoring levels — the amount of research boost given to newly-promoted postdocs.  Second-largest is the stress caused by looming redundancies.  This is a significantly different result from the previous version of the simulation — I’ll run a parameter sweep of promotion levels later as well, to get the complete picture.

For the sake of completeness, here’s the graph of the main effects produced by GEM-SA:

gemsa2-cropped2

Tomorrow I’m hoping to do a similar analysis, but this time leaving Mentoring at a lower, constant level and varying a slightly different set of parameters.  My poor laptop needs a break for a little while, it’s pumping out crazy amounts of heat after all this number-crunching.

My other, larger task is to come up with a way to measure the overall human cost of this funding/career structure.  I think I can make a good case at this point that job insecurity is not great for research output in the simulation, given that across many thousands of runs I’ve yet to find a single one in which insecure employment produces more research for the money than permanent academic jobs.  I’d to be able to compare scenarios in terms of human cost as well, so perhaps taking a look at total redundancies after 100 semesters as the final output for some analyses might give me some ideas.

That aside I think I’ve made a decent start on an extension of the conference paper.  Thanks to all those who came to the talk in Mexico and gave me some useful feedback!

 

Tagged , , , ,