Grid inference