  Every day, weather forecasting centres around the world make use of noisy,
incomplete observations of the atmosphere to update their weather forecasts.
This process is known as data assimilation, data fusion or state estimation and
is best expressed as Bayesian inference: given a set of observations, some
prior beliefs and a model of the target system, what is the probability
distribution of some set of unobserved quantities or latent variables at some
time, possibly in the future?
  While data assimilation has developed rapidly in some areas, relatively
little progress has been made in performing data assimilation with agent-based
models. This has hampered the use of agent-based models to make quantitative
claims about real-world systems.
  Here we present an algorithm that uses Markov-Chain-Monte-Carlo methods to
generate samples of the parameters and trajectories of an agent-based model
over a window of time given a set of possibly noisy, aggregated and incomplete
observations of the system. This can be used as-is, or as part of a data
assimilation cycle or sequential-MCMC algorithm.
  Our algorithm is applicable to time-stepping, agent-based models whose agents
have a finite set of states and a finite number of ways of acting on the world.
As presented the algorithm is only practical for agents with a few bytes of
internal state although we discuss ways of removing this restriction. We
demonstrate the algorithm by performing data assimilation with an agent-based,
spatial predator-prey model.
