Bacillus subtilis are Gram-positive bacteria that are able to distinguish between highly related ("kin") and less related strains ("non-kin") of the same species. The discrimination phenotype is reflected in the formation of a visible boundary line at the meeting point of two swarms, which is absent between kin swarms. Various systems are involved in the recognition mechanism, such as: antibiotics and toxins, CDI proteins, cell surface molecules and mobile elements. The purpose of the master's thesis was to analyse the genomes and genes involved in kin discrimination (KD genes) in 21 strains of Bacillus subtilis subsp. subtilis. We also aimed to reconstruct their phylogeny based on 8 housekeeping genes. We hypothesized that more related strains would show greater similarity at the level of KD genes both in percent of nucleotide identity and in their presence. Fasta files of 21 of B. subtilis genomes were aligned to the reference genome of B. subtilis 168 using the BWA-SW algorithm. Then we searched KD genes using the IGV program, isolated sequences of KD genes and housekeeping genes, and constructed similarity dendrograms in MEGAX and R. We showed that analysis of KD genes based on sequence similarity coincided with phylogeny obtained on the basis of 8 housekeeping genes. We also found that a dendrogram prepared based on the absence/presence of genes correlated with strain interactions during swarming.