Added bandit sampling code and changed shape sampling and grid prediction to handle higher-res shapes