From Pattern Formation to Material Computation: Multi-agent Modelling of Physarum Polycephalum