Feature selection refers to a process used to reduce the dimension of a dataset in order to obtain the optimal features subset for machine learning and data mining algorithms. This aids the achievement of higher classification accuracy in addition to reducing the training time of a learning algorithm as a result of the removal of redundant and less-informative features. In this paper, four binary versions of the slime mould algorithm (SMA) are proposed for feature selection, in which the standard SMA is incorporated with the most appropriate transfer function of eight V-Shaped and S-Shaped transfer functions. The first version converts the standard SMA, which has not been used yet for feature selection to the best of our knowledge, into a binary version (BSMA). The second, abbreviated as TMBSMA, integrates BSMA with two-phase mutation (TM) to further exploit better solutions around the best-so-far. The third version, abbreviated as AFBSMA, combines BSMA with a novel attacking-feeding strategy (AF) that trades off exploration and exploitation based on the memory saving of each particle. Finally, TM and AF are integrated with BSMA to produce better solutions, in a version called FMBSMA. The k-nearest neighbors (KNN) algorithm, one of the common classification and regression algorithms in machine learning, is used to measure the classification accuracy of the selected features. To validate the performance of the four proposed versions of BSMA, 28 well-known datasets are employed from the UCI repository. The experiments confirm the efficacy of the AF method in providing better results. Furthermore, after comparing the four versions, the FMBSMA version is shown to be the best compared with the other three versions and six state-of-art feature selection algorithms.