Modelling and Online Optimisation of Robotic Fish Behaviours